Using GNU screen for AT commands

Tim Harvey tharvey at gateworks.com
Fri Apr 21 20:38:50 UTC 2017


On Fri, Apr 14, 2017 at 3:22 PM, Aleksander Morgado
<aleksander at aleksander.es> wrote:
> On Tue, Apr 11, 2017 at 3:30 PM, Tim Harvey <tharvey at gateworks.com> wrote:
>>> Is ModemManager able to talk to the TTY? Or not even that?
>>
>> Yes, ModemManager works and to debug this I looked at its code to see
>> what it was doing the other day:
>> https://cgit.freedesktop.org/ModemManager/ModemManager/tree/src/mm-port-serial.c#n1055.
>> I didn't see anything there that surprised me but I haven't compared
>> with what screen/minicom were doing.
>
> BTW; if you build ModemManager yourself you'll get a test utility that
> allows to interactively send commands to the tty using the same code
> ModemManager is using:
>
> ModemManager/test:(master)$ ./mmtty --help
> Usage:
>   lt-mmtty [OPTION...] - ModemManager TTY testing
>
> Help Options:
>   -h, --help               Show help options
>
> Application Options:
>   -d, --device=[PATH]      Specify device path
>   --no-flash               Avoid flashing the port while opening
>   --no-echo-removal        Avoid logic to remove echo
>   --send-delay=[DELAY]     Send delay for each byte in microseconds
> (default=1000)
>   -v, --verbose            Run action with verbose logs
>   -V, --version            Print version
>

Aleksander,

That's a useful tool - thanks for the pointer!

I wonder if this perhaps explains what might be happening:

root at ventana:~# ./ModemManager/test/mmtty -d /dev/ttyUSB3 -v --no-flash
creating AT capable serial port for device 'ttyUSB3'...
opening serial port...
(ttyUSB3) opening serial port...
(ttyUSB3): setting up baudrate: 57600
(ttyUSB3): port attributes not fully set
(ttyUSB3) device open count is 1 (open)
disabling serial port flash...
ready
> AT
(ttyUSB3): --> 'AT<LF><CR>'
(ttyUSB3): <-- '<CR><LF>ERROR<CR><LF>'
Got failure code 100: Unknown error
Unknown error
> ATI
(ttyUSB3): --> 'ATI<LF><CR>'
(ttyUSB3): <-- '<CR><LF>Manufacturer: Sierra Wireless,
Inc.<CR><LF>Model: MC8790<CR><LF>Revision: K1_0_2_8AP
C:/WS/FW/K1_0_2_8AP/MSM6290/SRC 2008/09/17 14:00:22<CR><LF>IMEI:
352974021856935<CR><LF>IMEI SV: 3<CR><LF>FSN:
D661380183210<CR><LF>3GPP Release 6<CR><LF>+GCAP:
+CGSM,+DS,+ES<CR><LF><CR><LF><CR><LF>ERROR<CR><LF>'
Got failure code 100: Unknown error
Unknown error

Tim


More information about the libqmi-devel mailing list