How to adjust the LEDs of the TP-Link TL-MR6400 v5 modem

Hello
Please guide me how to configure the LEDs of the TP-Link TL-MR6400 v5 modem.
I want it to show both the SIM card signal strength and the Wi-Fi connection status and the modem status.
I made these settings, but only the first light of the signal strength stays on and does not display the strength of the antenna.


config system
	option hostname 'OpenWrt'
	option timezone 'UTC'
	option ttylogin '0'
	option log_size '64'
	option urandom_seed '0'

config timeserver 'ntp'
	option enabled '1'
	option enable_server '0'
	list server '0.openwrt.pool.ntp.org'
	list server '1.openwrt.pool.ntp.org'
	list server '2.openwrt.pool.ntp.org'
	list server '3.openwrt.pool.ntp.org'

config led 'led_lan'
	option name 'lan'
	option sysfs 'white:lan'
	option trigger 'switch0'
	option port_mask '0x07'

config led 'led_wan'
	option name 'wan'
	option sysfs 'white:wan'
	option trigger 'switch0'
	option port_mask '0x08'

config led
	option name 'LED Signal'
	option sysfs 'mt76-phy0'
	option trigger 'netdev'
	option dev 'wwan0'
	list mode 'link'

config led
	option name 'LED SIGNAL 1'
	option sysfs 'white:signal1'
	option trigger 'netdev'
	option dev 'wwan0'
	list mode 'link'
	list mode 'tx'
	list mode 'rx'

config led
	option name 'LED SIGNAL 2'
	option sysfs 'white:signal2'
	option trigger 'netdev'
	option dev 'wwan0'
	list mode 'tx'
	list mode 'rx'

config led
	option name 'LED SIGNAL 3'
	option sysfs 'white:signal3'
	option trigger 'netdev'
	option dev 'wwan0'
	list mode 'tx'
	list mode 'rx'


seems it's DIY - Signal strength and 4G LEDs on TP-Link MR200

Dear friend, I read the page you introduced, but I did not understand what I should do.
Please, if you can, edit the configuration file that I provided.
Many thanks

Please also explain how to configure in openwrt web environment

Please help friends who have experience

Hi

To trigger the signal strength LEDs you can use this script, uqmi_led.sh. You need to read the rssi value from the modem uqmi -s -d /dev/cdc-wdm0 --get-signal-info and include the rssi value with script, ./uqmi_led.sh <rssi value>. To turn off the LEDs ./uqmi_led.sh -200

uqmi_led.sh

#!/bin/sh

rssi=$1

LED1=$(readlink -f /sys/class/leds/white:signal1)
LED2=$(readlink -f /sys/class/leds/white:signal2)
LED3=$(readlink -f /sys/class/leds/white:signal3)

if [ "${rssi}" -eq -200 ]
then
	echo 0 > $LED1/brightness
	echo 0 > $LED2/brightness
	echo 0 > $LED3/brightness
elif [ "${rssi}" -le -90 ]
then
	echo 255 > $LED1/brightness
	echo 0 > $LED2/brightness
	echo 0 > $LED3/brightness
elif [ "${rssi}" -le -70 ]
then
	echo 255 > $LED1/brightness
	echo 255 > $LED2/brightness
	echo 0 > $LED3/brightness
else
	echo 255 > $LED1/brightness
	echo 255 > $LED2/brightness
	echo 255 > $LED3/brightness
fi

You need to make the script executable, chmod +x uqmi_led.sh

1 Like

Thanks for your reply dear friend
The fact is that I am not familiar with the instructions you said and I don't know what to do!
Please tell me the steps in a simple and step-by-step manner so that I can do it.
Many thanks

Which uqmi version and OpenWRT release do you use?

OpenWRT: Version 23.05.0
uqmi: I installed the latest version with the command "opkg install uqmi".

I have a customized version of uqmi. It will check the network connection and read the RSSI value every 30s. The RSSI value is sent to file /usr/bin/uqmi_led.sh.

You can download and install my uqmi:

wget https://github.com/mrhaav/openwrt/raw/master/23.05.0/uqmi_2022-11-29-0.11_mipsel_24kc.ipk
opkg install uqmi_2022-11-29-0.11_mipsel_24kc.ipk --force-downgrade


and you can download uqmi_led.sh to /usr/bin and make it executable:

cd /usr/bin
wget https://github.com/mrhaav/openwrt/raw/master/uqmi_test/uqmi_led.sh
chmod +x uqmi_led.sh

and restart your router.