[PATCH] telit: support QMI and MBIM modems
Carlo Lobrano
c.lobrano at gmail.com
Fri Mar 24 14:05:19 UTC 2017
well, actually, I double checked and that model does not have Telit VID
Carlo
Il venerdì 24 marzo 2017, Carlo Lobrano <c.lobrano at gmail.com> ha scritto:
> Hi Aleksander,
>
> > I have a LN930 that I can switch to MBIM mode, but it exposes Intel's
> VID, not the Telit VID. Do you know if this would be something happening to
> all MBIM-capable Telit modems?
>
> this shouldn't happen. How do you switch to MBIM mode?
>
> Carlo
>
> Il venerdì 24 marzo 2017, Aleksander Morgado <aleksander at aleksander.es
> <javascript:_e(%7B%7D,'cvml','aleksander at aleksander.es');>> ha scritto:
>
>> 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?
>>
>> I have a LN930 that I can switch to MBIM mode, but it exposes Intel's
>> VID, not the Telit VID. Do you know if this would be something happening to
>> all MBIM-capable Telit modems?
>>
>> Cheers!
>>
>> ---
>> plugins/telit/77-mm-telit-port-types.rules | 3 ---
>> plugins/telit/mm-plugin-telit.c | 33
>> +++++++++++++++++++++++++++++-
>> 2 files changed, 32 insertions(+), 4 deletions(-)
>>
>> diff --git a/plugins/telit/77-mm-telit-port-types.rules
>> b/plugins/telit/77-mm-telit-port-types.rules
>> index 36a4f99f..1b58a3d9 100644
>> --- a/plugins/telit/77-mm-telit-port-types.rules
>> +++ b/plugins/telit/77-mm-telit-port-types.rules
>> @@ -51,7 +51,4 @@ ATTRS{idVendor}=="1bc7", ATTRS{idProduct}=="0022",
>> ENV{ID_MM_TELIT_PORTS_TAGGED}
>> ATTRS{idVendor}=="1bc7", ATTRS{idProduct}=="0036",
>> ENV{ID_MM_TELIT_TAGGED}="1"
>> ATTRS{idVendor}=="1bc7", ATTRS{idProduct}=="0036",
>> ENV{ID_MM_TELIT_PORTS_TAGGED}="1"
>>
>> -# NOTE: Qualcomm Gobi-based devices like the LE920 should not be handled
>> -# by this plugin, but by the Gobi plugin.
>> -
>> LABEL="mm_telit_port_types_end"
>> diff --git a/plugins/telit/mm-plugin-telit.c
>> b/plugins/telit/mm-plugin-telit.c
>> index ec3c024f..abb87e4f 100644
>> --- a/plugins/telit/mm-plugin-telit.c
>> +++ b/plugins/telit/mm-plugin-telit.c
>> @@ -28,6 +28,15 @@
>> #include "mm-common-telit.h"
>> #include "mm-broadband-modem-telit.h"
>>
>> +
>> +#if defined WITH_QMI
>> +# include "mm-broadband-modem-qmi.h"
>> +#endif
>> +
>> +#if defined WITH_MBIM
>> +# include "mm-broadband-modem-mbim.h"
>> +#endif
>> +
>> G_DEFINE_TYPE (MMPluginTelit, mm_plugin_telit, MM_TYPE_PLUGIN)
>>
>> MM_PLUGIN_DEFINE_MAJOR_VERSION
>> @@ -44,6 +53,28 @@ create_modem (MMPlugin *self,
>> GList *probes,
>> GError **error)
>> {
>> +#if defined WITH_QMI
>> + if (mm_port_probe_list_has_qmi_port (probes)) {
>> + mm_dbg ("QMI-powered Telit modem found...");
>> + return MM_BASE_MODEM (mm_broadband_modem_qmi_new (uid,
>> + drivers,
>> +
>> mm_plugin_get_name (self),
>> + vendor,
>> + product));
>> + }
>> +#endif
>> +
>> +#if defined WITH_MBIM
>> + if (mm_port_probe_list_has_mbim_port (probes)) {
>> + mm_dbg ("MBIM-powered Telit modem found...");
>> + return MM_BASE_MODEM (mm_broadband_modem_mbim_new (uid,
>> + drivers,
>> +
>> mm_plugin_get_name (self),
>> + vendor,
>> + product));
>> + }
>> +#endif
>> +
>> return MM_BASE_MODEM (mm_broadband_modem_telit_new (uid,
>> drivers,
>>
>> mm_plugin_get_name (self),
>> @@ -56,7 +87,7 @@ create_modem (MMPlugin *self,
>> G_MODULE_EXPORT MMPlugin *
>> mm_plugin_create (void)
>> {
>> - static const gchar *subsystems[] = { "tty", NULL };
>> + static const gchar *subsystems[] = { "tty", "net", "usb", NULL };
>> /* Vendors: Telit */
>> static const guint16 vendor_ids[] = { 0x1bc7, 0 };
>> static const gchar *vendor_strings[] = { "telit", NULL };
>> --
>> 2.12.0
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/modemmanager-devel/attachments/20170324/bae3ffe4/attachment.html>
More information about the ModemManager-devel
mailing list