TP-Link TL-MR6400 v4 - add 4G LTE

Hi, I recently installed OpenWrt onto my TP-Link TL-MR6400 v4, 4G LTE router.
https://openwrt.org/toh/tp-link/tl-mr6400_v4

I have logged into OpenWrt and I noticed there don't appear to be any SIM card or 4G connectivity options.

Under Netwok/Interfaces I can see: lan, wan and wan6.
lan is green.

I am hoping someone could please help?

https://openwrt.org/docs/guide-user/network/wan/wwan/ltedongle

2 Likes

Thank you @frollic

I managed to add support for the interface.

I did this by going here https://firmware-selector.openwrt.org/
Searched for my device, then clicked 'Customize installed packages and/or first boot script' and added this to the end.

kmod-usb-net-qmi-wwan uqmi luci-proto-qmi kmod-usb-serial-option usb-modeswitch socat

Clicked 'Request Build', then downloaded the SYSUPGRADE, then I updated my firmware with this.

Before I flashed open-wrt I made a note of my ISPs settings. I have entered these in the appropriate settings but I am still not connecting to the internet.

Could anyone offer any suggestions that might help?

[Edit]
The error I see under the Interface is:
Error: Unknown error (NETWORK_REGISTRATION_FAILED)

Before the flash, the original tp-link firmware did not require a PIN for my SIM (it is unlocked).
But when I did not enter a PIN I received an error the there was no PIN, so I added one but I still receive the above error.

Show the the part of /etc/config/network that is related to your modem interface.

Run logread -f then restart the interface in Luci, wait up to one minute, terminate log collection by ^C and post the collected data.

usb-modeswitch is not needed

Thank you @AndrewZ

could please help me find the /etc/config/network
Is this something I need to do on my computer using Terminal?

The same with running logread; I assume this is a terminal command?

EDIT:
I tried removing usb-mode but received the following error:

Removing package usb-modeswitch from root...
libusb-1.0-0 was autoinstalled and is now orphaned, removing.
Removing package libusb-1.0-0 from root...
libatomic1 was autoinstalled and is now orphaned, removing.
Refusing to remove essential package libatomic1.
	Removing an essential package may lead to an unusable system, but if
	you enjoy that kind of pain, you can force opkg to proceed against
	its will with the option: --force-removal-of-essential-packages
No packages removed.

The opkg remove command failed with code 255.

Although I received that error when I refreshed the list of installed packaged usb-mode no longer shows, so I assume it did remove ok.

I restarted the router and the
'Unknown error (NETWORK_REGISTRATION_FAILED)'
error no longer appears, so that seems good.
Removing usb-modeswitch may have fixed this?

Unfortunately, I still do not have internet access; so perhaps I am missing something else?

I managed to connect to the router using

$ ssh root@192.168.1.1

added my password and I am connected.

I ran logread -f but wasn't sure how to restart Luci?
I tried Reboot but that disconnected me.

Once connected via

ssh root@192.168.1.1

I tried
vim /etc/config/network

In the text that displayed the interface I added (wwan) lists the details I entered.

config interface 'wwan'                                                                             
        option proto 'qmi'                                                                          
        option device '/dev/cdc-wdm0'                                                               
        option apn 'isp.*****'                                                                
        option auth 'chap'                                                                          
        option username '****'                                                                        
        option password '****'                                                                    
        option pdptype 'ipv4'                                                                       
        option pincode '***'

I now realise what you mean by restart interface :sweat_smile: here are the details:

Mon Sep 23 13:49:56 2024 daemon.notice netifd: Interface 'wwan_4' is disabled
Mon Sep 23 13:49:56 2024 daemon.notice netifd: Network alias '' link is down
Mon Sep 23 13:49:56 2024 daemon.notice netifd: Interface 'wwan_4' has link connectivity loss
Mon Sep 23 13:49:56 2024 daemon.notice netifd: wwan (2716): Stopping network wwan
Mon Sep 23 13:49:56 2024 daemon.notice netifd: wwan_4 (2457): udhcpc: received SIGTERM
Mon Sep 23 13:49:56 2024 daemon.notice netifd: wwan_4 (2457): udhcpc: entering released state
Mon Sep 23 13:49:56 2024 daemon.notice netifd: wwan_4 (2457): Command failed: ubus call network.interface notify_proto { "action": 0, "link-up": false, "keep": false, "interface": "wwan_4" } (Permission denied)
Mon Sep 23 13:49:56 2024 daemon.notice netifd: Interface 'wwan_4' is now down
Mon Sep 23 13:49:57 2024 daemon.notice netifd: wwan (2716): Command failed: ubus call network.interface notify_proto { "action": 0, "link-up": false, "keep": false, "interface": "wwan" } (Permission denied)
Mon Sep 23 13:49:57 2024 daemon.notice netifd: Interface 'wwan' is now down
Mon Sep 23 13:49:57 2024 daemon.notice netifd: Interface 'wwan' is setting up now
Mon Sep 23 13:49:57 2024 daemon.notice netifd: Network device 'wwan0' link is down
Mon Sep 23 13:49:57 2024 daemon.notice netifd: wwan (2743): Waiting for SIM initialization
Mon Sep 23 13:49:57 2024 daemon.warn odhcpd[1378]: No default route present, overriding ra_lifetime!
Mon Sep 23 13:49:57 2024 daemon.notice netifd: wwan (2743): Failed to parse message data
Mon Sep 23 13:49:58 2024 daemon.notice netifd: wwan (2743): PIN already verified
Mon Sep 23 13:49:58 2024 daemon.notice netifd: wwan (2743): Device does not support 802.3 mode. Informing driver of raw-ip only for wwan0 ..
Mon Sep 23 13:49:58 2024 daemon.notice netifd: wwan (2743): Waiting for network registration
Mon Sep 23 13:49:59 2024 daemon.notice netifd: wwan (2743): Starting network wwan
Mon Sep 23 13:50:00 2024 daemon.notice netifd: wwan (2743): Setting up wwan0
Mon Sep 23 13:50:00 2024 daemon.notice netifd: Interface 'wwan' is now up
Mon Sep 23 13:50:00 2024 daemon.notice netifd: Network device 'wwan0' link is up
Mon Sep 23 13:50:00 2024 daemon.notice netifd: Network alias 'wwan0' link is up
Mon Sep 23 13:50:00 2024 daemon.notice netifd: Interface 'wwan_4' is enabled
Mon Sep 23 13:50:00 2024 daemon.notice netifd: Interface 'wwan_4' has link connectivity
Mon Sep 23 13:50:00 2024 daemon.notice netifd: Interface 'wwan_4' is setting up now
Mon Sep 23 13:50:01 2024 daemon.notice netifd: wwan_4 (2906): udhcpc: started, v1.36.1
Mon Sep 23 13:50:01 2024 daemon.notice netifd: wwan_4 (2906): udhcpc: broadcasting discover
Mon Sep 23 13:50:01 2024 user.notice firewall: Reloading firewall due to ifup of wwan (wwan0)
Mon Sep 23 13:50:04 2024 daemon.notice netifd: wwan_4 (2906): udhcpc: broadcasting discover
Mon Sep 23 13:50:07 2024 daemon.notice netifd: wwan_4 (2906): udhcpc: broadcasting discover

Remove until you 100% sure that you need this.

Add option dhcp '0'

Thank you @AndrewZ

I learned how to use vi to edit the network file.
I added option dhcp '0' to wwan

I tried without auth, username, password, pincode but without those I received an error.

So I put them back and after a reboot it is working! Thank you :+1: