QMI via MBIM for "FCC Authentication" fix

Collin McMillan cmc at nd.edu
Wed Aug 12 07:27:05 PDT 2015

Hi libmbim-ers,

Here is an updated patch that includes a missing file (sorry!).


On Sun, Aug 2, 2015 at 9:29 AM, Collin McMillan <cmc at nd.edu> wrote:

> On Sun, Aug 2, 2015 at 6:28 AM, Aleksander Morgado <
> aleksander at aleksander.es> wrote:
>> On Sat, Aug 1, 2015 at 11:07 PM, Collin McMillan <cmc at nd.edu> wrote:
>> > 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
>> Looks pretty good!
>> The libmbim patch has some wrong indentations (using tabs instead of
>> spaces), but I can clean that up myself.
> Oh yes, I suppose so.  If I made other mistakes, let me know and I'll fix
> them.
>> Your tool is also good, but why not add it as a new command to
>> mbimcli? we could have a new "--qmi-dms-set-fcc-authentication"
>> action; I think it's totally worth it, even as it is without the QMI
>> over MBIM transport logic.
> I'm not sure the best way to go from here.  What I would really like is if
> ModemManager automatically did this on startup.  I know that ModemManager
> already does this for proper QMI modems -- it somehow detects if the modem
> is in LPM, and runs the FCC command via QMI.  No reason it couldn't be
> updated to do it through QMI-over-MBIM as well.
> If memory serves, ModemManager uses libqmi to do this.  If so, would it be
> prudent to have the conversion handled automatically in libqmi?  In theory
> it would require no changes to ModemManager, as the interface could be used
> transparently.
> On the other hand, perhaps I could update *both* ModemManager and mbimcli
> to use the libmbim QMI-over-MBIM service?  That would essentially mean
> putting the utility code in two places though.  So the choice is either
> duplicate code (bad), or having libqmi use libmbim thus increasing the
> number of dependencies (also bad).
> In any case thanks very much for your and Bjorn's advice!  I am happily
> sending this email from my now-LTE-enabled laptop! :-)
>> --
>> Aleksander
>> https://aleksander.es
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libmbim-devel/attachments/20150812/522346be/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lpmutil.tar.gz
Type: application/x-gzip
Size: 7455 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libmbim-devel/attachments/20150812/522346be/attachment.bin>

More information about the libmbim-devel mailing list