Skip to content

quectel: add support for EM120/160 PCIe modules

Adds support for PCIe MBIM modems (em120/160) to Quectel plugin. Also adds firehose update method and fixes qcdm port opening.

I stumbled upon a strange bug with AT and QCDM port handling after system resume from the suspend state. Unfortunately, I was not able to pin it down on my own.

This bug does not happen with the master branch and the first two commits of this merge request. The last commit (quectel: add support for EM120/160 PCIe modules) introduces this bug somehow, I couldn't find how the changes to the Quectel plugin could affect MMPortSerial part.

It would be great if you could take a look at it.

After resuming my laptop from the suspend state, AT and QCDM ports are not handled by the MM:

ModemManager[2346]: <debug> [1623365692.111069] [wwan0p1QCDM/qcdm] --> 7e 00 78 f0 7e
ModemManager[2346]: <debug> [1623365692.111269] [wwan0p3AT/at] --> 'AT<CR><LF>'
ModemManager[2346]: <debug> [1623365692.118737] [modem28/wwan0p3AT/at] <-- '<CR><LF>OK<CR><LF>'
ModemManager[2346]: <debug> [1623365692.126923] [modem28/wwan0p1QCDM/qcdm] <-- 00 4a 61 6e 20 32 30 20 32 30 32 31 30 37 3a 32 32 3a 34 35 4a 61 6e 20 30 38 20 32 30 32 31 30 37 3a 30 30 3a 30 30 73 64 78 32 34 2e 67 65 00 00 ff 64 00 00 00 96 4f b8 7e
ModemManager[2346]: <debug> [1623365695.111577] [wwan0p1QCDM/probe] port is not QCDM-capable
ModemManager[2346]: <debug> [1623365695.111689] [plugin-manager] task 92,wwan0p1QCDM: found best plugin for port (quectel)
ModemManager[2346]: <debug> [1623365695.111724] [plugin-manager] task 92,wwan0p1QCDM: finished in '7.753692' seconds
ModemManager[2346]: <debug> [1623365695.111768] [plugin-manager] task 92,wwan0p1QCDM: best plugin matches device reported one: quectel
ModemManager[2346]: <debug> [1623365695.111808] [plugin-manager] task 92: still 1 running probes (1 active): wwan0p3AT
ModemManager[2346]: <debug> [1623365695.111872] [wwan0p1QCDM/qcdm] device open count is 0 (close)
ModemManager[2346]: <debug> [1623365695.111916] [wwan0p1QCDM/qcdm] closing serial port...
ModemManager[2346]: <debug> [1623365695.111967] [wwan0p1QCDM/qcdm] serial port closed
ModemManager[2346]: <debug> [1623365695.112032] [wwan0p1QCDM/qcdm] forced to close port
ModemManager[2346]: <debug> [1623365695.112204] [wwan0p3AT/at] --> 'AT<CR><LF>'
ModemManager[2346]: <debug> [1623365695.120178] [modem28/wwan0p3AT/at] <-- '<CR><LF>OK<CR><LF>'
ModemManager[2346]: <debug> [1623365698.111534] [wwan0p3AT/probe] port is not AT-capable

On the first run everything works good, all ports are perfectly handled. Only happens after suspend/resume cycle. As seen from the log, both ports provide valid replies, but seems they get lost somewhere on the way. mm_port_serial_command_finish returns NULL in serial_command_ready function.

It would be great if you could take a look at this issue. Thanks.

Edited by Ivan Mikhanchuk

Merge request reports

Loading