Re: [PATCH 2/3] telit: add support for Dell VID in Telit plugin

2016-04-27 Thread Daniele Palmas
Hi Aleksander,

2016-04-27 21:20 GMT+02:00 Aleksander Morgado :
> On Wed, Apr 27, 2016 at 9:04 PM, Aleksander Morgado
>  wrote:
>> On Wed, Apr 27, 2016 at 4:36 PM, Daniele Palmas  wrote:
>>> This patch adds support for Dell VID in Telit plugin in order to provide
>>> Dell branded Telit modems support
>>> ---
>>
>> No, we don't want to do that.
>>
>> We now have a "Dell" plugin for 1.6.x in git master; this plugin has
>> the VID based filter, and what it does is detect which kind of modem
>> it is (QMI, MBIM, Ericsson, Novatel or Sierra). What we should do is
>> to treat the Telit support in the Dell plugin as we do for Sierra and
>> Novatel. Please check the Dell plugin to see how that goes (basically
>> just parsing GMI/CGMI output to match the real vendor) :)
>
> One of the rationales for this is to try to minimize the amount of
> changes required in the different plugins when new Dell-branded
> devices appear (we don't want to require new commits for each new
> modem VID/PID appearing in the wild). The Dell plugin should be
> intelligent enough to decide which manufacturer is really behind the
> device. In your case, you could just get the Dell plugin run the Telit
> plugin's custom init and create a MMBroadbandModemTelit afterwards.
> Maybe there's something that I'm not considering which prevents this
> from being possible?

I agree with you and I already have a patch that adds support for this
modem in Dell plugin: it just needs a bit of refactoring for Telit
plugin to export some functions, but I don't think this is a problem.

The real problem is that Dell plugin has poor probing performance with
a modem like HE910 that has 6 ttyACM ports, only two of which answers
to AT commands: there are three different commands (+GMI, +CGMI,
I1I2I3) that should be retried three times, since the ports are not
answering.

This means that the modem with Dell plugin is available after more
than 60 seconds, while with Telit one after about 10 seconds.

Is there a way to speed up port probing in Dell plugin without
changing it too much? I don't want to introduce regressions for other
Dell modems.

Thanks,
Daniele

>
> --
> Aleksander
> https://aleksander.es
___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel


Re: [PATCH 2/3] telit: add support for Dell VID in Telit plugin

2016-04-27 Thread Aleksander Morgado
On Wed, Apr 27, 2016 at 9:04 PM, Aleksander Morgado
 wrote:
> On Wed, Apr 27, 2016 at 4:36 PM, Daniele Palmas  wrote:
>> This patch adds support for Dell VID in Telit plugin in order to provide
>> Dell branded Telit modems support
>> ---
>
> No, we don't want to do that.
>
> We now have a "Dell" plugin for 1.6.x in git master; this plugin has
> the VID based filter, and what it does is detect which kind of modem
> it is (QMI, MBIM, Ericsson, Novatel or Sierra). What we should do is
> to treat the Telit support in the Dell plugin as we do for Sierra and
> Novatel. Please check the Dell plugin to see how that goes (basically
> just parsing GMI/CGMI output to match the real vendor) :)

One of the rationales for this is to try to minimize the amount of
changes required in the different plugins when new Dell-branded
devices appear (we don't want to require new commits for each new
modem VID/PID appearing in the wild). The Dell plugin should be
intelligent enough to decide which manufacturer is really behind the
device. In your case, you could just get the Dell plugin run the Telit
plugin's custom init and create a MMBroadbandModemTelit afterwards.
Maybe there's something that I'm not considering which prevents this
from being possible?

-- 
Aleksander
https://aleksander.es
___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel


Re: [PATCH 2/3] telit: add support for Dell VID in Telit plugin

2016-04-27 Thread Aleksander Morgado
On Wed, Apr 27, 2016 at 4:36 PM, Daniele Palmas  wrote:
> This patch adds support for Dell VID in Telit plugin in order to provide
> Dell branded Telit modems support
> ---

No, we don't want to do that.

We now have a "Dell" plugin for 1.6.x in git master; this plugin has
the VID based filter, and what it does is detect which kind of modem
it is (QMI, MBIM, Ericsson, Novatel or Sierra). What we should do is
to treat the Telit support in the Dell plugin as we do for Sierra and
Novatel. Please check the Dell plugin to see how that goes (basically
just parsing GMI/CGMI output to match the real vendor) :)

>  plugins/telit/mm-plugin-telit.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/plugins/telit/mm-plugin-telit.c b/plugins/telit/mm-plugin-telit.c
> index d9793d1..e704ad1 100644
> --- a/plugins/telit/mm-plugin-telit.c
> +++ b/plugins/telit/mm-plugin-telit.c
> @@ -354,7 +354,7 @@ mm_plugin_create (void)
>  {
>  static const gchar *subsystems[] = { "tty", NULL };
>  /* Vendors: Telit */
> -static const guint16 vendor_ids[] = { 0x1bc7, 0 };
> +static const guint16 vendor_ids[] = { 0x1bc7, 0x413c, 0 };
>  /* Only handle TELIT tagged devices here. */
>  static const gchar *udev_tags[] = {
>  "ID_MM_TELIT_TAGGED",
> --
> 2.8.1
>



-- 
Aleksander
https://aleksander.es
___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel


[PATCH 3/3] telit: add udev rule for supporting device 413c/81ba

2016-04-27 Thread Daniele Palmas
This patch adds the udev rule for using device 413c/81ba with Telit
plugin (dynamic port configuration)
---
 plugins/telit/77-mm-telit-port-types.rules | 4 
 1 file changed, 4 insertions(+)

diff --git a/plugins/telit/77-mm-telit-port-types.rules 
b/plugins/telit/77-mm-telit-port-types.rules
index 3ff6cce..a42d2a9 100644
--- a/plugins/telit/77-mm-telit-port-types.rules
+++ b/plugins/telit/77-mm-telit-port-types.rules
@@ -4,6 +4,7 @@ ACTION!="add|change|move", GOTO="mm_telit_port_types_end"
 SUBSYSTEM!="tty", GOTO="mm_telit_port_types_end"
 
 SUBSYSTEMS=="usb", ATTRS{idVendor}=="1bc7", GOTO="mm_telit_vendorcheck"
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="413c", GOTO="mm_telit_vendorcheck"
 GOTO="mm_telit_port_types_end"
 
 LABEL="mm_telit_vendorcheck"
@@ -47,6 +48,9 @@ ATTRS{idVendor}=="1bc7", ATTRS{idProduct}=="0021", 
ENV{ID_MM_TELIT_TAGGED}="1",
 # LE910 V2
 ATTRS{idVendor}=="1bc7", ATTRS{idProduct}=="0036", 
ENV{ID_MM_TELIT_TAGGED}="1", ENV{ID_MM_TELIT_PORTS_TAGGED}="1"
 
+# DW5580 (Dell branded Telit modem)
+ATTRS{idVendor}=="413c", ATTRS{idProduct}=="81ba", 
ENV{ID_MM_TELIT_TAGGED}="1", 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.
 
-- 
2.8.1

___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel


[PATCH 1/3] dell: forbid 413c/81ba modem in order to use Telit plugin

2016-04-27 Thread Daniele Palmas
413c/81ba is a Dell branded Telit modem that is better driven by Telit
plugin. This patch avoids the modem to be taken by Dell plugin.
---
 plugins/dell/mm-plugin-dell.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/plugins/dell/mm-plugin-dell.c b/plugins/dell/mm-plugin-dell.c
index ced1f3b..2e774d0 100644
--- a/plugins/dell/mm-plugin-dell.c
+++ b/plugins/dell/mm-plugin-dell.c
@@ -416,6 +416,8 @@ mm_plugin_create (void)
 {
 static const gchar *subsystems[] = { "tty", "net", "usb", NULL };
 static const guint16 vendors[] = { 0x413c, 0 };
+static const mm_uint16_pair forbidden_products[] = { { 0x413c, 0x81ba },
+ { 0, 0 } };
 static const MMAsyncMethod custom_init = {
 .async  = G_CALLBACK (dell_custom_init),
 .finish = G_CALLBACK (dell_custom_init_finish),
@@ -426,6 +428,7 @@ mm_plugin_create (void)
   MM_PLUGIN_NAME,  "Dell",
   MM_PLUGIN_ALLOWED_SUBSYSTEMS,subsystems,
   MM_PLUGIN_ALLOWED_VENDOR_IDS,vendors,
+  MM_PLUGIN_FORBIDDEN_PRODUCT_IDS, forbidden_products,
   MM_PLUGIN_ALLOWED_AT,TRUE,
   MM_PLUGIN_CUSTOM_INIT,   _init,
   MM_PLUGIN_ALLOWED_QCDM,  TRUE,
-- 
2.8.1

___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel


[PATCH 0/3] Add support for Dell branded device in Telit plugin

2016-04-27 Thread Daniele Palmas
This patch series adds support for Dell DW5580 (413c/81ba)
in Telit plugin.

DW5580 is a Dell branded Telit modem that should be better
driven by Telit plugin instead than Dell one.

Modem probing log and init at:

http://pastebin.com/J1d7yAZa

danielepa@L2094:~/$ mmcli -m 0

/org/freedesktop/ModemManager1/Modem/0 (device id 
'6cbde1fd5528b8c42cd2e18ffb690bfd894f13e3')
  -
  Hardware |   manufacturer: 'Telit'
   |  model: 'HE910-D'
   |   revision: '12.00.086'
   |  supported: 'gsm-umts'
   |current: 'gsm-umts'
   |   equipment id: '359658044004697'
  -
  System   | device: '/sys/devices/pci:00/:00:14.0/usb3/3-8'
   |drivers: 'cdc_acm, cdc_ether'
   | plugin: 'Telit'
   |   primary port: 'ttyACM0'
   |  ports: 'ttyACM3 (at), ttyACM4 (unknown), ttyACM5 
(unknown), ttyACM0 (at), ttyACM1 (unknown), ttyACM2 (unknown)'
  -
  Numbers  |   own : 'unknown'
  -
  Status   |   lock: 'none'
   | unlock retries: 'sim-pin (3), sim-puk (10)'
   |  state: 'disabled'
   |power state: 'on'
   |access tech: 'unknown'
   | signal quality: '0' (cached)
  -
  Modes|  supported: 'allowed: 2g; preferred: none
   |  allowed: 3g; preferred: none
   |  allowed: 2g, 3g; preferred: none'
   |current: 'allowed: 2g, 3g; preferred: none'
  -
  Bands|  supported: 'egsm, dcs, pcs, g850, u2100, u1900, u850, u900, 
u17iv'
   |current: 'egsm, dcs, u900'
  -
  IP   |  supported: 'ipv4, ipv6, ipv4v6'
  -
  3GPP |   imei: '359658044004697'
   |  enabled locks: 'none'
   |operator id: 'unknown'
   |  operator name: 'unknown'
   |   subscription: 'unknown'
   |   registration: 'unknown'
  -
  SIM  |   path: '/org/freedesktop/ModemManager1/SIM/0'

  -
  Bearers  |  paths: 'none'

Daniele Palmas (3):
  dell: forbid 413c/81ba modem in order to use Telit plugin
  telit: add support for Dell VID in Telit plugin
  telit: add udev rule for supporting device 413c/81ba

 plugins/dell/mm-plugin-dell.c  | 3 +++
 plugins/telit/77-mm-telit-port-types.rules | 4 
 plugins/telit/mm-plugin-telit.c| 2 +-
 3 files changed, 8 insertions(+), 1 deletion(-)

-- 
2.8.1

___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel