I already have the modem in ECM mode and configured correctly, the problem is that it does not give an IP address when requesting an address via DHCP, please you can look Troubleshooting section that the modem is already working in ECM mode and exist the interface usb0.
This problem is not new and I think it is solved with the AT commands mentioned above, because with those AT commands other people solved the same problem that I have, but I can’t execute them because they give me ERROR:
AT+QMAP?
AT+QMAP=?
AT+QCFG="ethernet",0
AT+QCFG="nat",0
AT+QNETDEVCTL=1,3,1
AT+CFUN=1,1
The modem itself has internet, it just doesn’t give me an IP address when I request an address via DHCP in Linux:
AT+QIACT=1
OK
AT+QIACT?
+QIACT: 1,1,1,"10.68.x.x"
OK
AT+CPIN?
+CPIN: READY
AT+QPING=1,"www.baidu.com"
OK
AT+QPING=1,"8.8.8.8"
OK
The only solution that I have found are the commands mentioned above but they do not work on my EM160R-GL modem (because they give me ERROR), what should be done now is to ask the modem firmware section manager to look at the EM160R-GL source code and find the problem in ECM mode by comparing with the firmware of other modem models and release a new firmware version to correct this problem.
Can you give me some AT commands or Linux commands to try, maybe it will help.
They have the same problem:
- EP06-E on EP06ELAR04A20M4G DHCP settings change ability lost
- EM160R-GL - always getting link local address in ECM mode
- EG25 in ECM mode under Linux
They had the same problem but they solved it with the commands below:
- Anyone who has worked with RM500U-CN? - #58 by jfrog
- Anyone who has worked with RM500U-CN? - #22 by jfrog
- ECM Dial-up - Waveshare Wiki
- RG500U - IPPT and RGMII - #2 by radiomean
Maybe these AT commands are the solution, but they give me ERROR:
AT+QCFG="ethernet"
ERROR
AT+QCFG="ethernet",0
ERROR
AT+QCFG="nat",0
ERROR
AT+QNETDEVCTL?
ERROR
AT+QNETDEVSTATUS
ERROR
AT+QNETDEVCTL=1,1,1
ERROR
AT+QNETDEVCTL=1,3,1
ERROR
AT+QNETDEVCTL=2,3,1
ERROR
AT+QNETDEVCTL=3,1,0
ERROR
AT+QNETDEVSTATUS
ERROR
AT+QMAP
ERROR
AT+QMAP?
ERROR
AT+QMAP=?
ERROR
AT+QMAP="LANIP"
ERROR
Please see all commands I have used in the Troubleshooting section.
root@OpenWrt:~# udhcpc -n -q -f -i usb0
udhcpc: started, v1.36.1
udhcpc: broadcasting discover
udhcpc: broadcasting discover
udhcpc: broadcasting discover
udhcpc: no lease, failing
root@OpenWrt:~# ip a
8: usb0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN qlen 1000
link/ether 1a:37:x:x:x:x brd ff:ff:ff:ff:ff:ff
inet6 fe80::1837:x:x:x/64 scope link
valid_lft forever preferred_lft forever
root@OpenWrt:~# ip route
192.168.1.0/24 dev br-lan scope link src 192.168.1.1
root@OpenWrt:~# ifconfig usb0
usb0 Link encap:Ethernet HWaddr 1A:37:x:x:x:x
inet6 addr: fe80::1837:x:x:x/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:12 errors:0 dropped:0 overruns:0 frame:0
TX packets:91 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:760 (760.0 B) TX bytes:29474 (28.7 KiB)
I don’t want to use ModemManager, I only installed ModemManager for testing purposes, the problem is that it is the only way to get the modem to work in ECM mode and I think it is a problem with the default firmware configuration and not a problem caused by me.
ModemManager has support with ECM mode, you can see at the end of the Temporary solution section:
root@OpenWrt:~# mmcli -L
/org/freedesktop/ModemManager1/Modem/0 [Quectel] EM160R-GL
root@OpenWrt:~# mmcli -m 0
--------------------------------
General | path: /org/freedesktop/ModemManager1/Modem/0
| device id: 372ac7fb1ce4dc1accb3798a55714e00f55e8d20
--------------------------------
Hardware | manufacturer: Quectel
| model: EM160R-GL
| firmware revision: EM160RGLAUR02A12M4GA
| supported: gsm-umts, lte
| current: gsm-umts, lte
| equipment id: xxxxxxx
--------------------------------
System | device: /sys/devices/platform/1e1c0000.xhci/usb2/2-1
| physdev: /sys/devices/platform/1e1c0000.xhci/usb2/2-1
| drivers: option1, cdc_ether
| plugin: quectel
| primary port: ttyUSB2
| ports: ttyUSB2 (at), ttyUSB3 (at), usb0 (net)
--------------------------------
Status | unlock retries: sim-pin (3), sim-puk (10), sim-pin2 (3), sim-puk2 (10)
| state: connected
| power state: on
| access tech: lte
| signal quality: 100% (recent)
--------------------------------
Modes | supported: allowed: 2g, 3g, 4g; preferred: none
| current: allowed: 2g, 3g, 4g; preferred: none
--------------------------------
IP | supported: ipv4, ipv6, ipv4v6
--------------------------------
3GPP | imei: xxxxxxx
| operator id: 708001
| operator name: CLARO HND LTE Claro
| registration: home
| packet service state: attached
--------------------------------
3GPP EPS | ue mode of operation: csps-2
--------------------------------
SIM | primary sim path: /org/freedesktop/ModemManager1/SIM/0
--------------------------------
Bearer | paths: /org/freedesktop/ModemManager1/Bearer/1