0

tl;dr

Vodafone E3730 HSPA Express Data Card seems not to work at all in Kubuntu 18.04 LTS. How can I fix this?


Description

The card used to work. Frankly I don't remember if it worked in 18.04 LTS or in some earlier LTS version, but it did. In my current KDE Plasma in 18.04 LTS there are saved network settings that used to work. I expected them to kick in as soon as I insert the card but no; it's as if the card isn't there.

The SIM card was never removed and it should still work.

From the time it worked I remember no problems whatsoever. It probably worked almost out of the box. The hardware was recognized and I only had to set details like APN.


Technical details

This information is printed on a sticker:

Vodafone Mobile Connect
Model: E3730
HSPA Express Data Card

Designed in E.U. by Option
Made in Ireland by Option
QUALCOMM 3G CDMA

This is from lsusb:

Bus 001 Device 006: ID 0af0:7301 Option

And this is from usb-devices:

T:  Bus=01 Lev=02 Prnt=02 Port=01 Cnt=02 Dev#=  6 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=0af0 ProdID=7301 Rev=00.00
S:  Manufacturer=Option N.V.
S:  Product=Globetrotter HSUPA Modem
S:  SerialNumber=Serial Number
C:  #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=100mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=(none)

cat /etc/issue:

Ubuntu 18.04.5 LTS \n \l

uname -a:

Linux whatever 4.15.0-121-generic #123-Ubuntu SMP Mon Oct 5 16:16:40 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

Research

It seems the right driver for the device is option.

I learnt what usb_modeswitch is:

Several new USB devices have their proprietary Windows drivers onboard, most of them WWAN and WLAN dongles. When plugged in for the first time, they act like a flash storage and start installing the Windows driver from there. If the driver is installed, it makes the storage device disappear and a new device, mainly composite (e.g. with modem ports), shows up.

On Linux, in most cases the drivers are available as kernel modules, such as usbserial or option. However, the device initially binds to usb-storage by default. usb_modeswitch can then send a provided bulk message (most likely a mass storage command) to the device; this message has to be determined by analyzing the actions of the Windows driver.

I confirmed the packages usb-modeswitch and usb-modeswitch-data are installed. I believe they should work automatically. At least they seemingly used to work when my card used to work, without me knowing anything about usb_modeswitch.

I noticed the device does not even act like a flash storage. In the output of usb-devices (above) it states Cls=08(stor.), which I believe indicates Base Class 08h (Mass Storage); but the driver is none. No block device appears.

Then I found this answer and tried to adjust it to my hardware.

At first I created an empty file named 0af0:7301 in /etc/usb_modeswitch.d/. I removed and re-inserted the device. Then usb-device gave me this:

T:  Bus=01 Lev=02 Prnt=02 Port=01 Cnt=02 Dev#=  7 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=0af0 ProdID=7301 Rev=00.00
S:  Manufacturer=Option N.V.
S:  Product=Globetrotter HSUPA Modem
S:  SerialNumber=Serial Number
C:  #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=100mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage

The driver was usb-storage and I could actually mount a newly created block device (/dev/sr0 in my case) and see it contains a Windows driver. I think the empty file had prevented usb_modeswitch from doing anything to the device.

Next I tried to run usb_modeswitch manually:

sudo usb_modeswitch -v 0x0af0 -p 0x7301 --option-mode
# or
sudo usb_modeswitch -v 0x0af0 -p 0x7301 --option-mode -C 0xff

Any of the above commands printed output suggesting it worked, but the only change in the output of usb-device was in this line:

I:  If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=(none)

This is what I had seen before I started to mess with usb_modeswitch. It seems I managed to manually recreate what usb_modeswitch had been doing automatically. My interpretation is the tool works only partially: it is able to remove the driver (usb-storage changes to none) but it doesn't switch the mode (08(stor.) remains).


Question

How to proceed from here? How can I make the modem work?

1 Answer 1

0

tl;dr

The device identifies with Vendor=0af0, ProdID=7301. Create a file named 0af0:7301 in /etc/usb_modeswitch.d/ (or edit the file if it exists). Its content should be:

# Option HSO device
TargetClass=0xff
MessageContent="55534243785634120100000080000601000000000000000000000000000000"
NoDriverLoading=1

Investigation

(Note I am the asker and I'm answering my own question. Aside from tl;dr the answer is really a continuation of the story.)

The interpretation seems correct: usb_modeswitch does less than it should.

To learn what the tool tries to do to my device (when there is no 0af0:7301 file in /etc/usb_modeswitch.d/), I consulted apt-file show usb-modeswitch-data. One of the lines looked promising:

/usr/share/usb_modeswitch/configPack.tar.gz

And yes, this file contains many files named like vendorID:productID, including 0af0:7301 which reads:

# Option HSO device
TargetClass=0xff
OptionMode=1

I guess it specifies options I have already tried manually (in the question):

usb_modeswitch -v 0x0af0 -p 0x7301 --option-mode -C 0xff

Because the hardware had worked in the past, I suspected the file had been different back then. I decided to find the (or an) old file.

The main entry in my /etc/apt/sources.list is:

deb http://pl.archive.ubuntu.com/ubuntu/ bionic main restricted

(pl because I'm Polish). My intention was to find some older usb-modeswitch-data somewhere in pl.archive.ubuntu.com. After some digging I found this address:

ftp://pl.archive.ubuntu.com/ubuntu/pool/main/u/usb-modeswitch-data/

and downloaded this file:

ftp://pl.archive.ubuntu.com/ubuntu/pool/main/u/usb-modeswitch-data/usb-modeswitch-data_20151101.orig.tar.bz2

After unpacking I found a file 0af0:7301 substantially different than 0af0:7301 from /usr/share/usb_modeswitch/configPack.tar.gz.


Solution

The content of the found file is:

# Option HSO device
TargetClass=0xff
MessageContent="55534243785634120100000080000601000000000000000000000000000000"
NoDriverLoading=1

I copied the file to /etc/usb_modeswitch.d/, removed and re-inserted the device. Then usb-devices gave me this output:

T:  Bus=01 Lev=02 Prnt=02 Port=01 Cnt=02 Dev#= 10 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=ff(vend.) Sub=ff Prot=ff MxPS=64 #Cfgs=  1
P:  Vendor=0af0 ProdID=7301 Rev=00.00
S:  Manufacturer=Option N.V.
S:  Product=Globetrotter HSUPA Modem
C:  #Ifs=11 Cfg#= 1 Atr=c0 MxPwr=100mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=hso
I:  If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
I:  If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=(none)
I:  If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
I:  If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=hso
I:  If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
I:  If#= 5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
I:  If#= 6 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=hso
I:  If#= 7 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=hso
I:  If#= 8 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
I:  If#= 9 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=hso

The device got recognized as a modem and my old network settings tried to kick in. The modem failed to connect though. After I restarted the OS the situation changed to:

T:  Bus=01 Lev=02 Prnt=02 Port=01 Cnt=02 Dev#=  4 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=ff(vend.) Sub=ff Prot=ff MxPS=64 #Cfgs=  1
P:  Vendor=0af0 ProdID=7301 Rev=00.00
S:  Manufacturer=Option N.V.
S:  Product=Globetrotter HSUPA Modem
C:  #Ifs=11 Cfg#= 1 Atr=c0 MxPwr=100mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=hso
I:  If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
I:  If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=(none)
I:  If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
I:  If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=hso
I:  If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
I:  If#= 5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
I:  If#= 6 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=hso
I:  If#= 7 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=hso
I:  If#= 8 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
I:  If#= 9 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=hso

and then it started to work. Was the option driver the problem just before the restart? I don't know. Anyway, the device now works with hso and it seems this is the right driver nowadays.


Final notes

  • It seems --option-mode that allegedly works with all Option devices doesn't really switch modes of my device. Explicitly specifying the right message seems crucial.

  • This very answer was published using the device in question.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .