[PATCH] telit: support QMI and MBIM modems

Daniele Palmas dnlplm at gmail.com
Mon Mar 27 15:00:31 UTC 2017


Hi Aleksander,

2017-03-27 13:02 GMT+02:00 Aleksander Morgado <aleksander at aleksander.es>:
> On Mon, Mar 27, 2017 at 12:14 PM, Daniele Palmas <dnlplm at gmail.com> wrote:
>> 2017-03-24 15:33 GMT+01:00 Daniele Palmas <dnlplm at gmail.com>:
>>> Hi Aleksander,
>>>
>>> 2017-03-24 14:48 GMT+01:00 Aleksander Morgado <aleksander at aleksander.es>:
>>>> 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.

>> 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...

Full log here with the same modem of the previous log (but I tested
also a few MBIM):

https://pastebin.com/YRh8KLF2

daniele at L2122:~/git/ModemManager$ mmcli -m 0

/org/freedesktop/ModemManager1/Modem/0 (device id
'adb602d1ecc111f65d67431218fd1bddf97ed757')
  -------------------------
  Hardware |   manufacturer: 'QUALCOMM INCORPORATED'
           |          model: 'LE922A6-A1'
           |       revision: '24.00.201-B005  1  [Sep 21 2016 11:00:00]'
           |      supported: 'gsm-umts
           |                  lte
           |                  gsm-umts, lte'
           |        current: 'gsm-umts'
           |   equipment id: '357641079990891'
  -------------------------
  System   |         device: '/sys/devices/pci0000:00/0000:00:14.0/usb4/4-5'
           |        drivers: 'option1, qmi_wwan'
           |         plugin: 'Telit'
           |   primary port: 'cdc-wdm0'
           |          ports: 'ttyUSB0 (unknown), ttyUSB1 (unknown),
wwp0s20u5i2 (net), cdc-wdm0 (qmi), ttyUSB4 (at), ttyUSB2 (at), ttyUSB3
(at)'
  -------------------------
  Numbers  |           own : '9876543210'
  -------------------------
  Status   |           lock: 'sim-pin2'
           | unlock retries: 'sim-pin (3), sim-pin2 (3), sim-puk (10),
sim-puk2 (10)'
           |          state: 'connected'
           |    power state: 'on'
           |    access tech: 'umts'
           | signal quality: '36' (recent)
  -------------------------
  Modes    |      supported: 'allowed: 3g; preferred: none
           |                  allowed: 3g, 4g; preferred: none'
           |        current: 'allowed: 3g; preferred: none'
  -------------------------
  Bands    |      supported: 'u2100, u900, eutran-i, eutran-iii,
eutran-vii, eutran-xl'
           |        current: 'u2100, u900, eutran-i, eutran-iii,
eutran-vii, eutran-xl'
  -------------------------
  IP       |      supported: 'ipv4, ipv6, ipv4v6'
  -------------------------
  3GPP     |           imei: '357641079990891'
           |  enabled locks: 'none'
           |    operator id: '22201'
           |  operator name: 'TIM'
           |   subscription: 'unknown'
           |   registration: 'home'
  -------------------------
  SIM      |           path: '/org/freedesktop/ModemManager1/SIM/0'

  -------------------------
  Bearers  |          paths: '/org/freedesktop/ModemManager1/Bearer/0'


Daniele

>
> --
> Aleksander
> https://aleksander.es
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-telit-support-QMI-and-MBIM-modems.patch
Type: text/x-patch
Size: 5078 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/modemmanager-devel/attachments/20170327/db982c5a/attachment-0001.bin>


More information about the ModemManager-devel mailing list