Setting up mobile broadband with HUAWEI E3131

Hi I’ve recently installed OpenSUSE 12.1 with gnome, and am now trying to set up mobile broadband with a HUAWEI E3131 usb device.

Unfortunately it didn’t just work when I plugged it in(!), so I’ve tried setting it up under Mobile Broadband in Network Connections following some other post I found. I just selected my country and mobile provider (T-mobile), ‘connect automatically’ and some default user/passwd (no idea if these are right). However after this nothing happens. I’m not sure it realises that the stick is plugged in, as it just looks like a normal USB under file manager. It does have a blue light on which should mean it’s connected to 3G.

I’m not really sure what I’m doing here, have had a look around the web but just getting more confused :frowning:

Any help much appreciated.

Start from the top. With your device plugged in, open a console, and note what is reported

dmesg|tail
lsusb
ls -l /dev/ttyUSB*

That should be enough to tell us the pertinent chipset, and whether the device is recognised as a broadband modem.

Without getting ahead of ourselves, check that you have the usb_modeswitch and usb_modeswitch-data packages installed too.

rpm -qa |grep usb_modeswitch

It may be that the usb_modeswitch version is too old to cater for this device, and it pays to check /lib/udev/rules.d/40-usb_modeswitch.rules for the entry pertaining to your detected chipset. The usb_modeswitch utility helps activate the modem interface for a variety of 3G devices. It is likely that the E3131 will require this treatment

cat /lib/udev/rules.d/40-usb_modeswitch.rules |grep 12d1

If your vendor and product ID is absent, it may be possible to get it recognised by the addition of a suitable rule (but this is experimentation). It should look like

ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1506", RUN+="usb_modeswitch '%b/%k'"

and you’ll need root privileges to edit this file.

This may not be sufficient to getting the modem operational. The kernel driver also needs to recognise this chipset. There are ways to check this, but I’ll await the requested info first.

Ok great thanks for the reply. Here are the results to that…


$ dmesg|tail
 3196.266639] usb 1-4: New USB device strings: Mfr=2, Product=1, SerialNumber=0
 3196.266646] usb 1-4: Product: HUAWEI HiLink
 3196.266651] usb 1-4: Manufacturer: HUAWEI
 3196.269119] scsi8 : usb-storage 1-4:1.0
 3197.269008] scsi 8:0:0:0: CD-ROM            HUAWEI   Mass Storage     2.31 PQ: 0 ANSI: 2
 3197.271478] sr1: scsi-1 drive
 3197.271826] sr 8:0:0:0: Attached scsi CD-ROM sr1
 3197.272115] sr 8:0:0:0: Attached scsi generic sg2 type 5
 3197.767667] ISO 9660 Extensions: Microsoft Joliet Level 1
 3197.784417] ISOFS: changing to secondary root


$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 003: ID 0a5c:2101 Broadcom Corp. Bluetooth Controller
Bus 002 Device 002: ID 04f2:b160 Chicony Electronics Co., Ltd 
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 006: ID 12d1:1f01 Huawei Technologies Co., Ltd. 


$ ls -l /dev/ttyUSB*
ls: cannot access /dev/ttyUSB*: No such file or directory

Thanks for this. The results to the commands you suggested are copied in below:

 $ rpm -qa |grep usb_modeswitch
usb_modeswitch-data-1.1.7-4.1.3.noarch
usb_modeswitch-1.1.7-4.1.3.i586
$ cat /lib/udev/rules.d/40-usb_modeswitch.rules |grep 12d1
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1001", RUN+="usb_modeswitch '%b/%k'"
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1003", RUN+="usb_modeswitch '%b/%k'"
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1009", RUN+="usb_modeswitch '%b/%k'"
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="101e", RUN+="usb_modeswitch '%b/%k'"
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1031", RUN+="usb_modeswitch '%b/%k'"
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1414", RUN+="usb_modeswitch '%b/%k'"
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1446", RUN+="usb_modeswitch '%b/%k'"
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1449", RUN+="usb_modeswitch '%b/%k'"
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="14ad", RUN+="usb_modeswitch '%b/%k'"
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="14c1", RUN+="usb_modeswitch '%b/%k'"
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1520", RUN+="usb_modeswitch '%b/%k'"
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1521", RUN+="usb_modeswitch '%b/%k'"
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1523", RUN+="usb_modeswitch '%b/%k'"
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1553", RUN+="usb_modeswitch '%b/%k'"
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1557", RUN+="usb_modeswitch '%b/%k'"
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1c0b", RUN+="usb_modeswitch '%b/%k'"
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1da1", RUN+="usb_modeswitch '%b/%k'"
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="380b", RUN+="usb_modeswitch '%b/%k'"

I added this, took the device out and plugged back in (not sure if it required any further steps) but there wasn’t any change.

Your lsusb and dmesg output confirm that the device is recognised as a storage device (common with many of these type of devices):

Bus 001 Device 006: ID 12d1:1f01 Huawei Technologies Co., Ltd.

The rule required has to reflect the above vendor and product ID’s in order for usb_modeswitch to be executed, and expose the modem device. So, it should actually be

ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1f01", RUN+="usb_modeswitch '%b/%k'"

Make the edit, then re-insert the modem again. If usb_modeswitch is triggered and can handle the device, then you should now see a different product ID active. Check with

lsusb

We then need to examine whether /dev/ttyUSB[0,1,2…] exists. (The ‘dmesg|tail’ command may also show kernel output relating to the modem device, provided the driver supports it).

ls -l /dev/ttyUSB*

From what I’ve read online, it seems that the E3131 (4G capable device) may work as an ethernet device (with the appropriate driver support). This contrasts with earlier 3G modem sticks, which appear as a high speed serial modem device. AFAIU, usb_modemswitch is still required to enable the modem chipset, but it appears that the ‘cdc_ether’ driver plays a part too. For now, I’ll just share what I found:

DD-WRT Forum :: View topic - Problems with Huawei E353 modem on TP-LINK WR703N

I put in the proper product id and reinserted the device. No change to the product id reported by ‘lsusb’ though, plus dmesg tail output is the same and still nothing under /dev/ttyUSB*

Based on the last link I sent you, this device does not present itself as a ‘serial’ modem, (so no /dev/ttyUSB*). Instead, when activated, it appears to be a network device, with an ethernet interface. I don’t have experience of configuring or using this type of device, and the information I’ve been able to trawl from the web is sketchy at best. I’m not sure what may be required (if anything) to activate it.

You could try to see if any interface is added when the device is plugged in (ie compare before/after)

/sbin/ifconfig -a

The link I gave is for router discussion (running a Linux-based openWRT router OS), but the last few posts hint at what may be required. Try loading the following module (as root), with the device plugged in

modprobe cdc_ether

Then, check network interfaces again with ‘/sbin/ifconfig -a’.

Tried this and I don’t see any extra devices with ‘/sbin/ifconfig -a’ with the device plugged in even after ‘modprobe cdc_ether’.

Thanks for all your help with this. I had assumed I just didn’t understand how to set it up :wink: but it looks like it’s a bit more complicated than that. I’m wondering now whether to just connect to my phone for mobile internet (which does work) and give up on this.

Anyway as I said thanks for the information, I certainly understand what’s going on a lot better than I did this time yesterday!

We gave it our best shot I guess. I’m sure the required support will come in time.

JFYI: I have tested HUAWEI E3131 in openSUSE-12.2 and it works out of box, I’m using it via NetworkManager applet in KDE, no problems so far.

In older version (<12.2) you might try updating usb_modeswitch package to the latest version (maybe there is already a port in OBS), I found out that the package in 12.1 misses the entry for this modem.

Hello,

I have a DL tablet T7 and the huawei e3131, but it doesn’t appear as available on menu. There are many models, except the e3131… How can I use my modem, is there any driver or something to add this model on the list?

Thanks,

Luciano Costa

sorry for undigging this old thread but i am facing the same problem with this modem on 13,2. the modem works fine under ubuntu and kubuntu,
i tried to install a driver by running a script, the modem starts to work until the next reboot. i noticed that when i reboot, an error occur named “kinit did not find xhost executable”, an error that i have never seen before. i think it is related to the fact that i am trying to install that driver.
i will give you any further information if it is necessary.
thanx in advance!

The original usb_modeswitch in 13.2 has problems with huawei new sticks: checkthis post and it should work, AFAIK.
If not, report back what you see with

lsusb | grep 12d1

and

dmesg | grep 12d1

Good Luck!

okay…thanx a lot!
i have updated usb_modeswitch/ _data 2.2.0 but no positive result.
then, i installed back default usb_modeswitch but the 211-216 version…still no positive result.
here is the output of:

rich1974@linux:~> lsusb | grep 12d1
Bus 001 Device 008: ID 12d1:1506 Huawei Technologies Co., Ltd. E398 LTE/UMTS/GSM Modem/Networkcard

and:

rich1974@linux:~> dmesg | grep 12d1
  149.473141] usb 1-4: New USB device found, idVendor=12d1, idProduct=14fe
  156.921477] usb 1-4: New USB device found, idVendor=12d1, idProduct=1506

it seems to me that the modem is switched to modem mode…

Well, let’s recap a few points.

  1. Be sure to disable the PIN protection, just in case.
rich1974@linux:~> dmesg | grep 12d1
  149.473141] usb 1-4: New USB device found, idVendor=12d1, idProduct=14fe
  156.921477] usb 1-4: New USB device found, idVendor=12d1, idProduct=1506
  1. the stick is indeed switched to modem mode, one way or the other.
  2. I would prefer having the 2.2.0-7.1 version of usb_modeswitch and _data;they should be able to switch the stick and are more up to date.
rich1974@linux:~> lsusb | grep 12d1
Bus 001 Device 008: ID 12d1:1506 Huawei Technologies Co., Ltd. E398 LTE/UMTS/GSM Modem/Networkcard
  1. I don’t know the E3131, but googling the E398 I found that if you type:
usb-devices

you should see (among other stuff) something like:


T:  Bus=02 Lev=01 Prnt=01 Port=03 Cnt=01 Dev#=  4 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=12d1 ProdID=1506 Rev=01.02
S:  Manufacturer=HUAWEI Technology
S:  Product=HUAWEI Mobile
C:  #Ifs= 4 Cfg#= 1 Atr=80 MxPwr=500mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=02 Prot=12 Driver=option
I:  If#= 1 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=02 Prot=16 Driver=huawei_cdc_ncm
I:  If#= 2 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
I:  If#= 3 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
  1. if this is the case, typing:
lsmod

the two modules “option” and “huawei_cdc_ncm” should appear in the list of loaded modules.
If so, maybe the problem is with ModemManager or network configuration.
If not, post what you see instead and hope that someone more expert than me jumps in :wink:

okay…i will do this tonight when i get back home. it is nice to see that someone from the old roman empire is trying to help me.

and offtopic…
on android 4.2. this modems works only with ppp widget 2.

this is the output of lsmod, among others:

cdc_wdm                18505  1 huawei_cdc_ncm
option                 38222  2 
usbnet                 37824  2 huawei_cdc_ncm,cdc_ncm
cdc_ncm                29856  1 huawei_cdc_ncm
huawei_cdc_ncm         12822  0