View Single Post
Old 12-05-2019, 11:38 AM
conneryc conneryc is offline
Registered User
Join Date: Dec 2019
Posts: 2
Cannot escape to online command mode (modem) in script

So I have a script to dial a locally attached modem to connect to remote modems connected to Cisco routers that I manage. Everything in the script works perfectly except getting the modem to hang up.

To do that, I have to send +++ to the connection to get to command mode with the modem to issue the ATH0 command to go on-hook.

This is the section of the script for that:

	crt.Screen.WaitForString ("Press RETURN to get started.")
		crt.Screen.Send "+++"
		crt.Screen.WaitForString ("OK")
		crt.Screen.Send "ATH0" & vbcr
        Exit Sub
I'm using version 8.1.2 of SecureCRT

With echo on, I can see that the +++ is being sent by the script, but the modem doesn't see it. The script just pauses waiting for "OK". However, if I manually type the +++ on my keyboard the modem DOES see it and returns the "OK" and the script then sends the ATH0 and the modem hang up the line.

I can't seem to determine why the modem isn't getting the +++ from the script, but does when entered manually from the keyboard?


Last edited by jdev; 12-05-2019 at 11:50 AM. Reason: wrap code in [code][/code] blocks for easier viewing
Reply With Quote