gamwe6 / openwrt-tplink-tl-mr6400-v4

8 stars 3 forks source link

lte modem not enabled on most recent release #4

Open beatstick opened 3 years ago

beatstick commented 3 years ago

Hi, I am trying to get the lte modem to work with openwrt. This is the output I get from the command: mmcli -m 0:

Status | lock: sim-pin2 | unlock retries: sim-pin (3), sim-puk (10), sim-pin2 (3), sim-puk2 (10) | state: disabled | power state: on | signal quality: 0% (cached)

I've set everything according to the install instruction: https://gist.github.com/gamwe6/ef726b550037957a4d6d5255dc7efa7a

I've tried disabling the pin code on the sim card (on my android phone), entering pin2 instead of pin 1 etc, but I always get the status lock:sim-pin(2) message. What can I do. (Carrier is drillisch which is vodafone exactly as in the install instructions).

Any help would be appreciated.

beatstick commented 3 years ago

I got this info from logread:

at Jun 19 00:11:20 2021 user.notice ModemManager: hotplug: modem exported succe ssfully at /sys/devices/platform/101c0000.ehci/usb1/1-1 Sat Jun 19 00:11:20 2021 user.notice ModemManager: hotplug: setting interface 'v odafone' as available Sat Jun 19 00:11:20 2021 daemon.notice netifd: Interface 'vodafone' is setting u p now Sat Jun 19 00:11:20 2021 daemon.notice netifd: vodafone (3221): modem available at /org/freedesktop/ModemManager1/Modem/0 Sat Jun 19 00:11:20 2021 daemon.notice netifd: vodafone (3221): starting connect ion with apn 'internet'... Sat Jun 19 00:11:20 2021 daemon.info [1753]: [modem0] simple connect sta rted... Sat Jun 19 00:11:20 2021 daemon.info [1753]: [modem0] simple connect sta te (1/8): unlock check Sat Jun 19 00:11:22 2021 authpriv.notice dropbear[3203]: Password auth succeeded for 'root' from 192.168.1.100:4872 Sat Jun 19 00:11:22 2021 daemon.info [1753]: [modem0] simple connect sta te (2/8): wait to get fully initialized Sat Jun 19 00:11:22 2021 daemon.info [1753]: [modem0] state changed (loc ked -> initializing) Sat Jun 19 00:11:23 2021 daemon.warn [1753]: [modem0] couldn't load powe r state: Unhandled power state: 'shutting-down' (5) Sat Jun 19 00:11:23 2021 daemon.warn [1753]: [modem0] couldn't query SIM slots: QMI protocol error (94): 'NotSupported' Sat Jun 19 00:11:23 2021 user.notice ModemManager: hotplug: modem exported succe ssfully at /sys/devices/platform/101c0000.ehci/usb1/1-1 Sat Jun 19 00:11:23 2021 user.notice ModemManager: hotplug: setting interface 'v odafone' as available Sat Jun 19 00:11:23 2021 daemon.warn [1753]: [modem0/sim0] couldn't load operator identifier: Couldn't get home network: QMI protocol error (16): 'NotPr ovisioned' Sat Jun 19 00:11:23 2021 daemon.warn [1753]: [modem0/sim0] couldn't load operator name: Couldn't get home network: QMI protocol error (16): 'NotProvisio ned' Sat Jun 19 00:11:23 2021 daemon.warn [1753]: [modem0/sim0] couldn't load list of emergency numbers: No AT port available to run command Sat Jun 19 00:11:23 2021 daemon.warn [1753]: [modem0] couldn't load list of own numbers: Couldn't get MSISDN: QMI protocol error (16): 'NotProvisioned' Sat Jun 19 00:11:23 2021 daemon.warn [1753]: [modem0] couldn't load UE m ode of operation for EPS: No AT port available to run command Sat Jun 19 00:11:23 2021 daemon.info [1753]: [modem0] state changed (ini tializing -> disabled) Sat Jun 19 00:11:23 2021 daemon.info [1753]: [modem0] simple connect sta te (3/8): enable Sat Jun 19 00:11:23 2021 daemon.info [1753]: [modem0] state changed (dis abled -> enabling) Sat Jun 19 00:11:23 2021 daemon.info [1753]: [modem0] power state update d: on Sat Jun 19 00:11:23 2021 daemon.info [1753]: [modem0] 3GPP registration state changed (unknown -> searching) Sat Jun 19 00:11:23 2021 daemon.info [1753]: [modem0] 3GPP registration state changed (searching -> idle) Sat Jun 19 00:11:24 2021 daemon.info [1753]: [modem0] simple connect sta te (4/8): wait to get fully enabled Sat Jun 19 00:11:24 2021 daemon.info [1753]: [modem0] state changed (ena bling -> enabled) Sat Jun 19 00:11:24 2021 daemon.info [1753]: [modem0] simple connect sta te (5/8): register Sat Jun 19 00:11:24 2021 daemon.info [1753]: [modem0] simple connect sta te (6/8): bearer Sat Jun 19 00:11:24 2021 daemon.info [1753]: [modem0] simple connect sta te (7/8): connect Sat Jun 19 00:11:24 2021 daemon.info [1753]: [modem0] state changed (ena bled -> connecting) Sat Jun 19 00:11:24 2021 daemon.debug [1753]: [/dev/cdc-wdm0] Allocating new cli ent ID... Sat Jun 19 00:11:24 2021 daemon.debug [1753]: [/dev/cdc-wdm0] Registered 'wds' ( version 1.67) client with ID '3' Sat Jun 19 00:11:24 2021 daemon.info [1753]: [modem0/bearer0] couldn't s tart network: QMI protocol error (14): 'CallFailed' Sat Jun 19 00:11:24 2021 daemon.info [1753]: [modem0/bearer0] call end r eason (3): generic-no-service Sat Jun 19 00:11:24 2021 daemon.info [1753]: [modem0/bearer0] verbose ca ll end reason (3,2001): [cm] no-service Sat Jun 19 00:11:24 2021 daemon.warn [1753]: [modem0/bearer0] connection attempt #1 failed: QMI protocol error (14): 'CallFailed' Sat Jun 19 00:11:24 2021 daemon.info [1753]: [modem0] state changed (con necting -> enabled) Sat Jun 19 00:11:24 2021 daemon.info [1753]: [modem0/bearer0] connection #1 finished: duration 0s, tx: 0 bytes, rx :0 bytes Sat Jun 19 00:11:24 2021 daemon.notice netifd: vodafone (3221): error: couldn't connect the modem: 'GDBus.Error:org.freedesktop.libqmi.Error.Protocol.CallFailed : QMI protocol error (14): 'CallFailed'' Sat Jun 19 00:11:24 2021 daemon.info [1753]: [modem0] 3GPP registration state changed (idle -> registering) Sat Jun 19 00:11:24 2021 daemon.info [1753]: [modem0] 3GPP registration state changed (registering -> home) Sat Jun 19 00:11:24 2021 daemon.info [1753]: [modem0] state changed (ena bled -> registered) Sat Jun 19 00:11:24 2021 daemon.notice netifd: vodafone (3265): stopping network Sat Jun 19 00:11:25 2021 daemon.notice netifd: vodafone (3265): running disconne ction (common) Sat Jun 19 00:11:25 2021 daemon.notice netifd: vodafone (3265): Command failed: Permission denied Sat Jun 19 00:11:25 2021 daemon.notice netifd: vodafone (3265): successfully dis connected all bearers in the modem Sat Jun 19 00:11:25 2021 daemon.info [1753]: [modem0] state changed (reg istered -> disabling) Sat Jun 19 00:11:25 2021 daemon.info [1753]: [modem0] 3GPP registration state changed (home -> unknown) Sat Jun 19 00:11:25 2021 daemon.notice netifd: vodafone (3265): successfully dis abled the modem Sat Jun 19 00:11:25 2021 daemon.info [1753]: [modem0] state changed (dis abling -> disabled)

It seems the error has nothing to do with the pin but with the powerstate of the modem:

--> couldn't load powe r state: Unhandled power state: 'shutting-down' (5)

beatstick commented 3 years ago

I found partial solution according to these manual pages: https://manpages.ubuntu.com/manpages/bionic/man8/mmcli.8.html first find modem: mmcli -L

mmcli -e -m /org/freedesktop/ModemManager1/Modem/0

mmcli -m 0 --simple-connect="pin=1234,apn=internet"

I guess I could run those commands in a startup script, but there might be a better solution?

How do I tell openwrt that this is the modem to use now? Do I have to set a gateway/dns provider in /etc/config/network?

gamwe6 commented 3 years ago
beatstick commented 3 years ago

Yes, I followed these instructions here:

Download OpenWrt firmware image here.

Flash your router using this guide.

SSH into your router: ssh root@192.168.1.1.

Add a new interface in /etc/config/network.

option device 'switch0'
option vlan '2'
option ports '4 6t'

+ +config interface 'vodafone'


Maybe I need to upgrade to the routers newest original firmware first, or won't that make no difference? Is the modem still treated as a seperate android device and needs to be updated as well, as in v1 of the router?

beatstick commented 3 years ago

I got it to work now, but I think the lte modem is disabled on openwrt startup for some reason. So I have to start the whole shebang manually:

add to /etc/rc.local:

sleep 60 mmcli -e -m /org/freedesktop/ModemManager1/Modem/0 mmcli -m 0 --simple-connect="pin=XXXX,apn=internet" ifup vodafone