Author Message

<  Device Information  ~  trouble with netgear aircard 779S

PostPosted: Tue May 02, 2017 12:35 am Reply with quote
Posts: 8 Joined: Tue May 02, 2017 12:06 am
Hi,
I'm trying to get usb_modeswitch working with a Netgear aircard 779S. The modem gets switched OK in windows from:
idVendor - 0x0846
idProduct - 0x0fff
to
idVendor - 0x0846
idProduct - 0x68d3

and the windows machine gets an IP and goes online OK so the modem is definitely working OK.
I believe I captured the right command string using USBPcap on the PC and examining the messages using wireshark:
command string - "55534243d02b23092400000080000612000000240000000000000000000000"
endpoint - 0x01

I installed usb-modeswitch and usb-modeswitch-data packages on my ubuntu laptop (running 14.04.2 LTS) and
don't see the vendor/product so I tried running usb_modeswitch from the command line:
root@ThinkPad-W520:/var# /usr/sbin/usb_modeswitch -I --verbose --default-vendor 0x0846 --default-product 0x0fff --message-endpoint 0x01 --message-content "55534243d02b23092400000080000612000000240000000000000000000000"

it returns:

Take all parameters from the command line


* usb_modeswitch: handle USB devices with multiple modes
* Version 2.1.1 (C) Josua Dietze 2014
* Based on libusb1/libusbx

! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor= 0x0846
DefaultProduct= 0x0fff
MessageEndpoint=0x01
MessageContent="55534243d02b23092400000080000612000000240000000000000000000000"
NeedResponse=0

InquireDevice=1

Look for default devices ...
found USB ID 8087:0024
found USB ID 1d6b:0002
found USB ID 1d6b:0003
found USB ID 0846:0fff
vendor ID matched
product ID matched
found USB ID 1d6b:0002
found USB ID 04f2:b217
found USB ID 147e:2016
found USB ID 8087:0024
found USB ID 1d6b:0002
Found devices in default mode (1)
Access device 002 on bus 003
Current configuration number is 1
Use interface number 9
Use endpoints 0x01 (out) and 0x81 (in)
Inquire device details; driver will be detached ...
Looking for active driver ...
No active driver found. Detached before or never attached
Could not claim interface (error -6). Skip device inquiry

USB description data (for identification)
-------------------------
Manufacturer: NETGEAR
Product: AirCard 779S
Serial No.: xxxxxx (removed)
-------------------------
Looking for active driver ...
No active driver found. Detached before or never attached
Set up interface 9
Could not claim interface (error -6). Skip message sending
-> Run lsusb to note any changes. Bye!

running lsusb still shows the same vendor/product. I'm unsure why its
trying 'interface 9' versus the default 'interface 0'? There definitely
seems to be a problem with the interface however, since I get:
'Skip message sending'

I installed the usbmon module on my laptop and ran wireshark while
running the usb_modeswitch command and indeed don't see a USBC
message with the tag - d02b2309 so the command isn't being sent.

Any help to debug this further would be appreciated!


Offline
PostPosted: Tue May 02, 2017 1:49 pm Reply with quote
Posts: 1175 Joined: Wed Jul 11, 2012 3:14 pm Location: Koh Samui, TH
Interface 9 should be ok for a Sierra/NetGear device because they are using interface numbers fixed to functions and storage function is always interface number 9 even if it is the only interface.
I'm not sure if your kernel or libusb can handle that value properly though.
Which linux kernel version is your Ubuntu 14.04 running?

Please show the output from lsusb -vd 0846:0fff


Offline
PostPosted: Tue May 02, 2017 2:24 pm Reply with quote
Posts: 8 Joined: Tue May 02, 2017 12:06 am
hello LOM,
thanks for the reply. My laptop runs kernel 3.13.0-46-generic

I triend the Netgear 779S on a different machine - a server running
Ubuntu 16.04.2 LTS (kernel 4.4.0-62-generic) and I get the same
issue with interface 9:

root@mythtv:~# /usr/sbin/usb_modeswitch -I --verbose --default-vendor 0x0846 --default-product 0x0fff --message-endpoint 0x01 --message-content "55534243d02b23092400000080000612000000240000000000000000000000"
Take all parameters from the command line


* usb_modeswitch: handle USB devices with multiple modes
* Version 2.2.5 (C) Josua Dietze 2015
* Based on libusb1/libusbx

! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor= 0x0846
DefaultProduct= 0x0fff
MessageEndpoint=0x01
MessageContent="55534243d02b23092400000080000612000000240000000000000000000000"
NeedResponse=0

InquireDevice=1

Look for default devices ...
found USB ID 0846:0fff
vendor ID matched
product ID matched
found USB ID 1d6b:0002
found USB ID 046d:c064
found USB ID 1d6b:0001
Found devices in default mode (1)
Access device 005 on bus 001
Current configuration number is 1
Use interface number 9
Use endpoints 0x01 (out) and 0x81 (in)
Inquire device details; driver will be detached ...
Looking for active driver ...
No active driver found. Detached before or never attached
Could not claim interface (error -6). Skip device inquiry

USB description data (for identification)
-------------------------
Manufacturer: NETGEAR
Product: AirCard 779S
Serial No.: xxxxxx
-------------------------
Looking for active driver ...
No active driver found. Detached before or never attached
Set up interface 9
Could not claim interface (error -6). Skip message sending
-> Run lsusb to note any changes. Bye!

root@mythtv:~#



here's the lsusb output (w/o serial #):
root@mythtv:~# lsusb -vd 0846:0fff
Code:
Bus 001 Device 005: ID 0846:0fff NetGear, Inc.
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x0846 NetGear, Inc.
  idProduct          0x0fff
  bcdDevice            0.06
  iManufacturer           1 NETGEAR
  iProduct                2 AirCard 779S
  iSerial                 3 xxxxxxxx
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           32
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        9
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk-Only
      iInterface             20 Mass Storage
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               1
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0000
  (Bus Powered)

root@mythtv:~#


Offline
PostPosted: Tue May 02, 2017 4:06 pm Reply with quote
Posts: 1175 Joined: Wed Jul 11, 2012 3:14 pm Location: Koh Samui, TH
Libusb error -6 = "Resource busy" which it shouldn't be unless the storage driver ran into problem when probing the device and is continuously looping in probe. Check your dmesg, it may indicate something like that.

The Sierra initial id 1199:0fff is included in usb_modeswitch but is actually switched long before usb_modeswitch sees it, it is handled by unusual_devs.h (and sierra_ms.c ) which is part of the usb storage driver so switching occurs as soon as the driver is loaded and before it has a chance to probe the device.
The only difference between your Netgear branded device and Sierra devices is the usb vendor id, they do apart from that share the same code so I wonder if Sierra devices under NetGears vendor id should also be handled by unusual_devs and not usb_modeswitch.

If you are able to compile linux then you could do a test by replacing the Sierra vendor id with that of NetGear in unusual_devs and build a new storage module.
Otherwise wait for Josh to pop in, he may have a better idea than me.


Offline
PostPosted: Wed May 03, 2017 5:47 pm Reply with quote
Posts: 8 Joined: Tue May 02, 2017 12:06 am
LOM,

thanks for the insight... I didn't realize that the Netgear modem was actually a Sierra inside.
I was a bit rusty on building the kernel, but was successful in duplicating the lines in
unusual_devs.h pertaining to the Sierra, but inserted the Netgear vendor ID - 0x0846.
After booting the new kernel and inserting the modem now I see (with dmesg):

****
[ 55.947235] usb 1-5: new high-speed USB device number 5 using ehci-pci
[ 56.064988] usb 1-5: config 1 has an invalid interface number: 9 but max is 0
[ 56.064994] usb 1-5: config 1 has no interface number 0
[ 56.066626] usb 1-5: New USB device found, idVendor=0846, idProduct=0fff
[ 56.066631] usb 1-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 56.066633] usb 1-5: Product: AirCard 779S
[ 56.066635] usb 1-5: Manufacturer: NETGEAR
[ 56.066636] usb 1-5: SerialNumber: xxxxxx
[ 56.072282] usb-storage 1-5:1.9: USB Mass Storage device detected
[ 56.077045] usb-storage: probe of 1-5:1.9 failed with error -5
[ 56.101905] usb 1-5: USB disconnect, device number 5
[ 56.123391] usbcore: registered new interface driver uas
[ 56.495157] usb 1-5: new high-speed USB device number 6 using ehci-pci
[ 56.616182] usb 1-5: config 1 has an invalid interface number: 3 but max is 2
[ 56.616187] usb 1-5: config 1 has an invalid interface number: 8 but max is 2
[ 56.616189] usb 1-5: config 1 has no interface number 1
[ 56.616191] usb 1-5: config 1 has no interface number 2
[ 56.617523] usb 1-5: New USB device found, idVendor=0846, idProduct=68d3
[ 56.617527] usb 1-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 56.617529] usb 1-5: Product: AirCard 779S
[ 56.617530] usb 1-5: Manufacturer: NETGEAR
[ 56.617532] usb 1-5: SerialNumber: xxxxx
****

I don't see the AirCard getting associated with a serial device (i.e. /dev/ttyUSB0 or..)

here's the output of lsusb -vd:
[root@mythtv pci]# lsusb -vd 0846:68d3
Code:
Bus 001 Device 006: ID 0846:68d3 NetGear, Inc.
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x0846 NetGear, Inc.
  idProduct          0x68d3
  bcdDevice            0.06
  iManufacturer           1 NETGEAR
  iProduct                2 AirCard 779S
  iSerial                 3 xxxxxx
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          111
    bNumInterfaces          3
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        3
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0
      bInterfaceProtocol      0
      iInterface              0
      ** UNRECOGNIZED:  05 24 00 10 01
      ** UNRECOGNIZED:  05 24 01 00 00
      ** UNRECOGNIZED:  04 24 02 02
      ** UNRECOGNIZED:  05 24 06 00 00
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x000c  1x 12 bytes
        bInterval               9
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        8
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x84  EP 4 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x000a  1x 10 bytes
        bInterval               9
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x85  EP 5 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0000
  (Bus Powered)

[root@mythtv pci]#

I'm wondering if I have to modify/patch sierra.c as well (usb serial
driver code?) The Sierra Vendor ID (0x1199) appears there too - perhaps
I'd have to add code for the Netgear vendorID (0x0846) there too?
If this is the wrong place for these questions is there another forum
you can point me to where I should ask?

thanks!


Offline
PostPosted: Wed May 03, 2017 7:57 pm Reply with quote
Posts: 1175 Joined: Wed Jul 11, 2012 3:14 pm Location: Koh Samui, TH
rorem wrote:

I don't see the AirCard getting associated with a serial device (i.e. /dev/ttyUSB0 or..)



There is one interface missing in your verbose lsusb listing but that is because you have not enabled the GPS/GNSS function in the device. Windows drivers describes the interfaces as:

MI_00 NETGEAR DM Port (Device Management, for instance for flashing new firmware)
MI_02 NETGEAR NMEA Port (GPS)
MI_03 NETGEAR WWAN Modem (serial ppp dial-up)
MI_08 NETGEAR WWAN Network Adapter

where the 3 first are of serial type and should be handled either by the usb serial driver named option or sierra while the last one is a direct network connection which should be handled by the net usb driver named qmi_wwan.
The device is currently not supported in these drivers but you can add it in /drivers/net/usb/qmi_wwan.c in the section with header:
/* 3. Combined interface devices matching on interface number */

You'll find other Sierra 1199 device there and can make a similar entry for your device and then re-compile the driver. There is not much use in doing the same for the serial driver since this is a LTE CAT3 device which gives you speeds that serial ppp modem cant cope with.

qmi_wwan will create a wwan0 network interface and it will also invoke the cdc_wdm helper driver which will create the character device /dev/cdc-wdm0 that is used by libqmi for issuing cmds and getting status for the qmi connection. Your dmesg will clearly show when these drivers are binding.

You can use linux NetworkManager to manage the connection, you are likely to get a private ip address from AC779S LAN dhcp server, an ip address which is in the same LAN segment as AC779S wifi.


Offline
PostPosted: Thu May 04, 2017 6:56 am Reply with quote
Posts: 8 Joined: Tue May 02, 2017 12:06 am
thanks LOM..

I added the extra line in qmi_wwan.c as you suggested for the Netgear Vendor & Product ID and
interface 8 and recompiled. Booting into that new kernel (and adding the NetworkManager-wwan
package) I get this new network device when I plug in the Aircard:

wwp0s2f1u5i8: flags=4098<BROADCAST,MULTICAST> mtu 1500
ether e2:f2:1b:02:25:14 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

it doesn't install 'UP' nor does it get an IP address. I tried setting it 'UP' and manually
running 'dhclient wwp0s2f1u5i8' [it times out]. I also tried manually setting an IP
address on the LAN net defined for the Aircard and that doesn't work either. I installed
libqmi-utils and ran some qmicli queries:
[root@mythtv ~]# qmicli -d /dev/cdc-wdm0 --dms-get-manufacturer
[/dev/cdc-wdm0] Device manufacturer retrieved:
Manufacturer: 'NETGEAR'
[root@mythtv ~]# qmicli -d /dev/cdc-wdm0 --dms-get-capabilities
[/dev/cdc-wdm0] Device capabilities retrieved:
Max TX channel rate: '50000000'
Max RX channel rate: '100000000'
Data Service: 'non-simultaneous-cs-ps'
SIM: 'supported'
Networks: 'lte'
[root@mythtv ~]# qmicli -d /dev/cdc-wdm0 --dms-get-operating-mode
[/dev/cdc-wdm0] Operating mode retrieved:
Mode: 'online'
HW restricted: 'no'
[root@mythtv ~]#

here's the relevant /var/log/messages lines:
May 3 23:43:04 mythtv kernel: usb 1-5: new high-speed USB device number 5 using ehci-pci
May 3 23:43:04 mythtv kernel: usb 1-5: config 1 has an invalid interface number: 9 but max is 0
May 3 23:43:04 mythtv kernel: usb 1-5: config 1 has no interface number 0
May 3 23:43:04 mythtv kernel: usb 1-5: New USB device found, idVendor=0846, idProduct=0fff
May 3 23:43:04 mythtv kernel: usb 1-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
May 3 23:43:04 mythtv kernel: usb 1-5: Product: AirCard 779S
May 3 23:43:04 mythtv kernel: usb 1-5: Manufacturer: NETGEAR
May 3 23:43:04 mythtv kernel: usb 1-5: SerialNumber: xxxxxx
May 3 23:43:04 mythtv kernel: usb-storage 1-5:1.9: USB Mass Storage device detected
May 3 23:43:04 mythtv kernel: usb-storage: probe of 1-5:1.9 failed with error -5
May 3 23:43:04 mythtv kernel: usb 1-5: USB disconnect, device number 5
May 3 23:43:04 mythtv kernel: usbcore: registered new interface driver uas
May 3 23:43:05 mythtv kernel: usb 1-5: new high-speed USB device number 6 using ehci-pci
May 3 23:43:05 mythtv kernel: usb 1-5: config 1 has an invalid interface number: 3 but max is 2
May 3 23:43:05 mythtv kernel: usb 1-5: config 1 has an invalid interface number: 8 but max is 2
May 3 23:43:05 mythtv kernel: usb 1-5: config 1 has no interface number 1
May 3 23:43:05 mythtv kernel: usb 1-5: config 1 has no interface number 2
May 3 23:43:05 mythtv kernel: usb 1-5: New USB device found, idVendor=0846, idProduct=68d3
May 3 23:43:05 mythtv kernel: usb 1-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
May 3 23:43:05 mythtv kernel: usb 1-5: Product: AirCard 779S
May 3 23:43:05 mythtv kernel: usb 1-5: Manufacturer: NETGEAR
May 3 23:43:05 mythtv kernel: usb 1-5: SerialNumber: xxxxxx
May 3 23:43:05 mythtv kernel: usbcore: registered new interface driver cdc_wdm
May 3 23:43:05 mythtv kernel: qmi_wwan 1-5:1.8: cdc-wdm0: USB WDM device
May 3 23:43:05 mythtv kernel: qmi_wwan 1-5:1.8 wwan0: register 'qmi_wwan' at usb-0000:00:02.1-5, WWAN/QMI device, e2:f2:1b:02:25:14
May 3 23:43:05 mythtv kernel: usbcore: registered new interface driver qmi_wwan

the first time booting (before I added the NetworkManager-wwan package) I got these log msgs:
May 3 21:49:51 mythtv NetworkManager[812]: <info> [1493866191.0025] manager: (wwan0): 'wwan' plugin not available; creating generic device
May 3 21:49:51 mythtv NetworkManager[812]: <info> [1493866191.0082] manager: (wwan0): new Generic device (/org/freedesktop/NetworkManager/Devices/2)
May 3 21:49:51 mythtv kernel: usbcore: registered new interface driver qmi_wwan
May 3 21:49:51 mythtv NetworkManager[812]: <info> [1493866191.0294] device (wwan0): interface index 3 renamed iface from 'wwan0' to 'wwp0s2f1u5i8'


any ideas as to what I'm missing?
thanks again.


Offline
PostPosted: Thu May 04, 2017 7:38 am Reply with quote
Site Admin Posts: 6443 Joined: Sat Nov 03, 2007 12:30 am
It doesn't look like anything is missing on the lower levels.

I think this is a matter best raised in a Redhat forum where the Network Manager is maintained (if I'm not mistaken).

Of course you could go the tedious way by establishing the connection with qmicli in a script (it's possible).


Offline
PostPosted: Thu May 04, 2017 8:26 am Reply with quote
Posts: 1175 Joined: Wed Jul 11, 2012 3:14 pm Location: Koh Samui, TH
I have asked Bjorn Mork to come over and see if he can add the missing piece.
It might be that NetworkManager needs ModemManager for bringing up the connection.

Two other mailing lists where he can get help:


https://lists.freedesktop.org/mailman/l ... ager-devel
https://lists.freedesktop.org/mailman/l ... bqmi-devel


Offline
PostPosted: Thu May 04, 2017 9:18 am Reply with quote
Posts: 166 Joined: Thu Mar 15, 2012 10:47 pm Location: Oslo, Norway
LOM wrote:
I have asked Bjorn Mork to come over and see if he can add the missing piece.
It might be that NetworkManager needs ModemManager for bringing up the connection.

Yes, it does. Install a reasonably recent ModemManager and this should Just Work(tm)

And now that all the hard work of writing code and testing it has been done: Please submit the patch so that others can benefit from this. And yourself as well, since you won't have to continue building your own kernels. And the glory of having your name in the kernel commit log, of course :-)

The procedure is simple. It is described in detail here: https://www.kernel.org/doc/html/latest/ ... tches.html

Don't worry about getting something wrong the first time. Worst thing that will happen is that you get a friendly request to fix something.

Note that there should also be a similar addtion to the qcserial driver, making the serial functions available as ttyUSBx devices. Duplicate one of the existing Sierra Wireless entries.

(other USB serial drivers could also be used, but the qcserial driver is best because it already has the logic to match Sierra Wireless/Netgear devices)

Quote:

Yes, please use those for any issues related to using libqmi and/or ModemManager


Offline
PostPosted: Fri May 05, 2017 7:25 am Reply with quote
Posts: 8 Joined: Tue May 02, 2017 12:06 am
just to follow up - in case someone else has a Netgear AC779S..

I was able to get this to work using ModemManager - I had trouble initially so I compiled and
installed the latest stable version - 1.6.4 (as opposed to v1.6.0-2 in Centos 7 RPMs).
It was able to recognize the modem, but only went so far as to register (not connect).
I had to run these commands:
# first determine modem #
$mmcli -L
Found 1 modems:
/org/freedesktop/ModemManager1/Modem/0 [NETGEAR] AC779S

# create bearer object for modem 0
$mmcli -m 0 --create-bearer="apn=internet"
# initiate connection for modem 0, bearer 0
$mmcli -m -b 0 -c

the IP address showed in /var/log/messages:
May 4 22:38:09 mythtv ModemManager[765]: <info> QMI IPv4 Settings:
May 4 22:38:09 mythtv ModemManager[765]: <info> Address: 192.168.10.4/24
May 4 22:38:09 mythtv ModemManager[765]: <info> Gateway: 192.168.10.5
May 4 22:38:09 mythtv ModemManager[765]: <info> DNS #1: 192.168.10.1
May 4 22:38:09 mythtv ModemManager[765]: <info> DNS #2: failed (Field 'Secondary IPv4 DNS Address' was not found in the message)
May 4 22:38:09 mythtv ModemManager[765]: <info> MTU: 1500

(I had changed the LAN to 192.168.10.0/24 on the netgear mgmt webpage to avoid address conflicts)
For some reason dhclient wouldn't pick this IP (192.168.10.4) up, so I had to manually
set it using ifconfig. I also manually set the gateway (192.168.10.5). After that, the Centos
workstation was online! The Netgear's webpage was accessible at 192.168.10.1

Thanks LOM, Josh & bmork for your assistance. I still need to learn more about
QMI and USB modems! For others I found a good PDF on QMI by Aleksander Morgado here:
http://www.lanedo.com/documents/Qualcom ... 0Linux.pdf


Offline
PostPosted: Fri May 05, 2017 7:51 am Reply with quote
Posts: 8 Joined: Tue May 02, 2017 12:06 am
typo :
# initiate connection for modem 0, bearer 0
$mmcli -m -b 0 -c
(should have been):
$mmcli -m 0 -b 0 -c


Offline
PostPosted: Fri May 05, 2017 8:23 am Reply with quote
Posts: 1175 Joined: Wed Jul 11, 2012 3:14 pm Location: Koh Samui, TH
Can you do a final test for us without having the switch code in unusual_devs.

usb_modeswitch -v 0x0846 -p 0x0fff -S -W

does that switch the 779S?


Offline
PostPosted: Fri May 05, 2017 3:04 pm Reply with quote
Posts: 8 Joined: Tue May 02, 2017 12:06 am
LOM - OK will do.. Unfortunately I'm away from that system for a few days but
will post the results of the test on monday.


Offline
PostPosted: Thu May 11, 2017 6:38 am Reply with quote
Posts: 8 Joined: Tue May 02, 2017 12:06 am
LOM,

(sorry I wasn't able to try this until now..)
after power cycling the modem and rebooting in the vanilla CentOS
the modeswitch command does switch the device, but I'm stuck after that.
There's no ethernet device created nor anything under /dev/ttyUSB*

[root@mythtv ~]# usb_modeswitch -v 0x0846 -p 0x0fff -S -W
Take all parameters from the command line


* usb_modeswitch: handle USB devices with multiple modes
* Version 2.4.0 (C) Josua Dietze 2016
* Based on libusb1/libusbx

! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor= 0x0846
DefaultProduct= 0x0fff
SierraMode=1

Look for default devices ...
found USB ID 0e8d:1806
found USB ID 0846:0fff
vendor ID matched
product ID matched
found USB ID 1d6b:0002
found USB ID 046d:c064
found USB ID 045e:0750
found USB ID 1d6b:0001
Found devices in default mode (1)
Access device 005 on bus 001
Get the current device configuration ...
Current configuration number is 1
Use interface number 9

USB description data (for identification)
-------------------------
Manufacturer: NETGEAR
Product: AirCard 779S
Serial No.: xxxxx
-------------------------
Send Sierra control message
-> Run lsusb to note any changes. Bye!

[root@mythtv ~]#
[root@mythtv ~]# lsusb -vd 0846:68d3
Code:
Bus 001 Device 006: ID 0846:68d3 NetGear, Inc.
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x0846 NetGear, Inc.
  idProduct          0x68d3
  bcdDevice            0.06
  iManufacturer           1 NETGEAR
  iProduct                2 AirCard 779S
  iSerial                 3 xxxxxxx
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          111
    bNumInterfaces          3
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        3
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0
      bInterfaceProtocol      0
      iInterface              0
      ** UNRECOGNIZED:  05 24 00 10 01
      ** UNRECOGNIZED:  05 24 01 00 00
      ** UNRECOGNIZED:  04 24 02 02
      ** UNRECOGNIZED:  05 24 06 00 00
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x000c  1x 12 bytes
        bInterval               9
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        8
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x84  EP 4 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x000a  1x 10 bytes
        bInterval               9
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x85  EP 5 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0000
  (Bus Powered)

[root@mythtv ~]#

(relevant lines from /var/log/messages - as usb_modeswitch ran):
May 10 22:25:11 mythtv kernel: usb 1-5: USB disconnect, device number 5
May 10 22:25:11 mythtv kernel: cdrom: issuing MRW background format suspend
May 10 22:25:11 mythtv kernel: usb 1-5: new high-speed USB device number 6 using
ehci-pci
May 10 22:25:11 mythtv kernel: usb 1-5: config 1 has an invalid interface number
: 3 but max is 2
May 10 22:25:11 mythtv kernel: usb 1-5: config 1 has an invalid interface number
: 8 but max is 2
May 10 22:25:11 mythtv kernel: usb 1-5: config 1 has no interface number 1
May 10 22:25:11 mythtv kernel: usb 1-5: config 1 has no interface number 2
May 10 22:25:11 mythtv kernel: usb 1-5: New USB device found, idVendor=0846, idP
roduct=68d3
May 10 22:25:11 mythtv kernel: usb 1-5: New USB device strings: Mfr=1, Product=2
, SerialNumber=3
May 10 22:25:11 mythtv kernel: usb 1-5: Product: AirCard 779S
May 10 22:25:11 mythtv kernel: usb 1-5: Manufacturer: NETGEAR
May 10 22:25:11 mythtv kernel: usb 1-5: SerialNumber: xxxxxx
May 10 22:27:07 mythtv systemd-logind: New session 4 of user root.
May 10 22:27:07 mythtv systemd: Started Session 4 of user root.
May 10 22:27:07 mythtv systemd: Starting Session 4 of user root.
May 10 22:27:07 mythtv dbus-daemon: dbus[754]: [system] Activating service name='org.freedesktop.problems' (using servicehelper)
May 10 22:27:07 mythtv dbus[754]: [system] Activating service name='org.freedesktop.problems' (using servicehelper)
May 10 22:27:07 mythtv dbus[754]: [system] Successfully activated service 'org.freedesktop.problems'
May 10 22:27:07 mythtv dbus-daemon: dbus[754]: [system] Successfully activated service 'org.freedesktop.problems'

I'm unsure if I need an entry in the udev rules file?
/usr/lib/udev/rules.d/40-usb_modeswitch.rules

after more thought - I guess I need to modify qmi_wwan.c again? If so
it still involves compiling a kernel. Avoids the need for an entry in
unusual_devs.h though.

thanks again for your assistance.


Offline

Display posts from previous:  Sort by:

All times are UTC+02:00
Page 1 of 2
18 posts
Go to page 1 2 Next
Users browsing this forum: No registered users and 2 guests
Search for:
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum