Thanks, I’ll look into that. If I make any progress, I’ll post an update.
Appreciate your time/help.
dont know if this will help:
you said that youre using /dev/ttyUSB2,
yet in the script example youre using /dev/USB2 (your typo or script typo?)
sometimes interfaces get enumerated in reverse,
so change in the script ttyUSB2 → ttyUSB0, and ttyUSB0 ->ttyUSB2
(does the script check that its using the right interface?)
BUT
before you do that, change in the script, wherever you send AT command with echo to echo -e -n, and use single quotes, such as this:
//echo “AT+CGDCONT=1,\“IP\”,\“phone\”,\“0.0.0.0\”,0,0,0,0” > /dev/USB2
echo -e -n ‘AT+CGDCONT=1,“IP”,“phone”,“0.0.0.0”,0,0,0,0\r’> /dev/USB2
//or if its ttyUSB2, then
echo -e -n ‘AT+CGDCONT=1,“IP”,“phone”,“0.0.0.0”,0,0,0,0\r’> /dev/ttyUSB2
also,
maybe im reading this wrong, but, if you can see and have access to
/dev/ttyUSB* through a terminal, you need no tools, you just need a cat command.
//open 2 terminals
terminal1: sudo cat /dev/ttyUSB2 (this will read outputs)
terminal2: sudo -i (to get root if youre not root), then
terminal2: echo -e -n ‘AT\r’> /dev/ttyUSB2
terminal 1 should echo OK, if it doesnt, change port number to 0, or 1
Thanks much for replying…
Yep, it was a typo, should have been /dev/ttyUSB2.
I am aware of the ‘\r’ terminating character also, and I do apply that when attempting to connect.
The script does assume the ports are specific, there are only those three /dev/ttyUSB[0-2] ports. I did try all three ports (attempting AT commands) but I don’t get an OK back on any of them. Other things are done on /dev/ttyUSB0, so may be that is causing some confusion I’ll look into that.
I shut off all modem startup processing and just plugged in the device, just to make sure the startup script wasn’t causing trouble. That didn’t make any difference… I tried all three ports (/dev/ttyUSB0, /dev/ttyUSB1 and /dev/TTYUSB2); none of which reply with anything when I attempt an AT command.