Previous Next Contents

17. Questions about chat

17.1 My modem wont dial when I run chat

The modem is required to be in the command mode to issue dial commands. If your modem is 'online' then characters sent to the modem will be sent to the remote system.

If possible, configure the modem to monitor the DTR signal and to return to the command mode when the DTR signal dropps. This will permit the computer to force the modem back to the command mode when the pppd process terminates at the end of a connection. It will then be in the proper state when the next execution attempts to dial the telephone.

If you cant do this then you should change the dial sequence so that it is similar to the following. It will ensure that the modem is in the command state prior to attempting to send the dial sequence.

TIMEOUT 3 "" \rAT OK-+++\c-OK AT&D2&C1 TIMEOUT 60 OK ATDT555-1212 CONNECT

The commands will change the timeout period to three seconds. This accomodates the guard time period used by many modems. It will then send AT to the modem and look for its response of OK. If it is not received in the three seconds, it will send the +++ sequence to the modem and wait for the modem to present the expected OK response. Once it receives the valid response it will configure the modem and dial the telephone number.

17.2 The modem dials only on every second attempt

Please refer to the above answer. It is usually the same issue.

17.3 The chat script stops after sending the account name and it never receives the password prompt.

Some systems, notably SCO, will flush the receive buffers after writing the prompts for user name and password. The chat program normally transmits the response immediately upon seeing the prompt. The result is that the reply from chat is flushed by SCO. The chat program continues to wait for the password prompt. However, the remote system is still waiting for the user to enter the account name.

The solution is simple. Slow down the responses from chat so that there is time for the remote system to flush the receive buffer before chat starts to send the response. Chat supports this with the \d parameter. Change the response strings similar to the following:

ogin:--ogin: \d\daccount assword: \d\dhello2u2


Previous Next Contents