<div dir="ltr"><div><span style="font-family:arial,sans-serif;font-size:12.727272033691406px">Sent from wrong email address earlier. :(</span></div><span style="font-family:arial,sans-serif;font-size:12.727272033691406px">The commit for posterity: </span><a href="http://cgit.freedesktop.org/libmbim/libmbim/commit/?id=6f2a64292e16bd8a8e6c6b79d898a693eb372b45" target="_blank" style="font-family:arial,sans-serif;font-size:12.727272033691406px">http://cgit.freedesktop.org/libmbim/libmbim/commit/?id=6f2a64292e16bd8a8e6c6b79d898a693eb372b45</a><br>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jun 10, 2014 at 8:40 AM, Aleksander Morgado <span dir="ltr"><<a href="mailto:aleksander@aleksander.es" target="_blank">aleksander@aleksander.es</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Tue, Jun 10, 2014 at 4:29 PM, Aleksander Morgado<br>
<<a href="mailto:aleksander@aleksander.es">aleksander@aleksander.es</a>> wrote:<br>
> On Tue, Jun 10, 2014 at 4:12 PM, Dan Williams <<a href="mailto:dcbw@redhat.com">dcbw@redhat.com</a>> wrote:<br>
>> Causes the device caps query to fail, and the device ends up with "none"<br>
>> capabilities. Any ideas what's going on? MM from git master today,<br>
>> libmbim from May 27th. Looks like MM is receiving an unexpected<br>
>> message?<br>
>><br>
>> Dan<br>
>><br>
><br>
> That is weird.... see below.<br>
><br>
><br>
>> ModemManager[2074]: [/dev/cdc-wdm0] Queried max control message size:<br>
>> 1536<br>
><br>
><br>
> So, you send a MBIM Open message (transaction 1)....<br>
><br>
>> ModemManager[2074]: [/dev/cdc-wdm0] Sent message...<br>
>> <<<<<< RAW:<br>
>> <<<<<< length = 16<br>
>> <<<<<< data = 01:00:00:00:10:00:00:00:01:00:00:00:00:06:00:00<br>
>> ModemManager[2074]: [/dev/cdc-wdm0] Sent message (translated)...<br>
>> <<<<<< Header:<br>
>> <<<<<< length = 16<br>
>> <<<<<< type = open (0x00000001)<br>
>> <<<<<< transaction = 1<br>
>> <<<<<< Contents:<br>
>> <<<<<< max_control_transfer = 1536<br>
><br>
><br>
> And you get the MBIM Open Done reply (for transaction 1)....<br>
><br>
>> ModemManager[2074]: [/dev/cdc-wdm0] Received message...<br>
>>>>>>>> RAW:<br>
>>>>>>>> length = 16<br>
>>>>>>>> data = 01:00:00:80:10:00:00:00:01:00:00:00:00:00:00:00<br>
>> ModemManager[2074]: <debug> [1402407677.718576]<br>
>> [mm-broadband-modem-mbim.c:1281] parent_initialization_started_ready():<br>
>> Couldn't start parent initialization: Couldn't open ports during modem<br>
>> initialization: Couldn't get primary port<br>
>> ModemManager[2074]: <debug> [1402407677.718936]<br>
>> [mm-broadband-modem-mbim.c:210] modem_load_current_capabilities():<br>
>> loading current capabilities...<br>
><br>
> And you think you're good to go as the Open is ready, so you send a<br>
> new MBIM request (transaction 2)....<br>
><br>
>> ModemManager[2074]: [/dev/cdc-wdm0] Sent message...<br>
>> <<<<<< RAW:<br>
>> <<<<<< length = 48<br>
>> <<<<<< data =<br>
>> 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<br>
>> ModemManager[2074]: [/dev/cdc-wdm0] Sent message (translated)...<br>
>> <<<<<< Header:<br>
>> <<<<<< length = 48<br>
>> <<<<<< type = command (0x00000003)<br>
>> <<<<<< transaction = 2<br>
>> <<<<<< Fragment header:<br>
>> <<<<<< total = 1<br>
>> <<<<<< current = 0<br>
>> <<<<<< Contents:<br>
>> <<<<<< service =<br>
>> 'basic-connect' (a289cc33-bcbb-8b4f-b6b0-133ec2aae6df)<br>
>> <<<<<< cid = 'device-caps' (0x00000001)<br>
>> <<<<<< type = 'query' (0x00000000)<br>
><br>
><br>
> And, hey, you get yet another Open Done message for transaction 1; ok,<br>
> we can discard this one...<br>
><br>
>> ModemManager[2074]: [/dev/cdc-wdm0] Received message...<br>
>>>>>>>> RAW:<br>
>>>>>>>> length = 16<br>
>>>>>>>> data = 01:00:00:80:10:00:00:00:01:00:00:00:00:00:00:00<br>
>> ModemManager[2074]: [/dev/cdc-wdm0] No transaction matched in received<br>
>> message<br>
><br>
> But wtf, you still get yet another Open Done message, this time for<br>
> transaction 2?<br>
><br>
>> ModemManager[2074]: [/dev/cdc-wdm0] Received message...<br>
>>>>>>>> RAW:<br>
>>>>>>>> length = 16<br>
>>>>>>>> data = 01:00:00:80:10:00:00:00:02:00:00:00:00:00:00:00<br>
>> ModemManager[2074]: mbim_message_command_done_get_result: assertion<br>
>> 'MBIM_MESSAGE_GET_MESSAGE_TYPE (self) == MBIM_MESSAGE_TYPE_COMMAND_DONE'<br>
>> failed<br>
><br>
> I don't think I've covered this case in libmbim, truth be told. We<br>
> should definitely check if the request we expect matches not only<br>
> transaction ID but also the request type that we expect.<br>
><br>
> Don't know why this modem does this, though...<br>
><br>
<br>
<br>
</div></div>Pushed a patch to handle this issue to git master; Dan tested it already.<br>
<br>
Cheers!<br>
<div class="HOEnZb"><div class="h5"><br>
--<br>
Aleksander<br>
<a href="https://aleksander.es" target="_blank">https://aleksander.es</a><br>
_______________________________________________<br>
libmbim-devel mailing list<br>
<a href="mailto:libmbim-devel@lists.freedesktop.org">libmbim-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/libmbim-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/libmbim-devel</a><br>
</div></div></blockquote></div><br></div>