Re: [MM] [PATCH 2/5] novatel: Use the ALLOWED_SINGLE_AT property. Saves 5 seconds on probing.

2012-05-07 Thread Dan Williams
On Sat, 2012-05-05 at 10:41 +0200, Bjørn Mork wrote:
 Dan Williams d...@redhat.com writes:
 
  Port layout of the Novatel 551L (LTE Band 13 device similar to the E362
  this Nathan's plugin targets, but USB instead of PCI-E minicard) is as
  follows:
 
  0: AT commands
  1: DM
  2: another DM
  3: unknown (probably QMI; doesn't respond to $GPS_START)
  4/5: CDC Ether
 
  Odd that we have two DM ports. If Intf3 is really QMI then we should
  make sure it's blacklisted in 'option' so we don't have to do
  serial-related junk with it.
 
 what sort of endpoins does interface 3 have?  Is the 4/5 configured as a

FF/FF/FF, bulk in+out, no interrupt

 standard CDC Ether class interface set with the appropriate CDC
 functional descriptors and class codes?  I assume it's configured using
 either AT commands or DM?

Yeah, standard CDC Ether, recognized fine by the kernel (but needs a
quirk for FLAG_WWAN).  AT commands set up the connection and then DHCP
is used to obtain IP addresses.

 I wonder... QMI could also be embedded in the CDC Ether control
 interface.  But then you should see CDC: unexpected notification 01!
 messages from time to time from cdc_ether, assuming that the device
 sends unsolicited indications.  Most (all?) QMI devices seem to do that.
 They send a QMI_CTL SYNC indication during startup at the very least.

I'll take a look, thanks for the suggestion.  The #5 CDC Data interface
does have an additional:

** UNRECOGNIZED:  2c ff 42 49 53 54 00 01 07 06 40 00 00 00 00
00 01 07 f4 01 02 08 f4 01 03 09 88 13 04 0a 10 27 05 0b 10 27 06 0c f4
01 07 0d f4 01

Dan


___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: [MM] [PATCH 2/5] novatel: Use the ALLOWED_SINGLE_AT property. Saves 5 seconds on probing.

2012-05-07 Thread Bjørn Mork
Dan Williams d...@redhat.com writes:

 On Sat, 2012-05-05 at 10:41 +0200, Bjørn Mork wrote:
 Dan Williams d...@redhat.com writes:
 
  Port layout of the Novatel 551L (LTE Band 13 device similar to the E362
  this Nathan's plugin targets, but USB instead of PCI-E minicard) is as
  follows:
 
  0: AT commands
  1: DM
  2: another DM
  3: unknown (probably QMI; doesn't respond to $GPS_START)
  4/5: CDC Ether
 
  Odd that we have two DM ports. If Intf3 is really QMI then we should
  make sure it's blacklisted in 'option' so we don't have to do
  serial-related junk with it.
 
 what sort of endpoins does interface 3 have?  Is the 4/5 configured as a

 FF/FF/FF, bulk in+out, no interrupt

Then it certainly isn't the QMI embedded in CDC that we have been
seeing so far.  It could of course still be QMI in some other wrapping,
but is that likely?

 standard CDC Ether class interface set with the appropriate CDC
 functional descriptors and class codes?  I assume it's configured using
 either AT commands or DM?

 Yeah, standard CDC Ether, recognized fine by the kernel (but needs a
 quirk for FLAG_WWAN).  AT commands set up the connection and then DHCP
 is used to obtain IP addresses.

 I wonder... QMI could also be embedded in the CDC Ether control
 interface.  But then you should see CDC: unexpected notification 01!
 messages from time to time from cdc_ether, assuming that the device
 sends unsolicited indications.  Most (all?) QMI devices seem to do that.
 They send a QMI_CTL SYNC indication during startup at the very least.

 I'll take a look, thanks for the suggestion.  The #5 CDC Data interface
 does have an additional:

 ** UNRECOGNIZED:  2c ff 42 49 53 54 00 01 07 06 40 00 00 00 00
 00 01 07 f4 01 02 08 f4 01 03 09 88 13 04 0a 10 27 05 0b 10 27 06 0c f4
 01 07 0d f4 01

Weird.  I've never actually made it through all of the CDC class specs,
but I believe there shouldn't ever be any extra descriptors on the data
interface, should there?  And I didn't think FF was a valid descriptor
type either.  Vendor-specific?  But how to you interpret that when you
don't even know whether it describes endpoint, interface or device?



Bjørn
___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: [MM] [PATCH 2/5] novatel: Use the ALLOWED_SINGLE_AT property. Saves 5 seconds on probing.

2012-05-05 Thread Bjørn Mork
Dan Williams d...@redhat.com writes:

 Port layout of the Novatel 551L (LTE Band 13 device similar to the E362
 this Nathan's plugin targets, but USB instead of PCI-E minicard) is as
 follows:

 0: AT commands
 1: DM
 2: another DM
 3: unknown (probably QMI; doesn't respond to $GPS_START)
 4/5: CDC Ether

 Odd that we have two DM ports. If Intf3 is really QMI then we should
 make sure it's blacklisted in 'option' so we don't have to do
 serial-related junk with it.

what sort of endpoins does interface 3 have?  Is the 4/5 configured as a
standard CDC Ether class interface set with the appropriate CDC
functional descriptors and class codes?  I assume it's configured using
either AT commands or DM?

I wonder... QMI could also be embedded in the CDC Ether control
interface.  But then you should see CDC: unexpected notification 01!
messages from time to time from cdc_ether, assuming that the device
sends unsolicited indications.  Most (all?) QMI devices seem to do that.
They send a QMI_CTL SYNC indication during startup at the very least.


Bjørn
___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: [MM] [PATCH 2/5] novatel: Use the ALLOWED_SINGLE_AT property. Saves 5 seconds on probing.

2012-05-04 Thread Dan Williams
On Wed, 2012-05-02 at 19:16 +0200, Bjørn Mork wrote:
 Nathan Williams n...@google.com writes:
  On Wed, May 2, 2012 at 6:11 AM, Aleksander Morgado 
  aleksan...@lanedo.comwrote:
 
  On 05/01/2012 06:07 PM, Nathan Williams wrote:
   Date: Thu, 22 Mar 2012 16:18:24 -0400
   Subject: [PATCH 2/5] novatel: Use the ALLOWED_SINGLE_AT property. Saves 5
seconds on probing.
 
  Is it that the modem exposes only one AT port? Or that it exposes
  multiple ports but only one is needed? The property was meant for the
  former case only, not for the latter.
 
 
  With this modem only one of the four exposed serial ports is an AT port. I
  believe the remaining ones are two Qualcomm things and GPS.
 
 That sounds very likely.  A wild guess based on similar devices is that
 the four ports are AT, QCDM, NMEA and QMI.  You could try writing
 $GPS_START to the suspected NMEA port and see if that enables output
 from the GPS.  QCDM could be tested using the tests in libqcdm (included
 with ModemManager).
 
 Testing for a QMI port is currenly non-trivial. You will have to modify
 the cdc-wdm or qmi_wwan drivers to bind to the device and see if it
 replies to QMI.  A nice test util for someone to write (I've been
 planning to, but haven't had the time and probably won't either...)
 would be something using libusb to send a CDC embedded QMI message (the
 subsystem version check looks like a good candidate) to a given
 device/interface.  Should be fairly easy to write.

Port layout of the Novatel 551L (LTE Band 13 device similar to the E362
this Nathan's plugin targets, but USB instead of PCI-E minicard) is as
follows:

0: AT commands
1: DM
2: another DM
3: unknown (probably QMI; doesn't respond to $GPS_START)
4/5: CDC Ether

Odd that we have two DM ports.  If Intf3 is really QMI then we should
make sure it's blacklisted in 'option' so we don't have to do
serial-related junk with it.

Dan


___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: [MM] [PATCH 2/5] novatel: Use the ALLOWED_SINGLE_AT property. Saves 5 seconds on probing.

2012-05-02 Thread Aleksander Morgado
On 05/01/2012 06:07 PM, Nathan Williams wrote:
 Date: Thu, 22 Mar 2012 16:18:24 -0400
 Subject: [PATCH 2/5] novatel: Use the ALLOWED_SINGLE_AT property. Saves 5
  seconds on probing.

Is it that the modem exposes only one AT port? Or that it exposes
multiple ports but only one is needed? The property was meant for the
former case only, not for the latter.


 
 Change-Id: I0b0c2cb07781eb32ba6eb4294868ed123f57fd9f
 ---
  plugins/novatel/mm-plugin-novatel.c |1 +
  1 files changed, 1 insertions(+), 0 deletions(-)
 
 diff --git a/plugins/novatel/mm-plugin-novatel.c 
 b/plugins/novatel/mm-plugin-novatel.c
 index 10fa6a6..ccec89c 100644
 --- a/plugins/novatel/mm-plugin-novatel.c
 +++ b/plugins/novatel/mm-plugin-novatel.c
 @@ -94,6 +94,7 @@ mm_plugin_create (void)
MM_PLUGIN_BASE_ALLOWED_SUBSYSTEMS, subsystems,
MM_PLUGIN_BASE_ALLOWED_PRODUCT_IDS, products,
MM_PLUGIN_BASE_ALLOWED_AT, TRUE,
 +  MM_PLUGIN_BASE_ALLOWED_SINGLE_AT, TRUE,

When SINGLE_AT is set, _AT is not needed; it's one or the other.

NULL));
  }
  


-- 
Aleksander
___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: [MM] [PATCH 2/5] novatel: Use the ALLOWED_SINGLE_AT property. Saves 5 seconds on probing.

2012-05-02 Thread Nathan Williams
On Wed, May 2, 2012 at 6:11 AM, Aleksander Morgado aleksan...@lanedo.comwrote:

 On 05/01/2012 06:07 PM, Nathan Williams wrote:
  Date: Thu, 22 Mar 2012 16:18:24 -0400
  Subject: [PATCH 2/5] novatel: Use the ALLOWED_SINGLE_AT property. Saves 5
   seconds on probing.

 Is it that the modem exposes only one AT port? Or that it exposes
 multiple ports but only one is needed? The property was meant for the
 former case only, not for the latter.


With this modem only one of the four exposed serial ports is an AT port. I
believe the remaining ones are two Qualcomm things and GPS.



 When SINGLE_AT is set, _AT is not needed; it's one or the other.


OK, will revise.

   - Nathan
___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: [MM] [PATCH 2/5] novatel: Use the ALLOWED_SINGLE_AT property. Saves 5 seconds on probing.

2012-05-02 Thread Aleksander Morgado
On 05/02/2012 04:53 PM, Nathan Williams wrote:
 On Wed, May 2, 2012 at 6:11 AM, Aleksander Morgado
 aleksan...@lanedo.com mailto:aleksan...@lanedo.com wrote:
 
 On 05/01/2012 06:07 PM, Nathan Williams wrote:
  Date: Thu, 22 Mar 2012 16:18:24 -0400
  Subject: [PATCH 2/5] novatel: Use the ALLOWED_SINGLE_AT property.
 Saves 5
   seconds on probing.
 
 Is it that the modem exposes only one AT port? Or that it exposes
 multiple ports but only one is needed? The property was meant for the
 former case only, not for the latter.
 
 
 With this modem only one of the four exposed serial ports is an AT port.
 I believe the remaining ones are two Qualcomm things and GPS.
 

Ah, good then.

  
 
 When SINGLE_AT is set, _AT is not needed; it's one or the other.
 
 
 OK, will revise.
 

Great, thanks.

-- 
Aleksander
___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: [MM] [PATCH 2/5] novatel: Use the ALLOWED_SINGLE_AT property. Saves 5 seconds on probing.

2012-05-02 Thread Nathan Williams
Updated patch attached.

- Nathan

On Wed, May 2, 2012 at 11:25 AM, Aleksander Morgado
aleksan...@lanedo.comwrote:

 On 05/02/2012 04:53 PM, Nathan Williams wrote:
  On Wed, May 2, 2012 at 6:11 AM, Aleksander Morgado
  aleksan...@lanedo.com mailto:aleksan...@lanedo.com wrote:
 
  On 05/01/2012 06:07 PM, Nathan Williams wrote:
   Date: Thu, 22 Mar 2012 16:18:24 -0400
   Subject: [PATCH 2/5] novatel: Use the ALLOWED_SINGLE_AT property.
  Saves 5
seconds on probing.
 
  Is it that the modem exposes only one AT port? Or that it exposes
  multiple ports but only one is needed? The property was meant for the
  former case only, not for the latter.
 
 
  With this modem only one of the four exposed serial ports is an AT port.
  I believe the remaining ones are two Qualcomm things and GPS.
 

 Ah, good then.

 
 
  When SINGLE_AT is set, _AT is not needed; it's one or the other.
 
 
  OK, will revise.
 

 Great, thanks.

 --
 Aleksander



0001-novatel-Use-the-ALLOWED_SINGLE_AT-property.-Saves-5-.patch
Description: Binary data
___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: [MM] [PATCH 2/5] novatel: Use the ALLOWED_SINGLE_AT property. Saves 5 seconds on probing.

2012-05-02 Thread Bjørn Mork
Nathan Williams n...@google.com writes:
 On Wed, May 2, 2012 at 6:11 AM, Aleksander Morgado 
 aleksan...@lanedo.comwrote:

 On 05/01/2012 06:07 PM, Nathan Williams wrote:
  Date: Thu, 22 Mar 2012 16:18:24 -0400
  Subject: [PATCH 2/5] novatel: Use the ALLOWED_SINGLE_AT property. Saves 5
   seconds on probing.

 Is it that the modem exposes only one AT port? Or that it exposes
 multiple ports but only one is needed? The property was meant for the
 former case only, not for the latter.


 With this modem only one of the four exposed serial ports is an AT port. I
 believe the remaining ones are two Qualcomm things and GPS.

That sounds very likely.  A wild guess based on similar devices is that
the four ports are AT, QCDM, NMEA and QMI.  You could try writing
$GPS_START to the suspected NMEA port and see if that enables output
from the GPS.  QCDM could be tested using the tests in libqcdm (included
with ModemManager).

Testing for a QMI port is currenly non-trivial. You will have to modify
the cdc-wdm or qmi_wwan drivers to bind to the device and see if it
replies to QMI.  A nice test util for someone to write (I've been
planning to, but haven't had the time and probably won't either...)
would be something using libusb to send a CDC embedded QMI message (the
subsystem version check looks like a good candidate) to a given
device/interface.  Should be fairly easy to write.



Bjørn
___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: [MM] [PATCH 2/5] novatel: Use the ALLOWED_SINGLE_AT property. Saves 5 seconds on probing.

2012-05-02 Thread Aleksander Morgado
On 05/02/2012 07:13 PM, Nathan Williams wrote:
 
 0001-novatel-Use-the-ALLOWED_SINGLE_AT-property.-Saves-5-.patch
 
 
 From ad53cf829f42a5570e8eab46bb1ab0065110f3d8 Mon Sep 17 00:00:00 2001
 From: Nathan Williams n...@chromium.org
 Date: Thu, 22 Mar 2012 16:18:24 -0400
 Subject: [PATCH] novatel: Use the ALLOWED_SINGLE_AT property. Saves 5 seconds
  on probing.
 
 Change-Id: I0b0c2cb07781eb32ba6eb4294868ed123f57fd9f

Pushed now, thanks.

-- 
Aleksander
___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: [MM] [PATCH 2/5] novatel: Use the ALLOWED_SINGLE_AT property. Saves 5 seconds on probing.

2012-05-02 Thread Aleksander Morgado

 Testing for a QMI port is currenly non-trivial. You will have to modify
 the cdc-wdm or qmi_wwan drivers to bind to the device and see if it
 replies to QMI.  A nice test util for someone to write (I've been
 planning to, but haven't had the time and probably won't either...)
 would be something using libusb to send a CDC embedded QMI message (the
 subsystem version check looks like a good candidate) to a given
 device/interface.  Should be fairly easy to write.
 

That check will possibly be done directly through libqmi/libqmi-glib. In
my libqmi-glib, opening a QmiDevice involves doing the subsystem version
check already.

-- 
Aleksander
___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: [MM] [PATCH 2/5] novatel: Use the ALLOWED_SINGLE_AT property. Saves 5 seconds on probing.

2012-05-02 Thread Bjørn Mork
Aleksander Morgado aleksan...@lanedo.com writes:

 Testing for a QMI port is currenly non-trivial. You will have to modify
 the cdc-wdm or qmi_wwan drivers to bind to the device and see if it
 replies to QMI.  A nice test util for someone to write (I've been
 planning to, but haven't had the time and probably won't either...)
 would be something using libusb to send a CDC embedded QMI message (the
 subsystem version check looks like a good candidate) to a given
 device/interface.  Should be fairly easy to write.
 

 That check will possibly be done directly through libqmi/libqmi-glib. In
 my libqmi-glib, opening a QmiDevice involves doing the subsystem version
 check already.

Yes, adding a libusb-based CDC driver backend in addition to the
character device backed would be useful, at least for testing and
verifying new devices.


Bjørn
___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


[MM] [PATCH 2/5] novatel: Use the ALLOWED_SINGLE_AT property. Saves 5 seconds on probing.

2012-05-01 Thread Nathan Williams



0002-novatel-Use-the-ALLOWED_SINGLE_AT-property.-Saves-5-.patch
Description: Binary data
___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list