Mifi LEDE

Hi all,

 

Has anybody gotten the gl-mifi working properly with LEDE? I have tried compiling and flashing both the Domino openwrt CC and LEDE firmwares, but with LEDE, I can never get the cdc-wdm0 device up. I assume this means that the qmi driver is not loading properly?

 

Regards,

Aaron

Hi @doaaron I have gotten it to work with latest LEDE.

To get cdc-wdm0 up you need to have kernel modules: kmod-usb-net-qmi-wwan and kmod-usb-serial-wwan

And you also need WWAN tools: comgt and uqmi

Thanks for the help. I will give it another try. I thought I had those modules installed, but I guess I must have missed something.

 

Best regards

Aaron

Has the latest Lede finally bumped the kernel for ar71xx targets up from 4.4?

Depending on what card you got with your MiFi you may have different success otherwise… I got the Quectel EC-25 and had to backport the QMI driver from 4.10 (which is basically what GLs CC does) in order to get it working. Took a bit of effort but definitely works.

The current LEDE 17.01.4 uses kernel version 4.4.92 so the QMI driver from LEDE’s main repo works fine.

for the openwrt CC and LEDE getting form gl-inet official website, it’s very easy. it have a seletion to auto select all the package it needed .

Gl.iNet package choice shortcut —>

[*] basic package

[ ] include Luci

[*] support USB storage and sharing

[*] support ttyUSB modem

[*] support modem qmi mode

[*] support huawei ncm mode

[ ] support iPhone tethering

[ ] support webcam and streaming

[ ] Support Openvpn openssl

[ ] Support PPtP and L2TP

[ ] Support shadowsocks etc

[ ] Choose MC and select its options

 

Backports is a little out of my comfort zone. I compiled from the domino lede repository in the same way mentioned by <span style=“background-color: #f9f9f9; color: #222222; font-family: source_sans_proregular, ‘Helvetica Neue’, Arial, Helvetica, Geneva, sans-serif; font-weight: bold;”>tangxiusi</span> but it did not work for me (/dev/cdc-wdm0 never appears, but I do get TTYUSB0-TTYUSB3). I’m using EC25-e. Openwrt CC from the domino repository worked fine, and I chose my build options in the same manner. I also had all of the packages mentioned by Heavymetal.

Anyway I’m not fussed about getting it working at the moment since Openwrt CC works, but perhaps I will re-visit the issue later. Thanks for all of the help.

 

regards,

Aaron

I think the QMI driver in LEDE have problem and need to be patched. Will have a check as we need to make LEDE firmware as well.

@heavymetal which card are you using? Official linux support for the EC-25 was not added to the kernel QMI driver until at least 4.9, so unless somebody at LEDE has built patches to backport the driver and required other updates from 4.9 to 4.4 the stock LEDE using Kernel 4.4 will not work with EC-25. (support for other cards worked fine OK in 4.4, but even the other Quectel cards were not ideal because the QMI driver was letting the card’s flaky firmware do the hardware->IP translation, where as in 4.9 QMI switched to use RAW-IP mode instead which should be far more reliable. I read one of the kernel devs say that RAW-IP mode was like putting the modem into bridge mode instead of letting it do it’s own IP handling/etc. Not sure if that analogy is accurate but?)

Now, trunk LEDE has in the last month or so added a 4.9 target for ar71xx platforms, but I haven’t looked to see if it’s set for default or just there for testing still. Once that becomes default then stock should work properly out of the box. @alzhao you may want to pull the latest LEDE trunk and test with 4.9 kernel. If you do need to build firmware based on LEDE 4.4 kernel shoot me an email, I can send you the backport patches I did already.

@jolouis I am using the EC-20.

I thought the EC-25 would have support as well in the stable LEDE but guess not.

For Raw IP in the new driver does this also work for the older EC-20?

@heavymetal are you sure it’s an EC-20 and not a UC-20? If it is an EC-20 then there are two different hardware versions (r1.0 and r2.0). From my understanding, a 1.0 shares the same interface/hardware as the UC cards, while the r2.0 is in the same family as the EC-21/EC-25.

The UC cards have completely different internal hardware, and that’s probably why you saw support in stable LEDE as they were integrated into the mainline kernel earlier on (since they’re older cards). Never did any research to see if those cards would run in Raw IP mode, but from the notes I did see it looked like a general Quectel thing so probably worth firing up a build and trying at least.

As I mentioned you need to make sure you’re using at least kernel 4.9, or else a build with the appropriate stuff from 4.9 back-ported to it.

I am not sure where to see the hardware versions as they are not printed on the card. I have pasted the gcom, lsusb and uqmi below.

$ gcom info

Wireless WAN Modem Configuration

Trying list of devices
Product text:

Quectel
EC20
Revision: EC20AQAR02A04E2G
OK

Manufacturer: Quectel
IMEI and Serial Number: xxxxxxxxxxxxxxx
Manufacturer’s Revision:
EC20AQAR02A04E
Hardware Revision:

Network Locked: 0
Customisation:

Band settings: (
)

APN: 1,“IPV4V6”,“ltedata.apn”,“0.0.0.0”,0,0

END

$ lsusb
Bus 001 Device 004: ID 05c6:9215 Qualcomm, Inc. Acer Gobi 2000 Wireless Modem

 

$ uqmi -d /dev/cdc-wdm0 --get-capabilities
{
“max_tx_channel_rate”: 50000000,
“max_rx_channel_rate”: 100000000,
“data_service”: “non_simultaneous_cs_ps”,
“sim”: “supported”,
“networks”: [
“gsm”,
“umts”,
“lte”
]
}

@heavymetal based on your USB ID of 05c6:9215 you’ve got the older EC-20 r1.0

I don’t believe the newer QMI driver will put it into Raw IP mode by default, but if using the newer driver you might be able to force the mode with a configuration setting. I have no experience doing that as I don’t have an older card to test with unfortunately… but google may be helpful.

For reference, here’s the original Raw IP patch with the commit explaining why, in case anyone is curious for a more informed answer on the subject:

https://patchwork.ozlabs.org/patch/552408/

Thanks @jolouis

Another thing I noticed in QMI is when the modem changes IP address in normal Ethernet mode the wwan0 IP will not renew until the lease is up.

Will RAW-IP solve this?

@heavymetal

my understanding would be yes, using Raw IP would solve that issue. Going back to the analogy I stated earlier, using Raw IP mode essentially lets the modem act as a bridge connecting the lower level packets from the Mifi directly to the mobile network provider. So the modem no longer has an IP address, the IP provided by the network is configured directly on the MiFi device.

In 802.3 mode (default before Raw IP), the modem was essentially acting more like a router and doing a bunch of IP mangling in order to pass traffic back and forth. Supposedly the firmware responsible for that work was generally very poor at its job, and hence the move for Linux at least to use Raw IP out of the box for anything that supported it.

Can’t say for sure of course, but from what I’ve read there’s a good chance Raw IP mode would solve that problem for you.

1 Like

Thanks @jolouis

Can you give me your mifi lede bin to me? Or make the newest lede bin for me ?thanks !