[PATCH 2/2 v3] mbimcli: new '--ms-query-firmware-id' action

Bjørn Mork bjorn at mork.no
Thu Feb 27 01:52:54 PST 2014


Aleksander Morgado <aleksander at aleksander.es> writes:

> On 27/02/14 07:26, Ben Chan wrote:
>> ---
>>  src/mbimcli/Makefile.am              |   3 +-
>>  src/mbimcli/mbimcli-ms-firmware-id.c | 174 +++++++++++++++++++++++++++++++++++
>>  src/mbimcli/mbimcli.c                |   8 ++
>>  src/mbimcli/mbimcli.h                |  20 ++--
>>  4 files changed, 196 insertions(+), 9 deletions(-)
>>  create mode 100644 src/mbimcli/mbimcli-ms-firmware-id.c
>> 
>
> Pushed, thanks.

Hmm, this didn't quite work for devices without ms-firmware-id support...

I get the exact same result from both the MC7710 (which supports
ms-firmware-id, but returns an all zero uuid) and the D-Link DWM-156
(which doesn't support ms-firmware-id):

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
[/dev/cdc-wdm1] Firmware ID retrieved: '00000000-0000-0000-0000-000000000000'


Debugging shows why:


[27 Feb 2014, 10:51:22] [Debug] [/dev/cdc-wdm0] Queried max control message size: 4096
[27 Feb 2014, 10:51:22] [Debug] [/dev/cdc-wdm0] Sent message...
<<<<<< RAW:
<<<<<<   length = 16
<<<<<<   data   = 01:00:00:00:10:00:00:00:01:00:00:00:00:10:00:00

[27 Feb 2014, 10:51:22] [Debug] [/dev/cdc-wdm0] Sent message (translated)...
<<<<<< Header:
<<<<<<   length      = 16
<<<<<<   type        = open (0x00000001)
<<<<<<   transaction = 1
<<<<<< Contents:
<<<<<<   max_control_transfer = 4096

[27 Feb 2014, 10:51:22] [Debug] [/dev/cdc-wdm0] Received message...
>>>>>> RAW:
>>>>>>   length = 16
>>>>>>   data   = 01:00:00:80:10:00:00:00:01:00:00:00:00:00:00:00

[27 Feb 2014, 10:51:22] [Debug] MBIM Device at '/dev/cdc-wdm0' ready
[27 Feb 2014, 10:51:22] [Debug] Asynchronously querying firmware ID...
[27 Feb 2014, 10:51:22] [Debug] [/dev/cdc-wdm0] Sent message...
<<<<<< RAW:
<<<<<<   length = 48
<<<<<<   data   = 03:00:00:00:30:00:00:00:02:00:00:00:01:00:00:00:00:00:00:00:E9:F7:DE:A2:FE:AF:40:09:93:CE:90:A3:69:41:03:B6:01:00:00:00:00:00:00:00:00:00:00:00

[27 Feb 2014, 10:51:22] [Debug] [/dev/cdc-wdm0] Sent message (translated)...
<<<<<< Header:
<<<<<<   length      = 48
<<<<<<   type        = command (0x00000003)
<<<<<<   transaction = 2
<<<<<< Fragment header:
<<<<<<   total   = 1
<<<<<<   current = 0
<<<<<< Contents:
<<<<<<   service = 'ms-firmware-id' (e9f7dea2-feaf-4009-93ce-90a3694103b6)
<<<<<<   cid     = 'get' (0x00000001)
<<<<<<   type    = 'query' (0x00000000)

[27 Feb 2014, 10:51:22] [Debug] [/dev/cdc-wdm0] Received message...
>>>>>> RAW:
>>>>>>   length = 64
>>>>>>   data   = 03:00:00:80:40:00:00:00:02:00:00:00:01:00:00:00:00:00:00:00:E9:F7:DE:A2:FE:AF:40:09:93:CE:90:A3:69:41:03:B6:01:00:00:00:00:00:00:00:10:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00

[27 Feb 2014, 10:51:22] [Debug] [/dev/cdc-wdm0] Received message (translated)...
>>>>>> Header:
>>>>>>   length      = 64
>>>>>>   type        = command-done (0x80000003)
>>>>>>   transaction = 2
>>>>>> Fragment header:
>>>>>>   total   = 1
>>>>>>   current = 0
>>>>>> Contents:
>>>>>>   status error = 'None' (0x00000000)
>>>>>>   service      = 'ms-firmware-id' (e9f7dea2-feaf-4009-93ce-90a3694103b6)
>>>>>>   cid          = 'get' (0x00000001)

[/dev/cdc-wdm0] Firmware ID retrieved: '00000000-0000-0000-0000-000000000000'

[27 Feb 2014, 10:51:22] [Debug] [/dev/cdc-wdm0] Sent message...
<<<<<< RAW:
<<<<<<   length = 12
<<<<<<   data   = 02:00:00:00:0C:00:00:00:03:00:00:00

[27 Feb 2014, 10:51:22] [Debug] [/dev/cdc-wdm0] Sent message (translated)...
<<<<<< Header:
<<<<<<   length      = 12
<<<<<<   type        = close (0x00000002)
<<<<<<   transaction = 3

[27 Feb 2014, 10:51:22] [Debug] [/dev/cdc-wdm0] Received message...
>>>>>> RAW:
>>>>>>   length = 64
>>>>>>   data   = 07:00:00:80:40:00:00:00:00:00:00:00:01:00:00:00:00:00:00:00:4B:F3:84:76:1E:6A:41:DB:B1:D8:BE:D2:89:C2:5B:DB:01:00:00:00:14:00:00:00:01:00:00:00:F0:00:00:00:02:00:00:00:50:00:00:00:16:00:00:00

[27 Feb 2014, 10:51:22] [Debug] [/dev/cdc-wdm0] Received message (translated)...
>>>>>> Header:
>>>>>>   length      = 64
>>>>>>   type        = indicate-status (0x80000007)
>>>>>>   transaction = 0
>>>>>> Fragment header:
>>>>>>   total   = 1
>>>>>>   current = 0
>>>>>> Contents:
>>>>>>   service = 'phonebook' (4bf38476-1e6a-41db-b1d8-bed289c25bdb)
>>>>>>   cid     = 'configuration' (0x00000001)

[27 Feb 2014, 10:51:22] [Debug] [/dev/cdc-wdm0] Received message...
>>>>>> RAW:
>>>>>>   length = 16
>>>>>>   data   = 02:00:00:80:10:00:00:00:03:00:00:00:00:00:00:00

[27 Feb 2014, 10:51:22] [Debug] Device closed

---

[27 Feb 2014, 10:51:39] -Error ** mbim_cid_get_printable: assertion 'service > MBIM_SERVICE_INVALID' failed
[27 Feb 2014, 10:51:39] [Debug] [/dev/cdc-wdm1] Queried max control message size: 512
[27 Feb 2014, 10:51:39] [Debug] [/dev/cdc-wdm1] Sent message...
<<<<<< RAW:
<<<<<<   length = 16
<<<<<<   data   = 01:00:00:00:10:00:00:00:01:00:00:00:00:02:00:00

[27 Feb 2014, 10:51:39] [Debug] [/dev/cdc-wdm1] Sent message (translated)...
<<<<<< Header:
<<<<<<   length      = 16
<<<<<<   type        = open (0x00000001)
<<<<<<   transaction = 1
<<<<<< Contents:
<<<<<<   max_control_transfer = 512

[27 Feb 2014, 10:51:39] [Debug] [/dev/cdc-wdm1] Received message...
>>>>>> RAW:
>>>>>>   length = 16
>>>>>>   data   = 01:00:00:80:10:00:00:00:01:00:00:00:00:00:00:00

[27 Feb 2014, 10:51:39] [Debug] MBIM Device at '/dev/cdc-wdm1' ready
[27 Feb 2014, 10:51:39] [Debug] Asynchronously querying firmware ID...
[27 Feb 2014, 10:51:39] [Debug] [/dev/cdc-wdm1] Sent message...
<<<<<< RAW:
<<<<<<   length = 48
<<<<<<   data   = 03:00:00:00:30:00:00:00:02:00:00:00:01:00:00:00:00:00:00:00:E9:F7:DE:A2:FE:AF:40:09:93:CE:90:A3:69:41:03:B6:01:00:00:00:00:00:00:00:00:00:00:00

[27 Feb 2014, 10:51:39] [Debug] [/dev/cdc-wdm1] Sent message (translated)...
<<<<<< Header:
<<<<<<   length      = 48
<<<<<<   type        = command (0x00000003)
<<<<<<   transaction = 2
<<<<<< Fragment header:
<<<<<<   total   = 1
<<<<<<   current = 0
<<<<<< Contents:
<<<<<<   service = 'ms-firmware-id' (e9f7dea2-feaf-4009-93ce-90a3694103b6)
<<<<<<   cid     = 'get' (0x00000001)
<<<<<<   type    = 'query' (0x00000000)

[27 Feb 2014, 10:51:39] [Debug] [/dev/cdc-wdm1] 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

[27 Feb 2014, 10:51:39] [Debug] [/dev/cdc-wdm1] 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)

[/dev/cdc-wdm1] Firmware ID retrieved: '00000000-0000-0000-0000-00005d145cb3'

[27 Feb 2014, 10:51:39] [Debug] [/dev/cdc-wdm1] Sent message...
<<<<<< RAW:
<<<<<<   length = 12
<<<<<<   data   = 02:00:00:00:0C:00:00:00:03:00:00:00

[27 Feb 2014, 10:51:39] [Debug] [/dev/cdc-wdm1] Sent message (translated)...
<<<<<< Header:
<<<<<<   length      = 12
<<<<<<   type        = close (0x00000002)
<<<<<<   transaction = 3

[27 Feb 2014, 10:51:39] [Debug] [/dev/cdc-wdm1] Received message...
>>>>>> RAW:
>>>>>>   length = 16
>>>>>>   data   = 02:00:00:80:10:00:00:00:03:00:00:00:00:00:00:00

[27 Feb 2014, 10:51:39] [Debug] Device closed





Bjørn


More information about the libmbim-devel mailing list