<div dir="ltr"><div><div>Hi libmbim-ers,<br><br></div>Here is an updated patch that includes a missing file (sorry!).<br><br></div>Collin<br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Aug 2, 2015 at 9:29 AM, Collin McMillan <span dir="ltr"><<a href="mailto:cmc@nd.edu" target="_blank">cmc@nd.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Sun, Aug 2, 2015 at 6:28 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"><span>On Sat, Aug 1, 2015 at 11:07 PM, Collin McMillan <<a href="mailto:cmc@nd.edu" target="_blank">cmc@nd.edu</a>> wrote:<br>
> Here is a utility that uses libmbim to issue the 0x555F command through the<br>
> QMI-over-MBIM service.<br>
><br>
> I also attached a patch for libmbim-1.12.2 that includes the QMI-over-MBIM<br>
> service. Note that I had to modify the mbim-codegen files. The function<br>
> _mbim_struct_builder_append_byte_array in mbim_message.c was padding the<br>
> output to multiples of 4. I had to add another flag (permit_padding) to<br>
> _mbim_struct_builder_append_byte_array and<br>
> _mbim_command_builder_append_byte_array, and the associated codegen files.<br>
> This alters the behavior so that types of unsized-byte-array are NOT padded.<br>
> This could have unforeseen consequences, but all the tests still passed...<br>
><br>
> With the new QMI-over-MBIM service in libmbim, it should not be that<br>
> difficult to add the MBIM layer to libqmi (famous last words).<br>
><br>
> I believe this patch and utility will fix this issue for modems that do not<br>
> cooperate on the QMI interface directly:<br>
> <a href="https://bugzilla.kernel.org/show_bug.cgi?id=92101" rel="noreferrer" target="_blank">https://bugzilla.kernel.org/show_bug.cgi?id=92101</a><br>
<br>
</span>Looks pretty good!<br>
<br>
The libmbim patch has some wrong indentations (using tabs instead of<br>
spaces), but I can clean that up myself.<br></blockquote><div><br></div></span><div>Oh yes, I suppose so. If I made other mistakes, let me know and I'll fix them.<br></div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Your tool is also good, but why not add it as a new command to<br>
mbimcli? we could have a new "--qmi-dms-set-fcc-authentication"<br>
action; I think it's totally worth it, even as it is without the QMI<br>
over MBIM transport logic.<span><font color="#888888"><br></font></span></blockquote><div><br></div></span><div>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.<br><br></div><div>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.<br><br></div><div>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).<br><br></div><div>In any case thanks very much for your and Bjorn's advice! I am happily sending this email from my now-LTE-enabled laptop! :-)<span class="HOEnZb"><font color="#888888"><br><br></font></span></div><span class="HOEnZb"><font color="#888888"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span><font color="#888888">
--<br>
Aleksander<br>
<a href="https://aleksander.es" rel="noreferrer" target="_blank">https://aleksander.es</a><br>
</font></span></blockquote></font></span></div><br></div></div>
</blockquote></div><br></div>