Skip to content

broadband-modem-qmi: don't fail on power indication registration error

This a fix for #683 (closed).

When the error case occurs the sequence is now:

Jan 19 16:05:07.219024 tap-0001332F ModemManager[1238]: <dbg> [modem0] Power indication registration request is sent
Jan 19 16:05:07.222754 tap-0001332F ModemManager[1238]: <dbg> [/dev/cdc-wdm0] sent message...
                                                        <<<<<< RAW:
                                                        <<<<<<   length = 17
                                                        <<<<<<   data   = 01:10:00:00:02:01:00:16:00:01:00:04...
Jan 19 16:05:07.222869 tap-0001332F ModemManager[1238]: <dbg> [/dev/cdc-wdm0] sent generic request (translated)...
                                                        <<<<<< QMUX:
                                                        <<<<<<   length  = 16
                                                        <<<<<<   flags   = 0x00
                                                        <<<<<<   service = "dms"
                                                        <<<<<<   client  = 1
                                                        <<<<<< QMI:
                                                        <<<<<<   flags       = "none"
                                                        <<<<<<   transaction = 22
                                                        <<<<<<   tlv_length  = 4
                                                        <<<<<<   message     = "Set Event Report" (0x0001)
                                                        <<<<<< TLV:
                                                        <<<<<<   type       = "Operating Mode Reporting" (0x14)
                                                        <<<<<<   length     = 1
                                                        <<<<<<   value      = 01
                                                        <<<<<<   translated = yes
Jan 19 16:05:07.226811 tap-0001332F ModemManager[1238]: <dbg> [ttyUSB2/at] --> 'ATV1<CR>'
Jan 19 16:05:07.269780 tap-0001332F ModemManager[1238]: <dbg> [/dev/cdc-wdm0] received message...
                                                        <<<<<< RAW:
                                                        <<<<<<   length = 20
                                                        <<<<<<   data   = 01:13:00:80:02:01:02:16:00:01:00:07...
Jan 19 16:05:07.269915 tap-0001332F ModemManager[1238]: <dbg> [/dev/cdc-wdm0] received generic response (translated)...
                                                        <<<<<< QMUX:
                                                        <<<<<<   length  = 19
                                                        <<<<<<   flags   = 0x80
                                                        <<<<<<   service = "dms"
                                                        <<<<<<   client  = 1
                                                        <<<<<< QMI:
                                                        <<<<<<   flags       = "response"
                                                        <<<<<<   transaction = 22
                                                        <<<<<<   tlv_length  = 7
                                                        <<<<<<   message     = "Set Event Report" (0x0001)
                                                        <<<<<< TLV:
                                                        <<<<<<   type       = "Result" (0x02)
                                                        <<<<<<   length     = 4
                                                        <<<<<<   value      = 01:00:11:00
                                                        <<<<<<   translated = FAILURE: MissingArgument
Jan 19 16:05:07.271757 tap-0001332F ModemManager[1238]: <dbg> [modem0] device doesn't support power indication registration: ignore it and continue
Jan 19 16:05:07.271883 tap-0001332F ModemManager[1238]: <dbg> [modem0] Power operation is pending
Jan 19 16:05:07.272038 tap-0001332F ModemManager[1238]: <dbg> [/dev/cdc-wdm0] sent message...
                                                        <<<<<< RAW:
                                                        <<<<<<   length = 17
                                                        <<<<<<   data   = 01:10:00:00:02:01:00:17:00:2E:00:04...
Jan 19 16:05:07.272148 tap-0001332F ModemManager[1238]: <dbg> [/dev/cdc-wdm0] sent generic request (translated)...
                                                        <<<<<< QMUX:
                                                        <<<<<<   length  = 16
                                                        <<<<<<   flags   = 0x00
                                                        <<<<<<   service = "dms"
                                                        <<<<<<   client  = 1
                                                        <<<<<< QMI:
                                                        <<<<<<   flags       = "none"
                                                        <<<<<<   transaction = 23
                                                        <<<<<<   tlv_length  = 4
                                                        <<<<<<   message     = "Set Operating Mode" (0x002E)
                                                        <<<<<< TLV:
                                                        <<<<<<   type       = "Mode" (0x01)
                                                        <<<<<<   length     = 1
                                                        <<<<<<   value      = 00
                                                        <<<<<<   translated = online
Jan 19 16:05:07.281739 tap-0001332F ModemManager[1238]: <dbg> [/dev/cdc-wdm0] received message...
                                                        <<<<<< RAW:
                                                        <<<<<<   length = 20
                                                        <<<<<<   data   = 01:13:00:80:02:01:02:17:00:2E:00:07...
Jan 19 16:05:07.281859 tap-0001332F ModemManager[1238]: <dbg> [/dev/cdc-wdm0] received generic response (translated)...
                                                        <<<<<< QMUX:
                                                        <<<<<<   length  = 19
                                                        <<<<<<   flags   = 0x80
                                                        <<<<<<   service = "dms"
                                                        <<<<<<   client  = 1
                                                        <<<<<< QMI:
                                                        <<<<<<   flags       = "response"
                                                        <<<<<<   transaction = 23
                                                        <<<<<<   tlv_length  = 7
                                                        <<<<<<   message     = "Set Operating Mode" (0x002E)
                                                        <<<<<< TLV:
                                                        <<<<<<   type       = "Result" (0x02)
                                                        <<<<<<   length     = 4
                                                        <<<<<<   value      = 00:00:00:00
                                                        <<<<<<   translated = SUCCESS
Jan 19 16:05:07.282069 tap-0001332F ModemManager[1238]: <msg> [modem0] power state updated: on

I've reproduced and test the fix with a VIVO WM31 (vid:pid=1c9e:9801) modem along up-to-date libmbim (23363567bcc5bccb169d3730ea128f631bb42570) and libqmi (785d261d4dd26231289e67cf051c345428e9cc87)

full logs: modemmanager_fix_683.tar.xz

Merge request reports

Loading