V.32 is an ITU-T standard modem.
This protocol implements the transmitter and receiver for V.32. Since it is a full duplex protocol, it can only be used with a channel configured for full duplex operation. Each channel must also be configured for either originate or answer mode. To implement a V32 link, one end must be configured to originate mode and the other to answer mode.
This should be read in conjunction with the generic data communications documentation.
You must use #include "smdc_v32.h"
to get the
appropriate declarations.
The protocol value is kSMDCProtocolV32
The config_data pointer must point to one of these structs:
typedef struct smdc_v32_config_parms { unsigned speed; tSM_INT isanswer; tSM_INT no_ans_tone; tSM_INT retrain_can_change_speed; } SMDC_V32_CONFIG_PARMS;
'speed
' is the data rate in bits per second. This can be
one of the standard speeds: 4800 or 9600, or 0 to indicate that either speed
can be used.
'isanswer
' configures the channel to 'answer' mode (non zero)
or 'originate' mode (zero).
'no_ans_tone
' configures the channel to not send or expect the
V.25 ANS tone. This is used when the ANS tone has already been handled, for
example after V.8 negotiation.
'retrain_can_change_speed
' configures the channel to allow the
speed to change when the far end initiates a retrain. The allowed speeds are
determined by the initial speed configuration or the last speed used when initiating
a retrain using smdc_line_control().
The protocol can use these encodings: SYNC, ASYNC, HDLC.
The firmware modules v32, inchan and outchan must have been downloaded.
The kSMDCLineCtlCmdSetPrefixSuffix
command is supported by this protocol.
The kSMDCLineCtlCmdRetrain
command is supported by this protocol, where the
retrain_speed accepts the same
values as the initial speed
.
Note that no other commands are useful since the receiver is always connected and control of RTS is automatic.
Until the modem has trained the rx_status
is
kSMDCRxStatusNoCarrier
. Once the training is complete
rx_status
will be either kSMDCRxStatusReceivingData
or kSMDCRxStatusCarrierPresent
depending on whether
any data has been received but not collected.
When the modem is retraining the link_status
is
kSMDCLinkStatusConnecting
.
[note] 'flow' is not useful since there is no flow control mechanism.
The only notification implemented is NotifyOnCapacity.
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.
When the status
is kSMDCRxStatusCarrier
then
the u.carrier.carrier
value is either the current speed or
zero. A value of zero indicates that training has failed.