QMI via MBIM for "FCC Authentication" fix

Collin McMillan cmc at nd.edu
Sat Aug 1 14:07:26 PDT 2015


Here is a utility that uses libmbim to issue the 0x555F command through the
QMI-over-MBIM service.

I also attached a patch for libmbim-1.12.2 that includes the QMI-over-MBIM
service.  Note that I had to modify the mbim-codegen files.  The function
_mbim_struct_builder_append_byte_array in mbim_message.c was padding the
output to multiples of 4. I had to add another flag (permit_padding) to
_mbim_struct_builder_append_byte_array and
_mbim_command_builder_append_byte_array, and the associated codegen files.
This alters the behavior so that types of unsized-byte-array are NOT
padded.  This could have unforeseen consequences, but all the tests still
passed...

With the new QMI-over-MBIM service in libmbim, it should not be that
difficult to add the MBIM layer to libqmi (famous last words).

I believe this patch and utility will fix this issue for modems that do not
cooperate on the QMI interface directly:
https://bugzilla.kernel.org/show_bug.cgi?id=92101

Collin


On Thu, Jul 30, 2015 at 5:49 PM, Bjørn Mork <bjorn at mork.no> wrote:

> Collin McMillan <cmc at nd.edu> writes:
>
> > Wait, hold that thought.  I made a silly mistake!  I was sending 0x555B,
> > when it should be 0x555F.  Relevant part of the new transaction log:
>
> Yes, I should have made it clearer that my trace was simply the example
> I had, and not the command you needed.
>
>
> > Sent to modem 0x555F request
> >
> > 03 00 00 00 3D 00 00 00 07 00 00 00 01 00 00 00 00 00 00 00 D1 A3 0B C2
> F9
> > 7A 6E 43 BF 65 C7 E2 4F B0 F0 D3 01 00 00 00 01 00 00 00 0D 00 00 00 01
> 0C
> > 00 00 02 14 00 01 00 5F 55 00 00
> >
> > Response recieved from modem
> >
> > 03 00 00 80 44 00 00 00 07 00 00 00 01 00 00 00 00 00 00 00 D1 A3 0B C2
> F9
> > 7A 6E 43 BF 65 C7 E2 4F B0 F0 D3 01 00 00 00 00 00 00 00 14 00 00 00 01
> 13
> > 00 80 02 14 02 01 00 5F 55 07 00 02 04 00 00 00 00 00
> >
> >
> > After this, it is necessary to reset the device (software detach and
> > reattach via USB authorized flag worked fine).  Then, I am able to
> > connect!  Finally!
> >
> > I will clean up my code and make a utility available for anyone else
> having
> > this problem.  Then I'll work on integrating it into libqmi to create a
> > "MBIM layer" for QMI commands.
>
> Great!
>
> FWIW, the 0x555B response you got can be decoded as:
>
>  01 25 00 80 02 03 02 06 00 5B 55 19 00 => header, message etc
>  02 04 00 00 00 00 00                   => status TLV, OK
>  10 01 00 0E                            => current USB comp is 14
>  11 0B 00 0A 01 06 07 08 09 0A 0B 0C 0E 13
>     => 10 supported compositions:  1, 6, 7, 8, 9, 10, 11, 12, 14 and 19
>
> That list is a bit unexpected to me, showing that I certainly don't
> understand how all this works. I didn't expect "1" since that is usually
> "HIP  DM    NMEA  AT    MDM1  MS" AFAIK.  But I guess it means something
> different in this modem.  And I don't understand why 15, 16, 17 and 18
> are missing since they are only dual-mode combinations of modes 6 to 12.
>
> It's very useful to get this kind of info from different modems, since
> we have to guess how the firmware works. There are obviously still a few
> pieces missing.
>
>
> Bjørn
> _______________________________________________
> libmbim-devel mailing list
> libmbim-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libmbim-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libmbim-devel/attachments/20150801/b9d62d20/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lpmutil.tar.gz
Type: application/x-gzip
Size: 7080 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libmbim-devel/attachments/20150801/b9d62d20/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libmbim-1.12.2.patch
Type: text/x-diff
Size: 18445 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libmbim-devel/attachments/20150801/b9d62d20/attachment-0001.patch>


More information about the libmbim-devel mailing list