Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#641 - Quectel ECXX and Raw IP on 4.4 kernel #6801

Closed
openwrt-bot opened this issue Mar 19, 2017 · 7 comments
Closed

FS#641 - Quectel ECXX and Raw IP on 4.4 kernel #6801

openwrt-bot opened this issue Mar 19, 2017 · 7 comments
Labels

Comments

@openwrt-bot
Copy link

mikaelbrostrom:

Hi,

have a ZBT-WE826 with a 3/4g modem inside, shipped by ZBT.
modem is a Quectel EC25-E.

lsusb: Bus 001 Device 004: ID 2c7c:0125

if i tell qmi_wwan to register the device using: echo "2c7c 0125" >/sys/bus/usb/drivers/qmi_wwan/new_id
device is detected and shows up in dmesg: qmi_wwan 1-1.2:1.4 wwan0: register 'qmi_wwan' at usb-101c0000.ehci-1.2, WWAN/QMI device, XXXXXXXXXXXXX, and /dev/cdc-wdm0 is created

when i try to talk to the device using uqmi, i don't get any response!
uqmi -d /dev/cdc-wdm0 --get-imei (command hangs)

it has to do with the DTR, found a patch for the device on this forum:
https://forum.turris.cz/t/lte-modem-typu-ec25-e-minipcie/2816/24

is it possible to patch the trunk, so this device get supported?

also, if i use option usb serial driver i can connect using pppd
same here, i have to tell option1 driver to detect the deivce.
echo "2c7c 0125" >/sys/bus/usb-serial/drivers/option1/new_id

tested on current trunk and 17.01.0

@openwrt-bot
Copy link
Author

mikaelbrostrom:

patch found here
http://www.atack.cz/omnia-ec25-patches.tgz

@openwrt-bot
Copy link
Author

mikaelbrostrom:

upstream kernel module that works:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/usb/qmi_wwan.c

@openwrt-bot
Copy link
Author

dchard:

I confirm this problem stil exist with latest LEDE (SNAPSHOT, r4462-f33de80) and kernel 4.4.71 and modem:

Quectel
EC25
Revision: EC25EFAR02A06M4G

The usb devid is: 2c7c:0125

If I install the QMI related stuff (usb-modeswitch kmod-mii kmod-usb-net kmod-usb-wdm kmod-usb-net-qmi-wwan uqmi) the CDC interface is not popping up at all, even with the above mentioned method (echo “2c7c 0125” >/sys/bus/usb/drivers/qmi_wwan/new_id)

If I install the option driver related stuff (kmod-usb-serial-option kmod-usb-serial kmod-usb-serial-wwan), the 4 virtual ttyUSB interfaces are up, interface 2 and 3 are responding to AT commands via minicom, yet it is not possible to start a PDN connection.

cat /sys/kernel/debug/usb/devices
T: Bus=01 Lev=02 Prnt=02 Port=01 Cnt=02 Dev#= 4 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=2c7c ProdID=0125 Rev= 3.18
S: Manufacturer=Android
S: Product=Android
C:* #Ifs= 5 Cfg#= 1 Atr=a0 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms
E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E: Ad=85(I) Atr=03(Int.) MxPS= 10 Ivl=32ms
E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E: Ad=87(I) Atr=03(Int.) MxPS= 10 Ivl=32ms
E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=usbserial_generic
E: Ad=89(I) Atr=03(Int.) MxPS= 8 Ivl=32ms
E: Ad=88(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms

@openwrt-bot
Copy link
Author

wildy:

Hi.

We've got a couple of ar71xx devices (GL-inet MIFI) that are shipping with the new Quectel EC25 modems. I have quickly grown tired of using them in PPP mode so I tried to backport qmi_wwan.c from upstream 4.9 into 4.4 (LEDE 17.01.2).
As of now, uqmi works but I can't seem to obtain a DHCP address on wwan0, both in Raw IP mode and 802.3 mode.

See: wildy/LEDE-source@bde7af1

I think that might be caused by some changes in usbnet code that we need to backport too?

I will try to make a more clean backport involving only the commits needed for EC25 but for now it would be nice to see if it works at all :)

@openwrt-bot
Copy link
Author

pepe2k:

Hi @wildy,

These changes are needed to make it working:

net: qmi_wwan: support "raw IP" mode
qmi_wwan: add support for Quectel EC21 and EC25
usbnet: allow mini-drivers to consume L2 headers
net: qmi_wwan: should hold RTNL while changing netdev type

Then, for EC21/25, in rawIP mode, issue:
echo "Y" > /sys/class/net/wwanX/qmi/raw_ip

Cheers,
Piotr

@openwrt-bot
Copy link
Author

ZupoLlask:

Hi Piotr,

I'm testing latest LEDE trunk snapshot (kernel 4.9) for ZBT WE826 with a MPCIE Quectel EC25 module.

When I install all QMI stuff (enumerated by wildy), /dev/cdc-wdm0 shows up automatically and after interface configuration this is the best I get from QMI:

Sat Aug 26 16:09:46 2017 daemon.notice netifd: Interface '4G_wan' is setting up now Sat Aug 26 16:09:46 2017 daemon.notice netifd: 4G_wan (21451): Waiting for network registration Sat Aug 26 16:09:47 2017 daemon.notice netifd: 4G_wan (21451): Starting network 4G_wan Sat Aug 26 16:09:47 2017 daemon.notice netifd: 4G_wan (21451): Unable to connect IPv4 Sat Aug 26 16:09:47 2017 daemon.notice netifd: 4G_wan (21502): Stopping network 4G_wan Sat Aug 26 16:09:47 2017 daemon.notice netifd: 4G_wan (21502): Command failed: Permission denied Sat Aug 26 16:09:47 2017 daemon.notice netifd: Interface '4G_wan' is now down

With UMTS/GPRS/EV-DO protocol everything works just fine.


I've made a few more tests, after deleting that "4G_wan" interface (mapped to /dev/cdc-wdm0) so it doesn't interfere with the tests:

root@LEDE:~# uqmi -d /dev/cdc-wdm0 --start-network --apn "blah_apn" --auth-type "both" --username "blah_apn" --password "test" --ip-family "ipv4" --autoconnect --profile 1 "No effect" root@LEDE:~# uqmi -d /dev/cdc-wdm0 --get-data-status "Incompatible state" root@LEDE:~# uqmi -d /dev/cdc-wdm0 --get-serving-system { "registration": "registered", "plmn_mcc": 268, "plmn_mnc": 1, "plmn_description": "voda P", "roaming": false } root@LEDE:~# uqmi -d /dev/cdc-wdm0 --get-signal-info { "type": "wcdma", "rssi": -76, "ecio": 14 }

@openwrt-bot
Copy link
Author

camel:

any news ?
is it now fully supported ?
i tested and only dev/ttyUSB2 and /dev/ttyUSB3 can be used..

USB0 and USB1 are out of order and not reacting
(tried current trunk)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant