I've a USB modem and a GSM card plugged in, hoping to communicate with it. I installed minicom and atinout, and used this command in minicom:
AT+CUSD=1,"*137#",15
ERROR
and on atinout also I did :
$ atinout - /dev/ttyUSB3 - < <(echo "AT+CUSD=1,\"*137#\",15")
ERROR
notes:
- using modem manager GUI the USSD commands and AT are running well
and on atinout it used to work few days ago and then it refused working hardware version :
Manufacturer: TCT Mobile International Limited
Model: HSPA Data Card
Revision: IX1B5400XX
If a device works in some terminal emulators but not others, then the terminal is probably set up incorrectly ("Incorrectly" meaning "different from how the device on the other side of the connection is configured"; there is no right or wrong.)
Usually the problem is one of baud rate, local echo, or LF vs CRLF line endings. You can configure how linux handles a tty device with
stty
(orsetserial
).Example:
Here I use
atinout
to talk to a Telit DE910 "AUX" port via a UART.So far so good. But this modem has supports multiple physical interfaces for each logical interface, and with my device logical port "AUX" is also available via
/dev/ttyUSB2
. In general I like to use/dev/ttyUSBn
because at least some of the ridiculous number of options that can be set bystty
are fixed. But in this case the defaults aren't good enough foratinout
even though we are issuing the same commmand to the same logical port:The extra CRLFs are the give-away in this case, and configuring the terminal with
stty raw
fixes it. (In my case-icrnl
was the only part ofraw
actually needed.)The problem with using
stty
is you've changed the device for everybody else. You can use stty to save the initial configuration so that you can restore it when you are done.Finally I recommending using
timeout
withatinout
to avoid a hang when the modem doesn't respond the wayatinout
is expecting.