[PATCH] telit: support QMI and MBIM modems
Aleksander Morgado
aleksander at aleksander.es
Mon Mar 27 15:45:50 UTC 2017
>>>>> Vendor specific plugins that support QMI or MBIM based devices need to
>>>>> handle the creation of these modems themselves.
>>>>>
>>>>> https://bugs.freedesktop.org/show_bug.cgi?id=100372
>>>>> ---
>>>>>
>>>>> Hey Carlo and Daniele,
>>>>>
>>>>> This patch makes the Telit plugin accept QMI and MBIM modems. Can any of you test it with such modems to make sure the Telit plugin is the one grabbing them?
>>>>>
>>>>
>>>> Sure, I can give it a try on Monday.
>>>>
>>>
>>> Applying your patch and testing with an mbim based I still see that
>>> the generic plugin is used
>>>
>>> daniele at L2122:~/git/ModemManager$ mmcli -L
>>>
>>> Found 1 modems:
>>> /org/freedesktop/ModemManager1/Modem/0 [Generic] MBIM [1BC7:0032]
>>>
>>> So in the log I found
>>>
>>> ModemManager[3807]: <debug> (Telit) [cdc-wdm0] filtered by implicit MBIM driver
>>>
>>> and added
>>>
>>> MM_PLUGIN_ALLOWED_QMI, TRUE,
>>> MM_PLUGIN_ALLOWED_MBIM, TRUE,
>>>
>>> in mm_plugin_create.
>>>
>>
>> Ouch, yes, that is needed.
>>
>>> I'm now seeing
>>>
>>> ModemManager[5758]: <debug> MBIM-powered Telit modem found...
>>>
>>> but also
>>>
>>> ModemManager[5758]: <warn> Couldn't start initialization: Cannot
>>> initialize: MBIM port went missing
>>> ModemManager[5758]: <warn> couldn't initialize the modem: 'Modem is
>>> unusable, cannot fully initialize'
>>>
>>> and the modem was not recognized.
>>>
>>
>> That is very weird. Do you have the full log around?
>>
>
> I did a new one with a qmi based device, but basically it is the same,
> you can find it here:
>
> https://pastebin.com/rqWhmgSR
>
> Mar 27 16:37:08 L2122 ModemManager[21199]: <warn> Couldn't start
> initialization: Cannot initialize: QMI port went missing
> ....
> Mar 27 16:37:08 L2122 ModemManager[21199]: <warn> couldn't initialize
> the modem: 'Modem is unusable, cannot fully initialize'
>
> This does not happen if I fix telit_grab_port.
>
Ah, so the issue doesn't happen either in MBIM or QMI if you fix
telit_grab_port() as you did? That is perfectly fine for me, actually
I guess that if grab_port() isn't fixed we're just flagging the port
as MM_PORT_TYPE_IGNORED, which is why you get the issue.
>>> I had also to fix telit_grab_port in order to take mbim, qmi and net
>>> ports. Does this make sense?
>>
>> Yes, it also makes sense...
>>
>> Could you share your latest additions and the full log you're getting?
>>
>
> Attached you can find the updated patch that just skips the port
> identification if the subsystem is not tty: not sure if this is the
> best approach...
>
Yes, that approach is fine I think; it should cover all the cases
where you do want port type hints (AT primary, AT secondary and NMEA).
So all looking good from my POV.
David, Dan, what do you guys think?
--
Aleksander
https://aleksander.es
More information about the ModemManager-devel
mailing list