QMI via MBIM for "FCC Authentication" fix

Aleksander Morgado aleksander at aleksander.es
Sun Jul 26 23:57:19 PDT 2015


On Sat, Jul 25, 2015 at 12:55 AM, Collin McMillan <cmc at nd.edu> wrote:
>
> I have also read reports of some of these modems not supporting QMI, only
> MBIM.  I do have the latest firmware from Sierra.
>
> SO, I am now trying to get the QMI over MBIM procedure going, which is
> rumored to exist. :-)
> http://lists.freedesktop.org/archives/modemmanager-devel/2015-July/002087.html
>
> Apparently it is straight forward once you know what to do -- just send a
> QMI message to MBIM service d1a30bc2-f97a-6e43-bf65-c7e24fb0f0d3.  I can
> verify that my modem has this service with:
> mbimcli -d /dev/cdc-wdm0 --query-device-services
>
> This is where I am stuck.  I suppose this is not possible with mbimcli, so I
> am trying to write a utility using libmbim to send the QMI FCC auth command
> through MBIM.  Once I figure that out I am looking at adding that
> functionality to mbimcli.
>
> Would anyone on the list have a few more clues?  Specifically, do I need to
> create the QMI command to wrap in libqmi first, or can it be done manually?
> Is there a simplified/minimized API usage example somewhere for sending MBIM
> commands?  If not, mbimcli's code will do. :-)

Sending a message through an MbimDevice is just about calling
mbim_device_command() and getting the response with
mbim_device_command_finish(); mbimcli is full of examples for that.

The issue you have here is that QMI is not as easy; i.e. in order to
send the QMI DMS Set FCC Auth command you first need to allocate a DMS
client using the CTL service; then use the allocated DMS client ID in
the QMI DMS Set FCC Auth command, and then release the DMS client
using the CTL service again. I'm not sure if all these steps are
required when using QMI over MBIM, but I'd assume that's the case. And
the problem here is that all those steps (allocating DMS client,
building and sending DMS Set FCC Auth, releasing DMS client) are done
internally in libqmi. Otherwise, you'll need to use the raw QMI
message API to build those messages:
http://www.freedesktop.org/software/libqmi/libqmi-glib/1.12.0/libqmi-glib-QmiMessage.html

Anyway, if I were to do it, I'd instead try to mix both libqmi and
libmbim. E.g. Create a MbimDevice, which will take care of sending the
MBIM messages and receiving responses. But then also create a
QmiDevice, and pass the MbimDevice as 'transport' to the QmiDevice
somehow. Then you would be able to use the QmiDevice transparently,
using the underlying MbimDevice. This would require libqmi to depend
on libmbim, but we could do it conditional with a configure switch, I
don't think it's a big deal.

-- 
Aleksander
https://aleksander.es


More information about the libmbim-devel mailing list