Anyone testing an MC7430 or other MDM9x30 based modem
Bjørn Mork
bjorn at mork.no
Tue Nov 24 00:37:56 PST 2015
[moved from libqmi-devel since it is now completely irrelevant there]
Bjørn Mork <bjorn at mork.no> writes:
> So there is no reply to any of the 'open' messages. Which surprised me,
> because I had already used one of my more hackish perl scripts to run
> the Sierra specific 0x555b and 0x555c QMI_DMS commands over MBIM. And
> that was successful!
>
> I wonder if the main difference is patience? I send a single MBIM OPEN
> and then wait. Trying to do that again is successful, and allows me to
> use mbimcli just fine. So the problem seems to be the aggressive
> 'open'.
I looked for obvious places to insert a reasonable delay between the
OPENs, and was surprised to see that there already was a 5 second delay
there. But that obviously didn't work. And the reason was simple:
The OPEN processing use the same mbim_device_command() function as the
other commands. But at this point there is no self->priv->iochannel,
which makes mbim_device_command() bail out *before* it applies the
delay. So the OPENs are sent back-to-back, which makes this modem fail.
Reordering mbim_device_command() a bit fixes this for me (note the 3
second delay between OPEN and OPEN_DONE):
bjorn at nemi:/usr/local/src/git/libmbim$ src/mbimcli/mbimcli -v -d /dev/cdc-wdm1 --query-device-caps
[24 Nov 2015, 09:28:05] [Debug] opening device...
[24 Nov 2015, 09:28:05] [Debug] [/dev/cdc-wdm1] Queried max control message size: 4096
[24 Nov 2015, 09:28:05] [Debug] [/dev/cdc-wdm1] Sent message...
<<<<<< RAW:
<<<<<< length = 16
<<<<<< data = 01:00:00:00:10:00:00:00:01:00:00:00:00:10:00:00
[24 Nov 2015, 09:28:05] [Debug] [/dev/cdc-wdm1] Sent message (translated)...
<<<<<< Header:
<<<<<< length = 16
<<<<<< type = open (0x00000001)
<<<<<< transaction = 1
<<<<<< Contents:
<<<<<< max_control_transfer = 4096
[24 Nov 2015, 09:28:08] [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
[24 Nov 2015, 09:28:08] [Debug] MBIM Device at '/dev/cdc-wdm1' ready
[24 Nov 2015, 09:28:08] [Debug] Asynchronously querying device capabilities...
[24 Nov 2015, 09:28:08] [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: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
[24 Nov 2015, 09:28:08] [Debug] [/dev/cdc-wdm1] 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)
[24 Nov 2015, 09:28:08] [Debug] [/dev/cdc-wdm1] Received message...
>>>>>> RAW:
>>>>>> length = 196
>>>>>> data = 03:00:00:80:C4: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:94:00:00:00:03:00:00:00:01:00:00:00:01:00:00:00:02:00:00:00:3C:00:00:00:03:00:00:00:11:00:00:00:08:00:00:00:00:00:00:00:00:00:00:00:40:00:00:00:1E:00:00:00:60:00:00:00:28:00:00:00:88:00:00:00:0C:00:00:00:33:00:35:00:39:00:30:00:37:00:32:00:30:00:36:00:30:00:30:00:30:00:35:00:35:00:36:00:34:00:00:00:53:00:57:00:49:00:39:00:58:00:33:00:30:00:43:00:5F:00:30:00:31:00:2E:00:30:00:38:00:2E:00:30:00:37:00:2E:00:30:00:30:00:4D:00:43:00:37:00:34:00:35:00:35:00
[24 Nov 2015, 09:28:08] [Debug] [/dev/cdc-wdm1] Received message (translated)...
>>>>>> Header:
>>>>>> length = 196
>>>>>> type = command-done (0x80000003)
>>>>>> transaction = 2
>>>>>> Fragment header:
>>>>>> total = 1
>>>>>> current = 0
>>>>>> Contents:
>>>>>> status error = 'None' (0x00000000)
>>>>>> service = 'basic-connect' (a289cc33-bcbb-8b4f-b6b0-133ec2aae6df)
>>>>>> cid = 'device-caps' (0x00000001)
[/dev/cdc-wdm1] Device capabilities retrieved:
Device type: 'remote'
Cellular class: 'gsm'
Voice class: 'no-voice'
Sim class: 'removable'
Data class: 'umts, hsdpa, hsupa, lte'
SMS caps: 'pdu-receive, pdu-send'
Ctrl caps: 'reg-manual, multi-carrier'
Max sessions: '8'
Custom data class: 'unknown'
Device ID: '359072060005564'
Firmware info: 'SWI9X30C_01.08.07.00'
Hardware info: 'MC7455'
[24 Nov 2015, 09:28:08] [Debug] [/dev/cdc-wdm1] Sent message...
<<<<<< RAW:
<<<<<< length = 12
<<<<<< data = 02:00:00:00:0C:00:00:00:03:00:00:00
[24 Nov 2015, 09:28:08] [Debug] [/dev/cdc-wdm1] Sent message (translated)...
<<<<<< Header:
<<<<<< length = 12
<<<<<< type = close (0x00000002)
<<<<<< transaction = 3
[24 Nov 2015, 09:28:08] [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
[24 Nov 2015, 09:28:08] [Debug] Device closed
Patch is attached.
Bjørn
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-mbim-device-fix-delay-between-OPEN-commands.patch
Type: text/x-diff
Size: 1909 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libmbim-devel/attachments/20151124/1c8a444a/attachment.patch>
More information about the libmbim-devel
mailing list