TP-Link TL-MR6400 v5.2 LTE configuration

I have TP-Link TL-MR6400 v5.2 router. It's 4G-modem works fine with stock firmware, but I need OpenWRT.
After change to standard firmware for v5, I've installed luci-qmi-proto-app. But modem haven't start after QMI have been properly configurated.
Then I've built firmware with modem-manager without LUCI, because it doesn't fit it space.
Modem-manager enables modem successfully but doesn't get IP-address and other, which I can get but running from cli 'udhcpc -f -n -i wwan0'. But I need automatic procedure to do that.
If I create interface for wwan0 with DHCP client protocol, modem-manager can't start the modem.
Please, give a bit of advice what can I do to accomplish my task.

Please list the cli commands that you need to enter and we might be able to turn it into a startup script

I have been using OpenWrt with v5.2 for about a week now :sunglasses:.

I don't think you need modem-manager for mr6400 v5.2, reset your router (assuming you've already flashed latest OpenWrt v21.02.2), and follow these steps for v5/v5.2:
1- Install this qmi modified package:
wget https://raw.githubusercontent.com/mrhaav/openwrt/master/21.02.1/uqmi_2021-12-22-0.4_mipsel_24kc.ipk
opkg install uqmi_2021-12-22-0.4_mipsel_24kc.ipk
2- Install following packages:
opkg install usb-modeswitch kmod-mii kmod-usb-net kmod-usb-wdm kmod-usb-net-qmi-wwan
opkg install luci-proto-qmi
3- Check your device is successfully installed
ls -l /dev/cdc-wdm0
and check it prints /dev/cdc-wdm0 on console
4- Create a new interface using the newly installed QMI Cellular protocol and the /dev/cdc-wdm0 device and setup the APN, Authentication (if any)
5- Choose wan as the firewall-zone for the newly created interface.
6- Apply settings and.. Enjoy!

Cheers

1 Like

Thank you!
That is what I need.
Although usb-modeswitch is not needed.
And modem init timeout is better to set for 30 seconds. Without it modem starts about 3 minutes until traffic may flow.

After all question is -- why that marvelous tuned package is not at official repository?

1 Like

And how to make work signal level lamps?

After addition of VPN-settings timeout have made connection very long. So I erased it.

I wrote down script for it.

#!/bin/sh

os=-1
while true; do
  rssi=$(uqmi -d /dev/cdc-wdm0 -t 1000 -s --get-signal-info | jsonfilter -e '@["rssi"]')
  
  if [ -z $rssi ] || [ $rssi -ge 0 ]; then s=0;
  elif [ $rssi -ge -65 ]; then s=3;
  elif [ $rssi -ge -75 ]; then s=2;
  elif [ $rssi -ge -85 ]; then s=1;
  else s=0;
  fi
  
  if [ $os != $s ]; then
    case $s in
      0) 
         echo 0 > /sys/class/leds/white:signal1/brightness
         echo 0 > /sys/class/leds/white:signal2/brightness
         echo 0 > /sys/class/leds/white:signal3/brightness
      ;;
      1)
         echo 255 > /sys/class/leds/white:signal1/brightness
         echo 0 > /sys/class/leds/white:signal2/brightness
         echo 0 > /sys/class/leds/white:signal3/brightness
      ;;
      2)
         echo 255 > /sys/class/leds/white:signal1/brightness
         echo 255 > /sys/class/leds/white:signal2/brightness
         echo 0 > /sys/class/leds/white:signal3/brightness
      ;;
      3)
         echo 255 > /sys/class/leds/white:signal1/brightness
         echo 255 > /sys/class/leds/white:signal2/brightness
         echo 255 > /sys/class/leds/white:signal3/brightness
      ;;
    esac
    os=$s
  fi
  sleep 5
done

exit

To make it automatically start could insert such line into /etc/rc.local:

/etc/ledltesignal.sh &

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.