TP-Link TL-MR6400 v5 - LTE but no internet connection

Hey,

I followed the information from here to setup my LTE connection on my TP-Link TL-MR6400 v5 router. According to Luci and the uqmi tool it now seems to have a working LTE connection but I am still not able to access the internet. Does someone has an idea what could be the reason for that?

root@TL-MR6400:~# uqmi -d /dev/cdc-wdm0 --get-data-status
"connected"
root@TL-MR6400:~# uqmi -d /dev/cdc-wdm0 --get-current-settings
{
        "pdp-type": "ipv4-or-ipv6",
        "ip-family": "ipv4",
        "mtu": 1500,
        "ipv4": {
                "ip": "10.18.207.253",
                "dns1": "10.74.210.210",
                "dns2": "10.74.210.211",
                "gateway": "10.18.207.254",
                "subnet": "255.255.255.252"
        },
        "ipv6": {

        },
        "domain-names": {

        }
}

Does DNS work on the router?
Can you ping any host by its IP address (v4/v6) and/or hostname from the router?
No pictures please.

No, I tried to ping 1.1.1.1 (from the device) but it didn't work. So it's not (just) a dns issue.

ping 1.1.1.1 is not enough.
Check nslookup openwrt.org, ping your gateways, DNS servers, show ifstatus 4G output.

Here you go...

BusyBox v1.36.1 (2023-10-09 21:45:35 UTC) built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt 23.05.0, r23497-6637af95aa
 -----------------------------------------------------
root@TL-MR6400:~# uqmi -d /dev/cdc-wdm0 --get-data-status
"connected"
root@TL-MR6400:~# uqmi -d /dev/cdc-wdm0 --get-current-settings
{
        "pdp-type": "ipv4-or-ipv6",
        "ip-family": "ipv4",
        "mtu": 1500,
        "ipv4": {
                "ip": "10.19.72.115",
                "dns1": "10.74.210.210",
                "dns2": "10.74.210.211",
                "gateway": "10.19.72.116",
                "subnet": "255.255.255.248"
        },
        "ipv6": {

        },
        "domain-names": {

        }
}
root@TL-MR6400:~# nslookup openwrt.org
;; connection timed out; no servers could be reached
root@TL-MR6400:~# ping -w10 10.74.210.210
PING 10.74.210.210 (10.74.210.210): 56 data bytes

--- 10.74.210.210 ping statistics ---
10 packets transmitted, 0 packets received, 100% packet loss
root@TL-MR6400:~# ping -w10 10.74.210.211
PING 10.74.210.211 (10.74.210.211): 56 data bytes

--- 10.74.210.211 ping statistics ---
10 packets transmitted, 0 packets received, 100% packet loss
root@TL-MR6400:~# ping -w10 10.19.72.116
PING 10.19.72.116 (10.19.72.116): 56 data bytes

--- 10.19.72.116 ping statistics ---
10 packets transmitted, 0 packets received, 100% packet loss
root@TL-MR6400:~# ifstatus 4G
{
        "up": true,
        "pending": false,
        "available": true,
        "autostart": true,
        "dynamic": false,
        "uptime": 72,
        "l3_device": "wwan0",
        "proto": "qmi",
        "updated": [
                "addresses",
                "routes"
        ],
        "metric": 0,
        "dns_metric": 0,
        "delegation": true,
        "ipv4-address": [
                {
                        "address": "10.19.72.115",
                        "mask": 29
                }
        ],
        "ipv6-address": [
                {
                        "address": "2a01:59f:889d:1e90:f11f:c1f:a9a9:fe0b",
                        "mask": 128
                }
        ],
        "ipv6-prefix": [
                {
                        "address": "2a01:59f:889d:1e90::",
                        "mask": 64,
                        "class": "4G",
                        "assigned": {
                                "lan": {
                                        "address": "2a01:59f:889d:1e90::",
                                        "mask": 64
                                }
                        }
                }
        ],
        "ipv6-prefix-assignment": [

        ],
        "route": [
                {
                        "target": "2a01:59f:889d:1e90:b574:d24d:3045:5f8d",
                        "mask": 128,
                        "nexthop": "::",
                        "source": "::/0"
                },
                {
                        "target": "::",
                        "mask": 0,
                        "nexthop": "2a01:59f:889d:1e90:b574:d24d:3045:5f8d",
                        "source": "2a01:59f:889d:1e90:f11f:c1f:a9a9:fe0b/64"
                },
                {
                        "target": "0.0.0.0",
                        "mask": 0,
                        "nexthop": "10.19.72.116",
                        "source": "0.0.0.0/0"
                }
        ],
        "dns-server": [
                "2a01:598:7ff:0:10:74:210:210",
                "2a01:598:7ff:0:10:74:210:211",
                "10.74.210.210",
                "10.74.210.211"
        ],
        "dns-search": [

        ],
        "neighbors": [

        ],
        "inactive": {
                "ipv4-address": [

                ],
                "ipv6-address": [

                ],
                "route": [

                ],
                "dns-server": [

                ],
                "dns-search": [

                ],
                "neighbors": [

                ]
        },
        "data": {
                "cid_4": "1",
                "cid_6": "2",
                "pdh_4": "-2046116784",
                "pdh_6": "-2046128000",
                "zone": "wan"
        }
}

I suppose you cannot ping IPv6 addresses either?
A few more checks:

cat /sys/class/net/wwan0/qmi/raw_ip
ip l show wwan0

Yes

root@TL-MR6400:~# ping -w10 -6 "2a01:598:7ff:0:10:74:210:210"
PING 2a01:598:7ff:0:10:74:210:210 (2a01:598:7ff:0:10:74:210:210): 56 data bytes

--- 2a01:598:7ff:0:10:74:210:210 ping statistics ---
10 packets transmitted, 0 packets received, 100% packet loss
root@TL-MR6400:~# cat /sys/class/net/wwan0/qmi/raw_ip
Y
root@TL-MR6400:~# ip l show wwan0
5: wwan0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN qlen 1000
    link/[65534]

I'm running out of ideas, everything looks good to me.
Does the same SIM work in the phone?
Do they have another APN to try?

And please show the answer to AT+CGDCONT? from the terminal.

Yes there is another one for "older smartphones & tablets". The major difference seems that it uses "IPv4q" instead of "IPv4" as the APN Roaming Protocol. I also tried the second one, same behaviour.

Is it possible that I actually face an issue with the default gateway? Maybe because I still have my wan and wan6 interfaces configured (but not started) or should it be enough that the 4G interface is the only one running within the WAN zone?

I actually don't really understand how the default gateway interface is selected but the lan interface shows the 4G interface as its IPv4 gateway in Luci.

You can check your active gateways with ip r and ip -6 r, the same is visible in ifstatus output.
Please show the response AT+CGDCONT?, it is worth checking which APN is saved on the modem.

The default gateway configuration looks fine from my perspective:

root@TL-MR6400:~# ip r
default via 10.19.72.116 dev wwan0
10.19.72.112/29 dev wwan0 scope link  src 10.19.72.115
192.168.8.0/24 dev br-lan scope link  src 192.168.8.1

root@TL-MR6400:~# ip -6 r
default from 2a01:59f:889d:1e90::/64 via 2a01:59f:889d:1e90:c15f:cece:6e80:ba0b dev wwan0  metric 1024
2a01:59f:889d:1e90:90ad:35a1:4080:11d5 dev wwan0  metric 256
2a01:59f:889d:1e90:c15f:cece:6e80:ba0b dev wwan0  metric 1024
2a01:59f:889d:1e90::/64 dev br-lan  metric 1024
unreachable 2a01:59f:889d:1e90::/64 dev lo  metric 2147483647
fda2:6bcd:1193::/64 dev br-lan  metric 1024
unreachable fda2:6bcd:1193::/48 dev lo  metric 2147483647
fe80::/64 dev eth0  metric 256
fe80::/64 dev br-lan  metric 256
fe80::/64 dev wwan0  metric 256
fe80::/64 dev phy0-ap0  metric 256
anycast 2a01:59f:889d:1e90:: dev br-lan  metric 0
anycast fda2:6bcd:1193:: dev br-lan  metric 0
anycast fe80:: dev eth0  metric 0
anycast fe80:: dev br-lan  metric 0
anycast fe80:: dev wwan0  metric 0
anycast fe80:: dev phy0-ap0  metric 0
multicast ff00::/8 dev eth0  metric 256
multicast ff00::/8 dev br-lan  metric 256
multicast ff00::/8 dev wwan0  metric 256
multicast ff00::/8 dev phy0-ap0  metric 256

What do I need to do exactly to do that?

Install kmod-usb-serial-option picocom
Run picocom /dev/ttyUSB1
Enter the desired AT command(s), copy the output.

More details:

Thank you, I found out about picocom before but I failed to find to correct device. The modem is build into the router and I don't have any ttyUSB* devices:

root@TL-MR6400:/dev# ls
bus        fd         gpiochip1  kmsg       mtd0ro     mtd2       mtd3ro     mtd5       mtd6ro     mtdblock2  mtdblock5  port       pts        stderr     tty        ttyS10     ttyS13     ttyS2      ttyS5      ttyS8      watchdog
cdc-wdm0   full       gpiochip2  log        mtd1       mtd2ro     mtd4       mtd5ro     mtdblock0  mtdblock3  mtdblock6  ppp        random     stdin      ttyS0      ttyS11     ttyS14     ttyS3      ttyS6      ttyS9      watchdog0
console    gpiochip0  hwrng      mtd0       mtd1ro     mtd3       mtd4ro     mtd6       mtdblock1  mtdblock4  null       ptmx       shm        stdout     ttyS1      ttyS12     ttyS15     ttyS4      ttyS7      urandom    zero

I tried to connect to the other tty devices with picocom and I was only able to connect to tty and ttyS0 but I didn't get any response for the command given.

You need to install the driver first, kmod-usb-serial-option
If this driver is installed, show the output of cat /sys/kernel/debug/usb/devices

kmod-usb-serial-option is installed.

root@TL-MR6400:~# cat /sys/kernel/debug/usb/devices

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480  MxCh= 1
B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0002 Rev= 5.15
S:  Manufacturer=Linux 5.15.134 ehci_hcd
S:  Product=EHCI Host Controller
S:  SerialNumber=101c0000.ehci
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=00 Cnt=01 Dev#=  2 Spd=480  MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=05c6 ProdID=9025 Rev= 3.18
S:  Manufacturer=Android
S:  Product=Android
S:  SerialNumber=8b75269c
C:* #Ifs= 9 Cfg#= 1 Atr=a0 MxPwr=500mA
A:  FirstIf#= 6 IfCount= 3 Cls=01(audio) Sub=00 Prot=00
I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
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= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=(none)
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none)
E:  Ad=84(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
E:  Ad=83(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=(none)
E:  Ad=86(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
E:  Ad=85(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=qmi_wwan
E:  Ad=88(I) Atr=03(Int.) MxPS=   8 Ivl=32ms
E:  Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 5 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=(none)
E:  Ad=89(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=125us
I:* If#= 6 Alt= 0 #EPs= 0 Cls=01(audio) Sub=01 Prot=00 Driver=(none)
I:* If#= 7 Alt= 0 #EPs= 0 Cls=01(audio) Sub=02 Prot=00 Driver=(none)
I:  If#= 7 Alt= 1 #EPs= 1 Cls=01(audio) Sub=02 Prot=00 Driver=(none)
E:  Ad=8a(I) Atr=05(Isoc) MxPS=  16 Ivl=1ms
I:* If#= 8 Alt= 0 #EPs= 0 Cls=01(audio) Sub=02 Prot=00 Driver=(none)
I:  If#= 8 Alt= 1 #EPs= 1 Cls=01(audio) Sub=02 Prot=00 Driver=(none)
E:  Ad=07(O) Atr=09(Isoc) MxPS=  16 Ivl=1ms

T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12   MxCh= 1
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0001 Rev= 5.15
S:  Manufacturer=Linux 5.15.134 ohci_hcd
S:  Product=Generic Platform OHCI controller
S:  SerialNumber=101c1000.ohci
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=   2 Ivl=255ms

This vid:pid is not in the driver :frowning: I was sure it is already there.
You will need to execute:
echo "05c6 9025 ff" > /sys/bus/usb-serial/drivers/option1/new_id
Then you will probably need to use /dev/ttyUSB2 instead of USB1 as the driver will also grab ADB interface and that will create an offset.

Whatever you did, I'm impressed. Now I have the ttyUSB* devices and now I was able to execute the command :smiley:

root@TL-MR6400:~# echo "05c6 9025 ff" > /sys/bus/usb-serial/drivers/option1/new_id
root@TL-MR6400:~# ls -l /dev/ttyUSB
ttyUSB0  ttyUSB1  ttyUSB2  ttyUSB3

root@TL-MR6400:~# picocom /dev/ttyUSB2
picocom v3.1

port is        : /dev/ttyUSB2
flowcontrol    : none
baudrate is    : 9600
parity is      : none
databits are   : 8
stopbits are   : 1
escape is      : C-a
local echo is  : no
noinit is      : no
noreset is     : no
hangup is      : no
nolock is      : no
send_cmd is    : sz -vv
receive_cmd is : rz -vv -E
imap is        :
omap is        :
emap is        : crcrlf,delbs,
logfile is     : none
initstring     : none
exit_after is  : not set
exit is        : no

Type [C-a] [C-h] to see available commands
Terminal ready
AT+CGDCONT?
+CGDCONT: 1,"IPV4V6","","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,0

OK

Great!
Now use picocom to send AT+CGDCONT=1,"IPV4V6","internet.v6.telekom" then check the APN was stored successfully with AT+CGDCONT?
Assuming everything is good, exit from picocom and restart your interface.

root@TL-MR6400:~# picocom /dev/ttyUSB2
picocom v3.1

port is        : /dev/ttyUSB2
flowcontrol    : none
baudrate is    : 9600
parity is      : none
databits are   : 8
stopbits are   : 1
escape is      : C-a
local echo is  : no
noinit is      : no
noreset is     : no
hangup is      : no
nolock is      : no
send_cmd is    : sz -vv
receive_cmd is : rz -vv -E
imap is        :
omap is        :
emap is        : crcrlf,delbs,
logfile is     : none
initstring     : none
exit_after is  : not set
exit is        : no

Type [C-a] [C-h] to see available commands
Terminal ready
AT+CGDCONT=1,"IPV4V6","internet.v6.telekom"
OK
AT+CGDCONT?
+CGDCONT: 1,"IPV4V6","internet.v6.telekom","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,0

OK

Terminating...
Thanks for using picocom

But after restarting the 4G interface, uqmi get-data-status gives me the following error:

root@TL-MR6400:~# uqmi -d /dev/cdc-wdm0 --get-data-status
"Incompatible state"

That is was I get in the system log

Wed Oct 18 18:42:44 2023 daemon.notice netifd: 4G (4463): Stopping network 4G
Wed Oct 18 18:42:44 2023 daemon.notice netifd: 4G (4463): Command failed: ubus call network.interface notify_proto { "action": 0, "link-up": false, "keep": false, "interface": "4G" } (Permission denied)
Wed Oct 18 18:42:44 2023 daemon.notice netifd: Interface '4G' is now down
Wed Oct 18 18:42:44 2023 daemon.notice netifd: Interface '4G' is setting up now
Wed Oct 18 18:42:44 2023 daemon.notice netifd: 4G (4472): Waiting for SIM initialization
Wed Oct 18 18:42:45 2023 daemon.warn odhcpd[1342]: No default route present, overriding ra_lifetime!
1 Like

I suggest to reboot the router (or power toggle) and check the log again. It is not a good idea to manually run uqmi as this may affect the connection script operation.