Activation Codes and Methods, Hardware Details, Sniffing
ZPrime
Posts: 7
Joined: 05 Sep 2015, 00:13

Verizon / Novatel U620L 4G/LTE modem

Post by ZPrime » 05 Sep 2015, 00:33

Trying to use the above-listed USB stick in a project with a Raspberry Pi for remote console access to a router.

Interestingly, Verizon / Novatel provide a PDF that explicitly describes how to use usb_modeswitch with the U620L modem!

Sadly, it doesn't work.

First they tell you to rmmod the rndis_host module, no such module was loaded for me, so I moved forward to the mode switch. My expectation was that after the mode switch, it would change modes and a new ethX interface would appear.

Code: Select all

pi@raspberrypi ~ $ sudo usb_modeswitch -v 0x1410 -p 0x9020 -u 2

Looking for default devices ...
   found matching product ID
Getting the current device configuration ...
 OK, got current device configuration (1)
 Found device in default mode, class or configuration (1)
Accessing device 010 on bus 001 ...
Getting the current device configuration ...
 OK, got current device configuration (1)
Using first interface: 0x00
Error: message endpoint not given or found. Aborting.
I don't need the full AT / modem functionality that they mention (which requires editing driver source and recompiling a driver, and using the "-u 4" argument with usb_modeswitch -- again, I don't need this extra functionality). I just need the thing to work like a network interface. We actually have a static IP provisioned for the SIM card in it.

Here is a full lsusb against the device, run as root, it is quite long.

Code: Select all

pi@raspberrypi ~ $ sudo lsusb -v -d 1410:9020

Bus 001 Device 010: ID 1410:9020 Novatel Wireless
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.01
  bDeviceClass            2 Communications
  bDeviceSubClass         6 Ethernet Networking
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x1410 Novatel Wireless
  idProduct          0x9020
  bcdDevice            2.28
  iManufacturer           1 Novatel Wireless
  iProduct                2 MiFi USB620L
  iSerial                 3 0123456789ABCDEF
  bNumConfigurations      4
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           75
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    Interface Association:
      bLength                 8
      bDescriptorType        11
      bFirstInterface         0
      bInterfaceCount         2
      bFunctionClass        239 Miscellaneous Device
      bFunctionSubClass       4
      bFunctionProtocol       1
      iFunction               6 RNDIS
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass       239 Miscellaneous Device
      bInterfaceSubClass      4
      bInterfaceProtocol      1
      iInterface              4 RNDIS Communications Control
      ** UNRECOGNIZED:  05 24 00 10 01
      ** UNRECOGNIZED:  05 24 01 00 01
      ** UNRECOGNIZED:  04 24 02 00
      ** UNRECOGNIZED:  05 24 06 00 01
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval               9
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass        10 CDC Data
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      0
      iInterface              5 RNDIS Ethernet Data
      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
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          113
    bNumInterfaces          3
    bConfigurationValue     2
    iConfiguration          0
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    Interface Association:
      bLength                 8
      bDescriptorType        11
      bFirstInterface         0
      bInterfaceCount         2
      bFunctionClass          2 Communications
      bFunctionSubClass       6 Ethernet Networking
      bFunctionProtocol       0
      iFunction              10 CDC ECM
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         2 Communications
      bInterfaceSubClass      6 Ethernet Networking
      bInterfaceProtocol      0
      iInterface              7 CDC Ethernet Control Model (ECM)
      CDC Header:
        bcdCDC               1.10
      CDC Union:
        bMasterInterface        0
        bSlaveInterface         1
      CDC Ethernet:
        iMacAddress                      9 0015FF005740
        bmEthernetStatistics    0x00000000
        wMaxSegmentSize               1514
        wNumberMCFilters            0x0000
        bNumberPowerFilters              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0010  1x 16 bytes
        bInterval               9
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass        10 CDC Data
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      0
      iInterface              0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       1
      bNumEndpoints           2
      bInterfaceClass        10 CDC Data
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      0
      iInterface              8 CDC Ethernet Data
      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        2
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 No Subclass
      bInterfaceProtocol      0 None
      iInterface             11 HID Interface
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.01
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      34
         Report Descriptors:
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval               4
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           75
    bNumInterfaces          2
    bConfigurationValue     3
    iConfiguration          0
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    Interface Association:
      bLength                 8
      bDescriptorType        11
      bFirstInterface         0
      bInterfaceCount         2
      bFunctionClass          2 Communications
      bFunctionSubClass       2 Abstract (modem)
      bFunctionProtocol       1 AT-commands (v.25ter)
      iFunction              14 CDC Serial
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         2 Communications
      bInterfaceSubClass      2 Abstract (modem)
      bInterfaceProtocol      1 AT-commands (v.25ter)
      iInterface             12 CDC Abstract Control Model (ACM)
      CDC Header:
        bcdCDC               1.10
      CDC Call Management:
        bmCapabilities       0x00
        bDataInterface          1
      CDC ACM:
        bmCapabilities       0x02
          line coding and serial state
      CDC Union:
        bMasterInterface        0
        bSlaveInterface         1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x000a  1x 10 bytes
        bInterval               9
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass        10 CDC Data
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      0
      iInterface             13 CDC ACM Data
      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
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           32
    bNumInterfaces          1
    bConfigurationValue     4
    iConfiguration          0
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk-Only
      iInterface             15 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 Status:     0x0000
  (Bus Powered)

Josh
Site Admin
Posts: 6570
Joined: 03 Nov 2007, 00:30

Re: Verizon / Novatel U620L 4G/LTE modem

Post by Josh » 05 Sep 2015, 08:40

This must be an older version of usb_modeswitch. The current version (2.2.5) does not try to determine endpoints for a device configuration change.

ZPrime
Posts: 7
Joined: 05 Sep 2015, 00:13

Re: Verizon / Novatel U620L 4G/LTE modem

Post by ZPrime » 05 Sep 2015, 10:56

Josh wrote:This must be an older version of usb_modeswitch. The current version (2.2.5) does not try to determine endpoints for a device configuration change.
Entirely possible, I didn't build it from source and it came from Raspbian "Wheezy" branch, which I suspect is old. I'll get newer version on there and give it a shot.

I forgot that the instructions were built around Ubuntu which is closer to bleeding edge than any standard branch of Debian...

Josh
Site Admin
Posts: 6570
Joined: 03 Nov 2007, 00:30

Re: Verizon / Novatel U620L 4G/LTE modem

Post by Josh » 05 Sep 2015, 11:53

For Raspbian and friends, you might want to check if libusb1.x is available on the system. The standard usb_modeswitch package in Raspbian (something around v. 1.3.x) is still based on libusb0, while the more recent versions depend on libusb1.

ZPrime
Posts: 7
Joined: 05 Sep 2015, 00:13

Re: Verizon / Novatel U620L 4G/LTE modem

Post by ZPrime » 05 Sep 2015, 22:25

Josh wrote:For Raspbian and friends, you might want to check if libusb1.x is available on the system. The standard usb_modeswitch package in Raspbian (something around v. 1.3.x) is still based on libusb0, while the more recent versions depend on libusb1.
libusb1.x is available according to apt-cache... but the version of usb_modeswitch is actually only 1.2.x.

Code: Select all

pi@raspberrypi ~ $ usb_modeswitch --version

 * usb_modeswitch: handle USB devices with multiple modes
 * Version 1.2.3 (C) Josua Dietze 2012
 * Based on libusb0 (0.1.12 and above)
Unfortunately the newer usb_modeswitch relies on "libjim" which wants a newer version of libc than is in Wheezy. So I will need a dist-upgrade before I can move forward on this... it looks like people aren't having too many problems on the RPi with Jessie so I may give that a shot.

My alternative would be to see if I can get a different USB modem, I have a UM290 that when plugged in instantly supplies a "wwan0" so I may just use that... need to get the sim card swapped to a larger one or find one of those adapters to try it.

Josh
Site Admin
Posts: 6570
Joined: 03 Nov 2007, 00:30

Re: Verizon / Novatel U620L 4G/LTE modem

Post by Josh » 06 Sep 2015, 00:26

usb_modeswitch only relies on libjim if the "tcl" package is not available (run "tclsh" to test). And for running just the binary 'usb_modeswitch' on the commandline or from a shell script, you need neither.

In that case, just run "make usb_modeswitch".

LOM
Posts: 1404
Joined: 11 Jul 2012, 15:14
Location: Koh Samui, TH

Re: Verizon / Novatel U620L 4G/LTE modem

Post by LOM » 06 Sep 2015, 08:32

ZPrime wrote:
My alternative would be to see if I can get a different USB modem, I have a UM290 that when plugged in instantly supplies a "wwan0" so I may just use that... need to get the sim card swapped to a larger one or find one of those adapters to try it.
You can take usb_modeswitch out of the equation by selecting the port config manually.
The only advantage usb_modeswitch gives you is that it finds the path to the dongles usb port based on the usb vid:pid while you have to look it up (see your dmesg log when the device is found).

example:
echo 2 > /sys/bus/usb/devices/1-2/bConfigurationValue

where 1-2 is root hub 1 and the dongle connected to port 2 on that hub.
The path will be longer if you have chained hubs, ie 1-2-1 for root hub 1 port 2 connected to next hub and dongle connected to port 1 of that next hub.

nowls
Posts: 1
Joined: 09 Sep 2015, 01:27

Re: Verizon / Novatel U620L 4G/LTE modem

Post by nowls » 09 Sep 2015, 01:39

I know it's not for Raspbian, but the following works for me on Ubuntu:

OS: Ubuntu 14.04.2 LTS
Kernel: 3.13.0-51-generic
usb_modeswitch: 2.1.1 ("based on libusb1/libusbx")

Code: Select all

$ cat /etc/usb_modeswitch.d/1410\:9020
# Novatel Wireless USB620L
DefaultVendor=0x1410
DefaultProduct=0x9020
TargetVendor=0x1410
TargetProduct=0x9020
Configuration=2

ZPrime
Posts: 7
Joined: 05 Sep 2015, 00:13

Re: Verizon / Novatel U620L 4G/LTE modem

Post by ZPrime » 09 Sep 2015, 07:09

I was able to get the machine pushed to "Jessie" which includes a 2.2.0 release of usb_modeswitch, and that worked correctly.

Now the problem is that the device itself is garbage and while it appears to directly assign the public IP to the box, I'm not able to ping it from outside (without any firewall rules in place). Either Raspbian has a default block policy I wasn't aware of (unlikely?), or the U620L actually does some sort of internal firewalling. Given that it will allow you to manage it via a web interface, I suspect the latter is actually to blame...

Or Verizon is blocking inbound traffic to it, but given that we're paying them for a static IPv4 address on this SIM/line, that seems pretty stupid.

[edit]
The above two paragraphs ended up being a route problem, didn't realize that Linux puts all traffic through the kernel route table and the lower default route on Eth0 would win over the default on eth1 (the LTE modem). I have to screw with policy based routing to fix this, but that's not for this forum. :D

However, now I want to correctly automate the mode-switch...
nowls wrote:I know it's not for Raspbian, but the following works for me on Ubuntu:

OS: Ubuntu 14.04.2 LTS
Kernel: 3.13.0-51-generic
usb_modeswitch: 2.1.1 ("based on libusb1/libusbx")

Code: Select all

$ cat /etc/usb_modeswitch.d/1410\:9020
# Novatel Wireless USB620L
DefaultVendor=0x1410
DefaultProduct=0x9020
TargetVendor=0x1410
TargetProduct=0x9020
Configuration=2
What exactly should that do? I created a file with those contents, called "1410:9020" in /etc/usb_modeswitch.d/ as root (it's 644), but that doesn't seem to affect anything when I plug the device in or when I run usb_modeswitch manually. I don't believe usb_modeswitch is being called at all when this is plugged in, possibly due to an older set of rules / config.

I added my own udev rule for this device under /etc/udev/rules.d, which I based upon the logic in the original udev rules for usb_modeswitch.

Code: Select all

cat 41-USB620L-modem-Verizon.rules
# Turn on Novatel USB620L LTE Modem, per their docs located at:
# http://www.verizonwireless.com/dam/support/pdf/user_guide/u620-linux-integration-guide-7-17-15.pdf

ACTION!="add|change", GOTO="USB620L_rules_end"
SUBSYSTEM!="usb", GOTO="USB620L_rules_end"

# Don't continue on "change" event, prevent trigger by changed configuration
ACTION!="add", GOTO="USB620L_rules_end"


# Novatel USB620L Verizon LTE USB Modem Stick - will become an ethX device
ATTR{idVendor}=="1410", ATTR{idProduct}=="9020", RUN+="usb_modeswitch '%b/%k'"


LABEL="USB620L_rules_end"
I can see systemd is calling usb_modeswitch per syslog, but nothing seems to be happening, and I set EnableLogging=1 in /etc/usb_modeswitch.conf but I'm not getting any reports in /var/log.
Sep 10 18:49:58 raspberrypi systemd[1]: Starting USB_ModeSwitch...
Sep 10 18:49:58 raspberrypi systemd[1]: Started USB_ModeSwitch.

This is what ships with Debian/Raspbian Jessie:

Code: Select all

 usb_modeswitch --version

 * usb_modeswitch: handle USB devices with multiple modes
 * Version 2.2.0 (C) Josua Dietze 2014
 * Based on libusb1/libusbx
(again, usb_modeswitch itself is working correctly now, I just want to automate the mode-switch!)

It looks like usb_modeswitch is actually being invoked by systemd, so maybe this is my problem... ack.

Josh
Site Admin
Posts: 6570
Joined: 03 Nov 2007, 00:30

Re: Verizon / Novatel U620L 4G/LTE modem

Post by Josh » 11 Sep 2015, 20:47

Hmm - if usb_modeswitch 2.2.0 is installed by default, all its components should be there as well.

If you haven't done so already, see the paragraph "How to use" on the usb_modeswitch introduction page (same link as in the top nav bar).

Also have a look into /lib/udev/usb_modeswitch.

ZPrime
Posts: 7
Joined: 05 Sep 2015, 00:13

Re: Verizon / Novatel U620L 4G/LTE modem

Post by ZPrime » 11 Sep 2015, 23:56

Josh wrote:Hmm - if usb_modeswitch 2.2.0 is installed by default, all its components should be there as well.

If you haven't done so already, see the paragraph "How to use" on the usb_modeswitch introduction page (same link as in the top nav bar).

Also have a look into /lib/udev/usb_modeswitch.
Josh, I re-read the introduction page, not sure how I missed all of the directory layout stuff before.

I created my own config file for the device and put it into /etc/usb_modeswitch.d/.

I edited /lib/udev/rules.d/40-usb_modeswitch.rules and added the appropriate line for the device in there. I figured it was more "portable" to use /etc/udev/rules.d/ and create my own .rules file instead (udev is supposed to examine all rules files in all directories and then enumerate them in alphanumeric order), but for troubleshooting purposes I just edited the default .rules file for now.

I can see systemd calling usb_modeswitch (log entry shows up in /var/log/syslog), but it doesn't seem to be actually doing anything.

Code: Select all

Sep 11 15:35:15 raspberrypi kernel: [306259.211554] usb 1-1.4: new high-speed USB device number 21 using dwc_otg
Sep 11 15:35:15 raspberrypi kernel: [306259.339597] usb 1-1.4: New USB device found, idVendor=1410, idProduct=9020
Sep 11 15:35:15 raspberrypi kernel: [306259.339627] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Sep 11 15:35:15 raspberrypi kernel: [306259.339644] usb 1-1.4: Product: MiFi USB620L
Sep 11 15:35:15 raspberrypi kernel: [306259.339660] usb 1-1.4: Manufacturer: Novatel Wireless
Sep 11 15:35:15 raspberrypi kernel: [306259.339676] usb 1-1.4: SerialNumber: 0123456789ABCDEF
Sep 11 15:35:15 raspberrypi mtp-probe: checking bus 1, device 21: "/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4"
Sep 11 15:35:15 raspberrypi mtp-probe: bus: 1, device: 21 was not an MTP device
Sep 11 15:35:15 raspberrypi systemd[1]: Starting USB_ModeSwitch...
Sep 11 15:35:15 raspberrypi systemd[1]: Started USB_ModeSwitch.
I never get the new ethernet device that is supposed to show up. Either systemd isn't calling usb_modeswitch correctly, or it is calling it and not reading the config file I put in /etc/usb_modeswitch.d/. It also doesn't seem to obey the setting in /etc/usb_modeswitch.conf that should be creating a text logfile.

Code: Select all

 cat /etc/usb_modeswitch.d/1410\:9020
# Novatel Wireless USB620L
DefaultVendor=0x1410
DefaultProduct=0x9020
TargetVendor=0x1410
TargetProduct=0x9020
Configuration=2
Of note - /usr/share/usb_modeswitch did not contain any config files. There was just a tar.gz with all of the files inside it, I manually extracted that to the same directory (as root). This seems like a failing in Debian/Raspbian, I'm not sure why it wouldn't automatically extract all of the device configs during "apt-get install" of the package.

Code: Select all

 cat /lib/udev/usb_modeswitch
#!/bin/sh
# part of usb_modeswitch 2.2.0

(snipped - unaltered by me)
It seems like whatever systemd is doing when it says it is starting usb_modeswitch, it's not actually doing anything.

Code: Select all

udevadm test /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4 2>&1
calling: test
version 215
This program is for debugging only, it does not run any program
specified by a RUN key. It may show incorrect results, because
some values may be different, or not available at a simulation run.

load module index
Network interface NamePolicy= disabled on kernel commandline, ignoring.
timestamp of '/etc/systemd/network' changed
timestamp of '/lib/systemd/network' changed
Parsed configuration file /lib/systemd/network/99-default.link
Created link configuration context.
timestamp of '/etc/udev/rules.d' changed
read rules file: /lib/udev/rules.d/10-local-rpi.rules
read rules file: /lib/udev/rules.d/39-usbmuxd.rules
read rules file: /etc/udev/rules.d/40-scratch.rules
read rules file: /lib/udev/rules.d/40-usb_modeswitch.rules
read rules file: /lib/udev/rules.d/42-usb-hid-pm.rules
[MANY RULES SNIPPED]
rules contain 393216 bytes tokens (32768 * 12 bytes), 31463 bytes strings
33417 strings (269940 bytes), 30037 de-duplicated (241858 bytes), 3381 trie nodes used

### I edited the rules file to add line 984
RUN 'usb_modeswitch '%b/%k'' /lib/udev/rules.d/40-usb_modeswitch.rules:984
IMPORT builtin 'usb_id' /lib/udev/rules.d/50-udev-default.rules:9
IMPORT builtin 'hwdb' /lib/udev/rules.d/50-udev-default.rules:9
MODE 0664 /lib/udev/rules.d/50-udev-default.rules:41
PROGRAM 'mtp-probe /sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4 1 24' /lib/udev/rules.d/69-libmtp.rules:1429
starting 'mtp-probe /sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4 1 24'
'mtp-probe /sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4 1 24'(out) '0'
'mtp-probe /sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4 1 24' [24440] exit with return code 0
handling device node '/dev/bus/usb/001/024', devnum=c189:23, mode=0664, uid=0, gid=0
preserve permissions /dev/bus/usb/001/024, 020664, uid=0, gid=0
preserve already existing symlink '/dev/char/189:23' to '../bus/usb/001/024'
unable to create temporary db file '/run/udev/data/c189:23.tmp': Permission denied
ACTION=add
BUSNUM=001
DEVNAME=/dev/bus/usb/001/024
DEVNUM=024
DEVPATH=/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4
DEVTYPE=usb_device
DRIVER=usb
ID_BUS=usb
ID_MODEL=MiFi_USB620L
ID_MODEL_ENC=MiFi\x20USB620L
ID_MODEL_ID=9020
ID_REVISION=0228
ID_SERIAL=Novatel_Wireless_MiFi_USB620L_0123456789ABCDEF
ID_SERIAL_SHORT=0123456789ABCDEF
ID_USB_INTERFACES=:ef0401:0a0000:020600:030000:020201:080650:
ID_VENDOR=Novatel_Wireless
ID_VENDOR_ENC=Novatel\x20Wireless
ID_VENDOR_FROM_DATABASE=Novatel Wireless
ID_VENDOR_ID=1410
MAJOR=189
MINOR=23
PRODUCT=1410/9020/228
SUBSYSTEM=usb
TYPE=2/6/0
USEC_INITIALIZED=311776029361
run: 'usb_modeswitch '/1-1.4''
unload module index
Unloaded link configuration context.
Note the "run" line above - it seems as though the "%b" variable from udev is not making it through, only %k. Is that correct?

If I manually invoke 'sudo /usr/sbin/usb_modeswitch_dispatcher --switch-systemd "-1-1.4" ' (which is what /lib/udev/usb_modeswitch calls indirectly via systemd), it still doesn't do anything with the device. This is even after copying my config file for this device into /usr/share/usb_modeswitch (on top of also having it in /etc/usb_modeswitch.d/)

I'm completely stumped at this point. I can't even get the automated version of usb_modeswitch to give me debug info, which makes it more difficult!

It works perfectly fine if I manually invoke 'sudo usb_modeswitch -c /etc/usb_modeswitch.d/1410:9020'

Josh
Site Admin
Posts: 6570
Joined: 03 Nov 2007, 00:30

Re: Verizon / Novatel U620L 4G/LTE modem

Post by Josh » 27 Oct 2015, 23:35

I just realized what could be the possible cause for your problems.

Up to very recently, all devices to be handled by usb_modeswitch were starting up as storage devices - interface 0 has the storage class (0x08). There is a check for this in the dispatcher script, and any activity is halted if the storage class check fails.

Now however there are devices like yours or the Huawei ME909u-521 - they provide multiple configurations but don't have the storage class for interface 0 (1st configuration).

The point is that I will have to change the dispatcher code to avoid the storage class check for devices with multiple configurations. I'll do so in the next release.

If you want to quick-fix this for your setup, edit usb_modeswitch_dispatcher (or usb_modeswitch.tcl in the source folder before re-installing) and after the line

Code: Select all

Log "Use top device dir $devdir"
insert this line

Code: Select all

set ifChk 0

ZPrime
Posts: 7
Joined: 05 Sep 2015, 00:13

Re: Verizon / Novatel U620L 4G/LTE modem

Post by ZPrime » 11 Nov 2015, 02:04

That makes sense, it definitely seemed like USB_M was just "giving up" since I was not getting any log info!

I let this project sit for a while and now that I've come back to it, others have made progress. :) Someone over on the Raspberry Pi forums provided a UDEV rules file that will automatically make the switch without needing usb-modeswitch.

In case anyone else runs across this post and it's gone from the RPi forums for some reason...

In /etc/udev/rules.d -- create a new file (as root / with sudo), The file name must end with ".rules" and I think it needs to begin with a number as well (files are evaluated in alphanumeric order). I used "99-vzw_u620l.rules" as my name. File contents should be the following, which should be on a single line:

Code: Select all

SUBSYSTEM=="usb", ATTR{idVendor}=="1410", ATTR{idProduct}=="9020", ATTR{bConfigurationValue}=="1", ATTR{bConfigurationValue}="2"
Save and close the file, reload the udev rules (sudo udevadm control --reload), and then unplug/replug the VZW card and it should automatically get switched and appear as a new ethX interface.

aleksander0m
Posts: 8
Joined: 11 Nov 2015, 21:50

Re: Verizon / Novatel U620L 4G/LTE modem

Post by aleksander0m » 11 Nov 2015, 22:01

ZPrime wrote:Trying to use the above-listed USB stick in a project with a Raspberry Pi for remote console access to a router.

Interestingly, Verizon / Novatel provide a PDF that explicitly describes how to use usb_modeswitch with the U620L modem!

Sadly, it doesn't work.
Well, it does work to me. I modeswitched the Verizon U620L to 1410:9022 (enterprise mode, AT+ECM) in OpenWRT with a rule like this:

Code: Select all

usb_modeswitch.d/1410:9020
# Novatel Wireless MiFi USB620L
TargetVendor=0x1410
TargetProduct=0x9022
Configuration=4
Once in that mode, I do get an eth, and I also get a tty after patching the option driver like this:
http://permalink.gmane.org/gmane.linux. ... ral/133344

Please don't modeswitch by default to USB configuration #2, when #4 gives the same functionality (the ETH) plus the AT port. We don't currently support this kind of 'auto-connected' MiFi devices in ModemManager, but we could do that in the future.

LOM
Posts: 1404
Joined: 11 Jul 2012, 15:14
Location: Koh Samui, TH

Re: Verizon / Novatel U620L 4G/LTE modem

Post by LOM » 12 Nov 2015, 00:04

aleksander0m wrote:
Please don't modeswitch by default to USB configuration #2, when #4 gives the same functionality (the ETH) plus the AT port. We don't currently support this kind of 'auto-connected' MiFi devices in ModemManager, but we could do that in the future.
We did choose configuration #2 because it was not 100% clear in the Verizon guide how to get
to Enterprise mode. I understand now that the dongle autoswitches to 1410:9022 when configuration #4 (storage mode) of 1410:9020 is selected.
We can change the default configuration from 2 to 4 in next usb_modeswitch data package release and I suppose that the current config file for 1410:9022 should be removed.
Can you please paste the output from lsusb -v -d 1410:9022 here, I have not seen it before and that was also a reason for selecting config #2 as default.

Post Reply