Linux Chat - Handling Errors via Subexpect Pairs
Good morning,
I'm still very new to Linux, and am writing a script that needs to connect to possibly several different modem models. I want to disable 4g on modems that support that mode. As such, I would have a set of lines like this: Code:
'' 'ATZ' Code:
'OK-AT-OK' 'ATDT#12345678" #dummy phone number of course This works for connecting a modem that supports the 4g command. However, for a 3g-only modem, it breaks. I've got a tool that allows me to send commands manually to the modem and check the response. For both modems, AT does return OK. Do the subexpect/subsend pairs not work to handle a returned ERROR, then? I apologize if this is in the wrong forum...I thought about the networking forum, but since I'm still very new I thought maybe I'm missing something that would be obvious to experienced users. I've looked at the man page for chat, but did not see anything that sheds light on this. I searched this forum and found one other old thread with a similar problem, but I still can't figure out where mine is going wrong. Thanks and have a great day! |
I'm not familiar with chat scripting, but I believe I've found an appropriate reference page.
http://www.tldp.org/HOWTO/PPP-HOWTO/x1219.html May I ask what you are using for documentation? |
All times are GMT -5. The time now is 08:56 AM. |