OpenWrt Forum Archive

Topic: Huawei K5150 LTE dongle not working

The content of this topic has been archived on 27 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello, I'm trying to establish 4G connection on Turris Omnia with this 2 years old dongle from Huawei (Vodafone). It's updated to newest firmware v7.0 and works smoothly on Windows 10 and Ubuntu 16.04. Sadly on Omnia it just keeps blinking and when I try to add UMTS/GPRS/EV-DO interface through LuCI I don't have any /dev/ttyUSB available.

When I try

lsusb -v

it's classed as Mass Storage - SCSI, from my vigorous googling it appears it should be Communications - Ethernet Networking instead. I know this needs to be switched so next I tried

usbmode -l

which lists the correct device

Found device: 12d1:1f16 (Manufacturer: "Vodafone (Huawei)", Product: "K5150", Serial: "FFFFFFFFFFFFFFFF")

But if I try usbmode -s, nothing appears to be changed. Maybe I need to load custom config instead of relying on usb-mode.json?

Any advice is appreciated, I'm desperate here sad

[Firmware: OpenWrt omnia 15.05 r47055]

Install kmod-usb-net, kmod-usb-net-cdc, and kmod-usb-net-rndis.  Then plug dongle in and run ifconfig -a to see if you have a "usb0" network interface.  Most LTE dongles operate as CDC or rNDIS.  However you may need a proprietary driver.  Plug it into your Ubuntu machine then check which drivers loaded.

Mode switching on newer dongles is usually unnecessary.  The disk and ethernet functions operate at the same time. 

Once you have the usb0 interface, use it for your WAN instead of the ethernet port.  The default configuration should get a DHCP from the dongle and connect to the Internet.

Thank you for helping me. There is no package kmod-usb-net-cdc, only kmod-usb-net-cdc-ether, if that's just a typo all is installed.

ifconfig -a doesn't show any USBs on Turris. On Ubuntu sudo lshw -C network outputs

  *-network:0
       description: Ethernet interface
       physical id: 2
       logical name: enx582c80139263
       serial: 58:2c:80:13:92:63
       capabilities: ethernet physical
       configuration: broadcast=yes driver=cdc_ether driverversion=22-Aug-2005 firmware=CDC Ethernet Device ip=192.168.9.100 link=yes multicast=yes

(Last edited by Xeevis on 24 Dec 2016, 23:44)

I'm using a CDC device (a Sprint Pocket WiFi, WiFi turned off and USB tethered), here is the relevant stuff from my router's log:

[   15.371405] usbcore: registered new interface driver cdc_ether
...
[   29.937097] usb 1-1: new high-speed USB device number 2 using ehci-platform
[   30.132182] usb-storage 1-1:1.0: USB Mass Storage device detected
[   30.139298] usb-storage 1-1:1.0: Quirks match for vid 19d2 pid 1225: 1
[   30.146063] scsi host0: usb-storage 1-1:1.0
[   31.159236] scsi 0:0:0:0: CD-ROM            CWID     USB SCSI CD-ROM  2.31 PQ: 0 ANSI: 2
[   36.171537] usb 1-1: USB disconnect, device number 2
[   36.576953] usb 1-1: new high-speed USB device number 3 using ehci-platform
[   36.789251] cdc_ether 1-1:1.0 usb0: register 'cdc_ether' at usb-ehci-platform-1, CDC Ethernet Device, 1a:68:6a:XXXXXXXX

Something may be killing the CD function.  I didn't install modeswitch though.

The resulting interface to the modem looks like any other Ethernet device:

ifconfig -a
...
usb0      Link encap:Ethernet  HWaddr 1A:68:6A:XXXXXXXX  
          inet addr:192.168.128.146  Bcast:192.168.128.255  Mask:255.255.255.0
          inet6 addr: fe80::1868:6aff:XXXXXXXXX/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:5133585 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5097410 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2655740113 (2.4 GiB)  TX bytes:907286736 (865.2 MiB)

The -a (show all devices) is important, as until you link the device to a network it will be "down" and not be shown in the standard ifconfig.

Hello Guys,

I'm trying to do the same thing: I have a Turris Omnia, with a Huawei k5150 modem, but I too fail to bring the device to life properly.

After installing these

root@host:~# opkg list-installed | fgrep cdc
kmod-usb-net-cdc-ether - 4.4.59+4-1-627f0117679bc72ef5e58881035f567a-4
kmod-usb-net-cdc-mbim - 4.4.59+4-1-627f0117679bc72ef5e58881035f567a-4
kmod-usb-net-cdc-ncm - 4.4.59+4-1-627f0117679bc72ef5e58881035f567a-4
kmod-usb-net-huawei-cdc-ncm - 4.4.59+4-1-627f0117679bc72ef5e58881035f567a-4

The device starts showing singns of life

[   78.030620] usb 4-1: new high-speed USB device number 2 using xhci-hcd
[   78.172159] usb-storage 4-1:1.0: USB Mass Storage device detected
[   78.172327] scsi host2: usb-storage 4-1:1.0
[   78.232278] usb 4-1: usbfs: interface 0 claimed by usb-storage while 'usbmode' sets config #2
[   78.251005] cdc_mbim 4-1:2.0: setting rx_max = 16384
[   78.251168] cdc_mbim 4-1:2.0: setting tx_max = 16384
[   78.251177] cdc_mbim 4-1:2.0: NDP will be placed at end of frame for this device.
[   78.251281] cdc_mbim 4-1:2.0: cdc-wdm0: USB WDM device
[   78.251698] cdc_mbim 4-1:2.0 wwan0: register 'cdc_mbim' at usb-f10f8000.usb3-1, CDC MBIM, ae:2c:f2:b0:91:61
[   78.251968] usb-storage 4-1:2.2: USB Mass Storage device detected
[   78.252276] scsi host3: usb-storage 4-1:2.2
[   79.251064] scsi 3:0:0:0: Direct-Access     Vodafone Storage(Huawei)  2.31 PQ: 0 ANSI: 2
[   79.252821] sd 3:0:0:0: [sdb] Attached SCSI removable disk
[   99.262655] 8021q: adding VLAN 0 to HW filter on device wwan0

But after creating a new interface, and assigning the wwan0 physical interface to it, I still am unable to bring the device to life properly, as it doesn't get a proper dhcp lease, and it looks like this:

root@host:~# ip a s dev wwan0
22: wwan0: <BROADCAST,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN group default qlen 1000
    link/ether ae:2c:f2:b0:91:61 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::ac2c:f2ff:feb0:9161/64 scope link 
       valid_lft forever preferred_lft forever
root@host:~#

Did perhaps any of you manage to make this dongle work on Omnia?
Thanks!

Hi, first I had to install umbim package to even get wwan0 physical interface to appear, since it appears you already have the wwan0 it may not be necessary.

When creating interface my modem works only with wwan protocol, but that one isn't supported by Luci. You have to log in through SSH and change it via commands. It's also important to set apn and I also disabled PIN on the SIM.

uci set network.lte=interface
uci set network.lte.ifname='wwan0'
uci set network.lte.proto='wwan'
uci set network.lte.apn='internet'
uci commit

So when you use cat /etc/config/network you should have interface like this.

config interface 'lte'
        option ifname 'wwan0'
        option apn 'internet'
        option proto 'wwan'

You obviously also need to add this interface into wan zone in firewall.

Then your interface should connect properly and LED on the modem should be lit purple if 4G or green if 3G. Make sure you disconnect any other WAN interfaces or things will collide, for multi-wan to work you need to install and setup mwan3 (I didn't manage to get that working yet).

Just a tip, you can also put SD card in the modem and use it as extra flash storage, useful for persisting system/majordomo and other logs which by default go into temp.

(Last edited by Xeevis on 24 Apr 2017, 00:34)

Oh, thanks for the quick answer and sharing your solution! I will try your suggestions this evening!

Edited to add: It works! I'm writing this edit from the LTE connection!
Thank you for your help!

(Last edited by wowbaggerHU on 24 Apr 2017, 22:32)

The discussion might have continued from here.