I write this, because i had several problems to connect the LTE modul with the existing tutorials.
A. https://openwrt.org/toh/tp-link/tl-mr6400_v5
- Wrong package
luci-proto-uqmi
, no usage of the existing LuCi configuration
B. https://gist.github.com/gamwe6/ef726b550037957a4d6d5255dc7efa7a
- I was not able to use the package "modemmanager" because of insuffient drive space
- Download OpenWrt firmware image from here: https://openwrt.org/toh/tp-link/tl-mr6400_v5 (at time of writing this in April 2023, i got version 22.03.04)
1.1 On Mac using TFTP-Server (dnsmasq) and the TFTP-recovery image (as descripted on the firmware download page)
-
Install the package "luci-proto-qmi" using LuCi: "System" -> "Software"
-
Configure the modem using LuCi: Network -> Interfaces -> "Add new interface" -> Protocol "QMI Cellular" using modem at "/dev/cdc-wdm0"
-
The LTE interface should be running and connected now
Sometimes the uqmi commands hang and result in a not connected LTE interface.
If you type any uqmi command and get no output, you may need to edit the qmi.sh script to fix it.
The file is located in /lib/netifd/proto/qmi.sh
Locate the line that looks like this:
while uqmi -s -d "$device" --get-pin-status | grep '"UIM uninitialized"' > /dev/null; do
On OpenWRT 19.7 it's on line 83. It might be on a different line if you have a newer or older OS version.
Add the following 3 lines before the line above.
uqmi -s -d "$device" --get-pin-status &
sleep 3
killall uqmi || echo "UQMI now works fine!"
Thanks a lot to https://teklager.se/en/knowledge-base/openwrt-4g-wwan-configuration/ for this hint!
Use this check in cron (add by using crontab -e), if the gateway is missing after dhcp lease and the interface is not connected anymore. This code will restart the network interfaces to reconnect all interfaces.
* * * * * [ "$(uqmi -d /dev/cdc-wdm0 --get-current-settings | grep -oFm1 "Out of call")" != "Out of call" ] || /etc/init.d/network restart
Follow ups: