PLEASE help with ZTE K5161z

Dear Experts,

Now being under time pressure, I bought a USB modem / dongle from Vodafone. It turned out to be ZTE K5161z. Please kindly advise how to make it working (if hopefully possible):

# lsusb
Bus 001 Device 015: ID 19d2:1405 ZTE WCDMA Technologies MSM
Bus 001 Device 003: ID 0951:1665 Kingston Technology Digital DataTraveler SE9 64GB
Bus 001 Device 002: ID 05e3:0608 Genesys Logic, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Here I was happy, that it is being recognized by the system!

# lsusb -t
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-platform/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
        |__ Port 1: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage, 480M
        |__ Port 2: Dev 15, If 0, Class=Communications, Driver=, 480M
        |__ Port 2: Dev 15, If 1, Class=CDC Data, Driver=, 480M
        |__ Port 2: Dev 15, If 2, Class=Mass Storage, Driver=usb-storage, 480M

Unfortunately, I have no cdc* or ttyUSB* files in /dev

In dmesg I see, that it is (probably) detected as a CD-ROM:

[   70.921352] scsi 1:0:0:0: CD-ROM            ZTE      USB SCSI CD-ROM  2.3  PQ: 0 ANSI: 2

I have installed the following packages:

opkg install uqmi
opkg install usb-modeswitch
opkg install kmod-usb-serial-option
opkg install kmod-usb-serial-qualcomm

And those are my USB devices:

# cat /sys/kernel/debug/usb/devices

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480  MxCh= 1
B:  Alloc=  0/800 us ( 0%), #Int=  1, #Iso=  0
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0002 Rev= 4.09
S:  Manufacturer=Linux 4.9.120 ehci_hcd
S:  Product=EHCI Host Controller
S:  SerialNumber=ehci-platform
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256ms

T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=480  MxCh= 4
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=05e3 ProdID=0608 Rev=85.36
S:  Product=USB2.0 Hub
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   1 Ivl=256ms

T:  Bus=01 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#=  3 Spd=480  MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=0951 ProdID=1665 Rev= 2.00
S:  Manufacturer=Kingston
S:  Product=DataTraveler 2.0
S:  SerialNumber=001A4D5D52A81011F9240A26
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms

T:  Bus=01 Lev=02 Prnt=02 Port=01 Cnt=02 Dev#= 15 Spd=480  MxCh= 0
D:  Ver= 2.00 Cls=02(comm.) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=19d2 ProdID=1405 Rev=58.13
S:  Manufacturer=DEMO,Incorporated
S:  Product=DEMO Mobile Boardband
S:  SerialNumber=1234567890ABCDEF
C:* #Ifs= 3 Cfg#= 1 Atr=c0 MxPwr=500mA
A:  FirstIf#= 0 IfCount= 2 Cls=02(comm.) Sub=06 Prot=00
I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=06 Prot=00 Driver=(none)
E:  Ad=87(I) Atr=03(Int.) MxPS=  16 Ivl=32ms
I:* If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=00 Driver=(none)
I:  If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=(none)
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 2 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=125us

Please kindly let me know how to get this working ? It looks much more difficult than anticipated... Thanks a lot!

Follow this:

Many thanks, AndrewZ!

How do I figure out the correct AT command(s) for my modem ?

 This is an example for popular Quectel modems:

AT+QCFG="usbnet"	# check the current mode
AT+QCFG="usbnet",1	# set ECM mode

You have no com port, so there are no commands.

Some modems require manual switching into ECM mode by using AT commands.

Your modem is already in ECM mode.

Dear AndrewZ,

I have installed kmod-usb-net-cdc-ether.
I could see the following line in dmesg:

cdc_ether 1-1.2:1.0 eth1: register 'cdc_ether' at usb-ehci-platform-1.2, ZTE CDC Ethernet Device, 34:4b:50:00:00:00

Does it mean, that my dongle is eth1 ? So I have to configure this device ? Many thanks for the info!

I have configured it against eth1. Now I see an IP address on eth1.
Is this correct ?
If yes, I don't know how to continue. The next (and hopefully last) step should be modifying the firewall. Could you please kindly advise the exact steps to do that, I as I have no clue :frowning:
My /etc/config/firewall file looks totally different that the example in the link you have sent me...

P. S.: Somewhere (but I can't find where), I have read that there are 2 scenarios - to use mobile data as a main connection and to use mobile data as a fallback in case the main line fails. I would be interested in the second scenario.

Many thanks for your help!

Hello, could please anyone reply quickly ? I was planning to return the Vodafone stick today, if I cannot make it work on OpenWRT. I am in time pressure and I need to move ahead. Many thanks!

Yes, eth1 is your interface, you just need to follow the wiki, read "Using Luci" section there.
You don't need to manually modify your firewall configuration.

Go to Network->Interfaces and edit the wan. Change the Device from whatever it is now to be eth1. Do the same thing with wan6.

1 Like

MANY THANKS !!!! This has worked !!!!
However, when I was swithing back to the wired internet connection, I observed one phenomenon. It would be really nice of yours, if you could explain that.

For the test, I had pulled out the data cable from the OpenWRT router. When I switched back from eth1 (lte) to eth0.2, I was wondering why there was no internet, as I had forgotten about the disconnected cable.
I have rebooted the OpenWRT router and despite having the old configuration and the cable pulled out, there was internet connection, which could only come over the LTE stick. Many thanks!

I've been trying to set up a Vodafone ZTE K5161z USB cellular modem as failover on a Gl.Inet GL-SFT1200 Opal travel router.

Opal is running latest version of router software, based on OpenWrt 18.06 and kernel version 4.14.90. The USB modem indicates it is up to date.

This thread helped me with the initial setup and figuring out what I needed (to do) to have the Opal recognise the modem. Specifically identifying the cdc_ether identifier and type.

However, following through to the end did not yield a working setup, with the modem still not working nor controllable through either the Glinet web interface nor through the Luci interface.

Some more searching led me to https://ambientnode.uk/raspi-router/ where these paragraphs helped me finish up:

K5161z setting up in OpenWRT

  • Return to the web interface, go to Network > Interfaces > Add new interface:
  • Name: LTE (or anything else)
  • Protocol: I had to select DHCP client as the 4G dongle was unfortunately routing the network already. If you are following along and are lucky enough to find a "dumb" modem, follow this to configure the dongle in QMI or MDM mode.
  • Device: select the interface found earlier, in my case, eth1
  • Click Create interface.
  • Edit the new LTE interface and click Firewall settings> Assign firwall-zone: wan
  • Disable DHCP on the LAN bridge interface: Network >Interfaces ->Edit on LAN interface and click "Ignore this interface" next to DHCP.

Hope this will help any others in future.

Problem is, it's not running Openwrt, but a vendor SDK.
What you posted, may, or may not, work with Openwrt.

Your info should have been posted at the gl.inet forum.

2 Likes

Considering I used ("pure") OpenWRT advice to achieve the results on a vendor SDK I figured it might be useful. :man_shrugging:

The advice contained in this thread and the linked article are all for "pure" OpenWRT, all relevant to the OP hardware query; I happened to achieve success by applying this to the Glinet Opal version.

Thanks for the added caveat for future searchers, and for reminder to post on Glinet forums.

Problem is, it's using kernel 4.14, and release 18.06, that's 7 years old, give or take.

A lot have happened in Openwrt since then.

If the SFT1200 ever gets added, it will run kernel 6.6 or newer.

Understood, and hence why I explicitly stated my use case.

No worries though, feel free to flag for admin delete if it's considered totally irrelevant.

No worries, it's not entirely off topic ,)