Huawei E820W MBIM issue

Aleksander Morgado aleksander at aleksander.es
Tue Jun 10 07:29:37 PDT 2014


On Tue, Jun 10, 2014 at 4:12 PM, Dan Williams <dcbw at redhat.com> wrote:
> Causes the device caps query to fail, and the device ends up with "none"
> capabilities.  Any ideas what's going on?  MM from git master today,
> libmbim from May 27th.  Looks like MM is receiving an unexpected
> message?
>
> Dan
>

That is weird.... see below.


> ModemManager[2074]: [/dev/cdc-wdm0] Queried max control message size:
> 1536


So, you send a MBIM Open message (transaction 1)....

> ModemManager[2074]: [/dev/cdc-wdm0] Sent message...
> <<<<<< RAW:
> <<<<<<   length = 16
> <<<<<<   data   = 01:00:00:00:10:00:00:00:01:00:00:00:00:06:00:00
> ModemManager[2074]: [/dev/cdc-wdm0] Sent message (translated)...
> <<<<<< Header:
> <<<<<<   length      = 16
> <<<<<<   type        = open (0x00000001)
> <<<<<<   transaction = 1
> <<<<<< Contents:
> <<<<<<   max_control_transfer = 1536


And you get the MBIM Open Done reply (for transaction 1)....

> ModemManager[2074]: [/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
> ModemManager[2074]: <debug> [1402407677.718576]
> [mm-broadband-modem-mbim.c:1281] parent_initialization_started_ready():
> Couldn't start parent initialization: Couldn't open ports during modem
> initialization: Couldn't get primary port
> ModemManager[2074]: <debug> [1402407677.718936]
> [mm-broadband-modem-mbim.c:210] modem_load_current_capabilities():
> loading current capabilities...

And you think you're good to go as the Open is ready, so you send a
new MBIM request (transaction 2)....

> ModemManager[2074]: [/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:A2:89:CC:33:BC:BB:8B:4F:B6:B0:13:3E:C2:AA:E6:DF:01:00:00:00:00:00:00:00:00:00:00:00
> ModemManager[2074]: [/dev/cdc-wdm0] Sent message (translated)...
> <<<<<< Header:
> <<<<<<   length      = 48
> <<<<<<   type        = command (0x00000003)
> <<<<<<   transaction = 2
> <<<<<< Fragment header:
> <<<<<<   total   = 1
> <<<<<<   current = 0
> <<<<<< Contents:
> <<<<<<   service =
> 'basic-connect' (a289cc33-bcbb-8b4f-b6b0-133ec2aae6df)
> <<<<<<   cid     = 'device-caps' (0x00000001)
> <<<<<<   type    = 'query' (0x00000000)


And, hey, you get yet another Open Done message for transaction 1; ok,
we can discard this one...

> ModemManager[2074]: [/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
> ModemManager[2074]: [/dev/cdc-wdm0] No transaction matched in received
> message

But wtf, you still get yet another Open Done message, this time for
transaction 2?

> ModemManager[2074]: [/dev/cdc-wdm0] Received message...
>>>>>>> RAW:
>>>>>>>   length = 16
>>>>>>>   data   = 01:00:00:80:10:00:00:00:02:00:00:00:00:00:00:00
> ModemManager[2074]: mbim_message_command_done_get_result: assertion
> 'MBIM_MESSAGE_GET_MESSAGE_TYPE (self) == MBIM_MESSAGE_TYPE_COMMAND_DONE'
> failed

I don't think I've covered this case in libmbim, truth be told. We
should definitely check if the request we expect matches not only
transaction ID but also the request type that we expect.

Don't know why this modem does this, though...

-- 
Aleksander
https://aleksander.es


More information about the libmbim-devel mailing list