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 CardRevision: 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
atinoutto 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/ttyUSBnbecause at least some of the ridiculous number of options that can be set bysttyare fixed. But in this case the defaults aren't good enough foratinouteven 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 rawfixes it. (In my case-icrnlwas the only part ofrawactually needed.)The problem with using
sttyis 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
timeoutwithatinoutto avoid a hang when the modem doesn't respond the wayatinoutis expecting.