Installing drivers for a 4G module (EP06-E)

Hello, as outlined in my previous topic, I have quite basic knowledge (though firm logical thinking) about networking and linux so I will need some help with configuring my x86 OpenWrt machine. I have connected a usb 4G modem EP06-E and I am in the process of making it function. I have already tested it under Windows on a different machine so I know it works if it is configured properly (i.e. no hardware issues with the modem whatsoever). Following the manufacturer's guide, it says I will need to modify the linux kernel in order to install the drivers for the modem.

"In order to recognize the module, the module’s VID and PID information as below need to be added to the
file [KERNEL]/drivers/usb/serial/option.c."

And... it is at the very beginning that I am struggling to find a way to open the kernel. I have connected the router via ssh to my laptop. Can you please assist me with this? I know the solution might not be as simple as I expect it to be, but then again, I couldn't really find the appropriate guides for my case. I would like to point out that I have already expanded the space on my OpenWrt installation so storage is no issue.

Might not be required at all, what are PID and VID?

1 Like

{ USB_DEVICE(0x2C7C, 0x0306) }

though there are more but they are for other models as outlined here: https://forums.quectel.com/uploads/short-url/pSWY9JoNAkQ0p7rZLLAewQPXtf5.pdf page 13 on the pdf.

Look for 2c7c:0306, here at the forum.

You could however start at Activate 4G roaming

1 Like

Start here:

and don't read the 'manufacturer's guide' )

1 Like

Those IDs should already be compiled into the OpenWrt kmods. It will not be necessary to modify any source code. Install these packages:

opkg install uqmi kmod-usb-serial-option

This will bring in several others as dependencies, and be sufficient to operate the modem in qmi mode, using an interface proto qmi block in /etc/config/network. If you use LuCI, install luci-proto-qmi. Generally you won't use modemmanager and usb-modeswitch is for pluggable dongle type modems.

1 Like

Hello. I have installed the mentioned packages but the system still won't see the 4G modem. it is plugged indeed using usb connection as the modem is connected to an adapter card connected via a usb cable. I rebooted, then installed modemmanager and usb-modeswitch and I still cannot see the device.

Unplug and replug the modem and look for new entries in the system log. You should see the drivers claim the modem. It's not going to actually do anything until it is configured though.

nothing happens in the system log - no new entries upon replugging the device. the adapter board has leds on it and they light up as expected, so it does indeed connect, it just does not get detected.

when i type
ls -l /dev/cdc-wdm0

it says no such directory

And if you plug something else into that same USB port?
Mouse, keyboard, etc...

my keyboard gets detected

Show the output of cat /sys/kernel/debug/usb/devices

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480  MxCh=16
B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0002 Rev= 5.10
S:  Manufacturer=Linux 5.10.146 xhci-hcd
S:  Product=xHCI Host Controller
S:  SerialNumber=0000:00:14.0
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=10 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=01 Prnt=01 Port=11 Cnt=02 Dev#=  3 Spd=480  MxCh= 0
D:  Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=0414 ProdID=a00b Rev= 0.08
S:  Manufacturer=Generic
S:  Product=USB Audio
C:* #Ifs= 5 Cfg#= 1 Atr=80 MxPwr=100mA
A:  FirstIf#= 0 IfCount= 4 Cls=01(audio) Sub=00 Prot=20
I:* If#= 0 Alt= 0 #EPs= 1 Cls=01(audio) Sub=01 Prot=20 Driver=(none)
E:  Ad=89(I) Atr=03(Int.) MxPS=  16 Ivl=16ms
I:* If#= 1 Alt= 0 #EPs= 0 Cls=01(audio) Sub=02 Prot=20 Driver=(none)
I:  If#= 1 Alt= 1 #EPs= 1 Cls=01(audio) Sub=02 Prot=20 Driver=(none)
E:  Ad=81(I) Atr=05(Isoc) MxPS= 124 Ivl=125us
I:  If#= 1 Alt= 2 #EPs= 1 Cls=01(audio) Sub=02 Prot=20 Driver=(none)
E:  Ad=81(I) Atr=05(Isoc) MxPS= 186 Ivl=125us
I:  If#= 1 Alt= 3 #EPs= 1 Cls=01(audio) Sub=02 Prot=20 Driver=(none)
E:  Ad=81(I) Atr=05(Isoc) MxPS= 124 Ivl=125us
I:  If#= 1 Alt= 4 #EPs= 1 Cls=01(audio) Sub=02 Prot=20 Driver=(none)
E:  Ad=81(I) Atr=05(Isoc) MxPS= 186 Ivl=125us
I:  If#= 1 Alt= 5 #EPs= 1 Cls=01(audio) Sub=02 Prot=20 Driver=(none)
E:  Ad=81(I) Atr=05(Isoc) MxPS= 124 Ivl=125us
I:  If#= 1 Alt= 6 #EPs= 1 Cls=01(audio) Sub=02 Prot=20 Driver=(none)
E:  Ad=81(I) Atr=05(Isoc) MxPS= 186 Ivl=125us
I:  If#= 1 Alt= 7 #EPs= 1 Cls=01(audio) Sub=02 Prot=20 Driver=(none)
E:  Ad=81(I) Atr=05(Isoc) MxPS= 124 Ivl=125us
I:  If#= 1 Alt= 8 #EPs= 1 Cls=01(audio) Sub=02 Prot=20 Driver=(none)
E:  Ad=81(I) Atr=05(Isoc) MxPS= 186 Ivl=125us
I:* If#= 2 Alt= 0 #EPs= 0 Cls=01(audio) Sub=02 Prot=20 Driver=(none)
I:  If#= 2 Alt= 1 #EPs= 1 Cls=01(audio) Sub=02 Prot=20 Driver=(none)
E:  Ad=84(I) Atr=05(Isoc) MxPS= 124 Ivl=125us
I:  If#= 2 Alt= 2 #EPs= 1 Cls=01(audio) Sub=02 Prot=20 Driver=(none)
E:  Ad=84(I) Atr=05(Isoc) MxPS= 186 Ivl=125us
I:  If#= 2 Alt= 3 #EPs= 1 Cls=01(audio) Sub=02 Prot=20 Driver=(none)
E:  Ad=84(I) Atr=05(Isoc) MxPS= 124 Ivl=125us
I:  If#= 2 Alt= 4 #EPs= 1 Cls=01(audio) Sub=02 Prot=20 Driver=(none)
E:  Ad=84(I) Atr=05(Isoc) MxPS= 186 Ivl=125us
I:  If#= 2 Alt= 5 #EPs= 1 Cls=01(audio) Sub=02 Prot=20 Driver=(none)
E:  Ad=84(I) Atr=05(Isoc) MxPS= 124 Ivl=125us
I:  If#= 2 Alt= 6 #EPs= 1 Cls=01(audio) Sub=02 Prot=20 Driver=(none)
E:  Ad=84(I) Atr=05(Isoc) MxPS= 186 Ivl=125us
I:  If#= 2 Alt= 7 #EPs= 1 Cls=01(audio) Sub=02 Prot=20 Driver=(none)
E:  Ad=84(I) Atr=05(Isoc) MxPS= 124 Ivl=125us
I:  If#= 2 Alt= 8 #EPs= 1 Cls=01(audio) Sub=02 Prot=20 Driver=(none)
E:  Ad=84(I) Atr=05(Isoc) MxPS= 186 Ivl=125us
I:* If#= 3 Alt= 0 #EPs= 0 Cls=01(audio) Sub=02 Prot=20 Driver=(none)
I:  If#= 3 Alt= 1 #EPs= 1 Cls=01(audio) Sub=02 Prot=20 Driver=(none)
E:  Ad=05(O) Atr=09(Isoc) MxPS= 124 Ivl=125us
I:  If#= 3 Alt= 2 #EPs= 1 Cls=01(audio) Sub=02 Prot=20 Driver=(none)
E:  Ad=05(O) Atr=09(Isoc) MxPS= 186 Ivl=125us
I:  If#= 3 Alt= 3 #EPs= 1 Cls=01(audio) Sub=02 Prot=20 Driver=(none)
E:  Ad=05(O) Atr=09(Isoc) MxPS= 248 Ivl=125us
I:* If#= 4 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=00 Driver=usbhid
E:  Ad=8a(I) Atr=03(Int.) MxPS=  16 Ivl=1ms

T:  Bus=01 Lev=01 Prnt=01 Port=12 Cnt=03 Dev#=  4 Spd=12   MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=048d ProdID=5702 Rev= 0.01
S:  Manufacturer=Љ
S:  Product=Љ
C:  #Ifs= 0 Cfg#= 1 Atr=a0 MxPwr=100mA

T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=10000 MxCh=10
B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 3.10 Cls=09(hub  ) Sub=00 Prot=03 MxPS= 9 #Cfgs=  1
P:  Vendor=1d6b ProdID=0003 Rev= 5.10
S:  Manufacturer=Linux 5.10.146 xhci-hcd
S:  Product=xHCI Host Controller
S:  SerialNumber=0000:00:14.0
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=03 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480  MxCh= 2
B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0002 Rev= 5.10
S:  Manufacturer=Linux 5.10.146 xhci-hcd
S:  Product=xHCI Host Controller
S:  SerialNumber=0000:40:00.0
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=04 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=10000 MxCh= 2
B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 3.10 Cls=09(hub  ) Sub=00 Prot=03 MxPS= 9 #Cfgs=  1
P:  Vendor=1d6b ProdID=0003 Rev= 5.10
S:  Manufacturer=Linux 5.10.146 xhci-hcd
S:  Product=xHCI Host Controller
S:  SerialNumber=0000:40:00.0
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

I'm thinking.. what is the wattage on such 4G modems? Maybe usb cannot supply enough power? Then again, the adapter card was working under windows flawlessly.

Are you using the same USB cable? What adapter or enclosure do you have?
It looks like the USB data lines are not connected.

I am indeed using the exact same cable. The adapter is the following:

That's weird... Can you connect your modem through a powered USB hub?

the closest to a powered usb hub I have is a thunderbolt hub but when plugged through it, I still do not see the device. I have used said hub to connect display output from integrated graphics directly from the x86 router so it is definitely recognised. It's the modem that is the problem. After installing Quectel's drivers on Windows, it worked for a whole day with my sim card in it without a hitch. Not sure what is going on, but this is also the second adapter I am using, as the previous one had issues with not recognising the sim card (I think due to interference, as the slot was too close to the antenna on the module) - but at least the modem could still be seen, under Windows.

First you should see your device in cat /sys/kernel/debug/usb/devices output, all the drivers are out of discussion yet.

1 Like

I changed the usb cable. I can now see the device. Wow. I guess I can write the previous cable off. No visible damage to it, it also has all the pins so idk what happened there. I can also see it in LuCI. It's config time. I guess I will be able to take it from here. It's the messy driver part that was difficult. Thank you very much to all! I will be back in a few days as I also have a miniPCIe ax card (connected via a m2 to miniPCIe adapter) to install too haha. But I will open another thread when I am finished with the 4G modem. And only if I cannot troubleshoot it myself.