FSK is 'frequency shift keying' which is a method of transmitting data using tones. Binary data is encoded by sending one of two tones for each bit, with one tone used for zero bits and another for one bits.
This protocol implements the transmitter for FSK. Since it is only a transmitter, it only uses the output half of a channel. Typically the input half is configured for FSK rx.
This should be read in conjunction with the generic data communications documentation.
You must use #include "smdc_fsk.h"
to get the
appropriate declarations.
The protocol value is kSMDCProtocolFSKtx
.
The config_data pointer must point to one of these structs:
typedef struct smdc_fsk_config_parms { unsigned long speed; float mark_frequency; float space_frequency; unsigned long rx_carrier_on_mS; unsigned long rx_carrier_off_mS; unsigned long set_power; float user_power; unsigned long get_metric; unsigned long thresh_metric; unsigned long reverse_chan_filter; } SMDC_FSK_CONFIG_PARMS;
'speed
' is the data rate in
bits per second. Where supported by the firmware, fractional
speeds may be specified by multiplying by 65536, e.g. 45.45 can
by given as 2978909.
'mark_frequency
' is
the frequency, in Hz, of the tone used to encode mark ('1')
bits.
'space_frequency
' is
the frequency, in Hz, of the tone used to encode space ('0')
bits.
'rx_carrier_on_mS
'
is not used and applies only to FSK reception.
'rx_carrier_off_mS
'
is not used and applies only to FSK reception.
'set_power
'
indicates whether to use the default power for transmissions
(when zero) or to use a user-specified power level
(non-zero). The user-specified power level is given in the
user_power
field.
'user_power
' is the
power level (in dBm0) to use for transmissions. This field must
be zero if the set_power
field is zero to
indicate that the default should be used..
'get_metric
'
is not used and applies only to FSK reception.
'thresh_metric
'
is not used and applies only to FSK reception.
'reverse_chan_filter
'
is not used and applies only to FSK reception.
This table shows values of these parameters for some standard FSK modems:
Standard | speed | mark | space |
---|---|---|---|
V.21 Channel 1 | 300 | 980 | 1180 |
V.21 Channel 2 | 300 | 1650 | 1850 |
Bell 103 originating | 300 | 1270 | 1070 |
Bell 103 answering | 300 | 2225 | 2025 |
V.23 mode 2 | 1200 | 1300 | 2100 |
V.23 mode 1 | 600 | 1300 | 1700 |
V.23 back | 75 | 390 | 450 |
Bell 202 | 1200 | 1200 | 2200 |
Bell 202 back channel | 75, 110, or 150 | 387 | 487 |
V.18 Annex A | 50 | 1400 | 1800 |
Note that for full duplex operation, V.21 channel 1 is the one used from the originator to the answering end, and channel 2 is used for the reverse direction. For half duplex, channel 2 is not used (at least, that's what the V.21 standard says, but fax machines complying with the T.30 standard use only channel 2).
There is also an alternative Bell 202 back channel which runs at 5 bps, but this uses a single carrier frequency of 387 Hz representing mark (1), with space (0) represented by no signal (so it's actually a continuous wave modem, not FSK).
This protocol can use these encodings: SYNC, ASYNC, and HDLC. Note that since an FSK signal contains no clock information, if SYNC or HDLC encodings are used the data must contain enough transitions between the frequencies (i.e. no long runs of only zeros or only ones) to allow the receiver to keep locked onto the bit rate. It is the user's responsibility to determine the capabilities of the receiver and to ensure that sufficient transitions occur in the data.
The firmware modules fsktx and outchan must have been downloaded.
The kSMDCLineCtlCmdSetPrefixSuffix command is supported by this protocol.
The kSMDCTxStatusEmpty status is returned when the carrier has stopped in response to a call to smdc_line_control() with the command kSMDCLineCtlCmdUnassertRTS.
[note] 'flow' is not useful since there is no flow control mechanism.
The only notification implemented is kSMDCTxCtlNotifyOnCapacity.
When setting the capacity, it is necessary to specify a value one greater than the value required. i.e. to get notified when space is available for at least 32 bytes, set the capacity to 33 or greater.
This function is not applicable since it only applies to the input half of a channel.
This function is not applicable since it only applies to the input half of a channel.
This function is not applicable since it only applies to the input half of a channel.