Hayes Modem Driver Operation
Once a Hayes compatible modem has been connected to the selected port and the driver has been correctly configured, the ADVC is able to initiate a call to a remote device if, for example, there are change-of-state events to be reported.
The ADVC uses the list of 10 phone numbers configured for the Hayes modem. If it fails to establish communications via one number, it will try the next number on the list.
The Hayes driver uses the state of the DCD input from the modem to determine the status of the modem. If DCD is asserted, then the modem is on-line. If DCD is negated, the modem is off-line.
When a communications port is assigned the Hayes driver, its DCD is set to Don’t Ignore and that field becomes read-only.
The modem must be configured to:
-
Auto answer any call
-
Not return results codes
-
Not echo commands
If possible, the modem must also be configured to reset when it
receives an
On-to-Off change of the DTR. DTR needs
to be enabled to allow this feature.
To establish a remote connection, the driver issues an ATD, ATDT or ATDP Hayes command followed by the currently active telephone number.
The driver will then wait up to the Dial Timeout setting (default is 90 s) for the modem to assert the DCD line. If the modem fails to assert the DCD line within the configured time then the dial out attempt is aborted, the next configured phone number is selected and another attempt to dial out is made.
If the DCD line is asserted, or all the numbers in the Telephone Numbers list have been dialled, then this is counted as a dial out attempt. However, if the data is not sent, then the next dial out attempt will begin after the Attempt Delay setting (default is 30 s). This will happen no more than Max Attempts times (default is 3).
After successful communications (that is a phone line has been established) the driver will hang up the modem after the No Data Timeout setting (default is 30 s) if not data has been received or transmitted.
The active phone number is reset to the head of the list.
To hang up the modem, the driver will:
-
Send +++
-
Wait 1.2 s
-
Send ATH
-
Wait 5 s
-
Toggle the DTR line if enabled.
The driver will then check that the modem has negated the DCD line. If the DCD is still asserted and the radio power cycle is On, the driver will turn the radio power supply (AUX+) Off for 1 minute to disconnect power from the modem and reset it. If after the radio power reset, the dial out sequence initialization conditions are still met then a new sequence is initiated.