done
disconnect:
delay 2 # Separate from previous data.
send "+++" # Assure command mode.
delay 2 # Allow mode switching delay.
send "ATH\r" # Set modem switch-hook down
# (i.e., hang up).
ignore "\r" or "OK\r" timeout 2 # Ignore modem response.
send "ATEQ1\r" # Initialize modem: Echo OFF,
# Disable responses.
ignore "\r" timeout 1
done
condin: send "AT&FᑍEE\r" # Reset to factory defaults.
# ᑍE=data compression disabled
# E=echo disabled
ignore "\r" or "OK\r\n" timeout 2 # Ignore modem response.
send "AT#FᑍQ2\r" # Trellis modulation disabled
# Retrain with adaptive rate
expect "\r" or "OK\r\n" timeout 2 # Confirm commands successful
send "ATVXS=2\r" # Numeric response code
# AT compatible messages
# Answer on 2nd ring
expect "\r" timeout 2 # Confirm commands successful.
done
waitcall: ignore "2\r" timeout 1 # Ignore first ring.
expect "2\r" timeout 1 # Pick up second ring
# or timeout.
# Expect a connection response.
expect "1\r" timeout 6
done
page: send "ATD%N,%R\r" # %N = pager call center number
# commas=6sec wait time to
# enter paging number.
# %R = return number
expect "\r" or "3\r" timeout 3 # Confirm successful command.
delay 2 # Wait before hanging up.
send "+++" # Assure command mode.
delay 2 # Allow mode switching delay.
send "ATH\r" # Hang up.
expect "\r" timeout 2 # Confirm successful command.
done
ripo: send "AT&FᑍEE\r" # Reset to factory defaults.
# ᑍE=data compression disabled
# E=echo disabled
ignore "\r" or "OK\r\n" timeout 2 # Ignore modem response.
send "AT#FᑍQ2\r" # Trellis modulation disabled
# Retrain with adaptive rate
Appendix C. Modem Configurations C-13