[PATCH] mbimcli: check status code in command-done message before parsing response
Bjørn Mork
bjorn at mork.no
Fri Feb 28 02:50:07 PST 2014
Bjørn Mork <bjorn at mork.no> writes:
> Looks good to me. Tested with MC7710, DWM-156 and E367 respectively:
>
> bjorn at nemi:/usr/local/src/git/libmbim$ src/mbimcli/mbimcli -d /dev/cdc-wdm0 --ms-query-firmware-id
> [/dev/cdc-wdm0] Firmware ID retrieved: '00000000-0000-0000-0000-000000000000'
>
> bjorn at nemi:/usr/local/src/git/libmbim$ src/mbimcli/mbimcli -d /dev/cdc-wdm1 --ms-query-firmware-id
> error: operation failed: NoDeviceSupport
> bjorn at nemi:/usr/local/src/git/libmbim$ src/mbimcli/mbimcli -d /dev/cdc-wdm2 --ms-query-firmware-id
> error: operation failed: Transaction timed out
A colleague of mine had been kind enough to leave a H5321gw on his
desk. Bad choice with me around :-)
Anyway, the Ericsson firmware does exactly the same as the Mediatek
firmware for unknown services (and it doesn't support):
[28 Feb 2014, 11:45:33] [Debug] [/dev/cdc-wdm2] Received message...
>>>>>> RAW:
>>>>>> length = 48
>>>>>> data = 03:00:00:80:30:00:00:00:02:00:00:00:01:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:01:00:00:00:09:00:00:00:00:00:00:00
[28 Feb 2014, 11:45:33] -Error ** mbim_cid_get_printable: assertion 'service > MBIM_SERVICE_INVALID' failed
[28 Feb 2014, 11:45:33] [Debug] [/dev/cdc-wdm2] Received message (translated)...
>>>>>> Header:
>>>>>> length = 48
>>>>>> type = command-done (0x80000003)
>>>>>> transaction = 2
>>>>>> Fragment header:
>>>>>> total = 1
>>>>>> current = 0
>>>>>> Contents:
>>>>>> status error = 'NoDeviceSupport' (0x00000009)
>>>>>> service = 'invalid' (00000000-0000-0000-0000-000000000000)
>>>>>> cid = '(null)' (0x00000001)
Bjørn
More information about the libmbim-devel
mailing list