So I found this thread:
I'm using a gl.inet mt1300 router as travelrouter. It has is own fork of OpenWrt so please bear with me a bit..
( OpenWrt 19.07.7, r11306-c4a6851c72)
(I didn't go to Openwrt snapshot because of the wifidrivers not working properly)
The router has a blue and a white led, this (I think) script below makes the led blink blue when there is no internet connection en solid white when there is. As far as I can see, it does this by using ping.
I want to alter the script so it doesn't only check if i…
Where the guy wrote a custom script to get the LED to change when he was connected to a VPN. I have no idea how to do that.
I dont know anything about pulling stuff from bin and all that.
How would I learn to change the LEDs and set custom LEDs?
On the Gl.inet firmware it always blinked blue when not connected and went solid white when it was connected to any AP as a client.
Now it just stays solid blue.
Any help would be appreciated.
Post return of
ubus call system board
"system": "MediaTek MT7621 ver:1 eco:3",
"model": "GL.iNet GL-MT1300",
"description": "OpenWrt 22.03.3 r20028-43d71ad93e"
So I found this thread:
You may want/need to learn.
"Pulling stuff from bin"?
Did you simply try asking
@ray308 ( tagged them) yet?
Perhaps they will be willing to "teach" you.
you can edit LED behavior in the web GUI - but you likely won't get such advanced detail than the script posted in the other thread.
February 5, 2023, 12:07pm
@Fastlane I wrote a solution on the forum for gl.inet. You may use that and pasted it in here if you want offcourse.
Please be aware that I probably broke a lot of things I’m apparantly not using, but it works for me.
Nice! The man himself.
Im a complete newbie to this.
So Im using putty and navigated to /usr/bin
Theres no mt1300_led_deamon that even exists.
Im also using wireguard.
Note that if anyone is looking at this and uses wireguard instead, you’ll need to check for the existence of /sys/class/net/wg instead.*
It doesnt for me.
Dont know how to 'open' these files if they did exist?
Besides ./whatever.sh which I did here:
BusyBox v1.35.0 (2023-01-03 00:24:21 UTC) built-in shell (ash)
root@OpenWrt:~# . /usr/share/libubox/jshn.sh
Thanks for the help!
February 5, 2023, 6:27pm
I'm not having the MT1300 around right now (it's at home, and I'm not)
I will look for you next weekend when I'm home. Maybe it's not there because of an other firmware version?
Can you show the whole input and output, please?
You need to create it.
Makes little sense to me what you did.
This is based on
@pavelgl code from Change GL-MT1300 led status on vpn connection that should work that way:
Ping works turn led to – solid white
Ping doesn’t work – blink blue
Copy the below code block and paste it in
cat << "EOF" > /usr/bin/mt1300_led_deamon
ip="22.214.171.124" # Is google there?
count="1" # Ping Once
mt1300_led off # Initalize led to OFF
mt1300_led blue_breath daemon # and then to normal blink blue startup
while true; do
status=$(ping -q -c "$count" -W "$timeout" "$ip" > /dev/null 2>&1 && echo "ok" || echo "fail")
if [ "$status" = "ok" ]; then # if google responds then
mt1300_led white daemon # turn led on solid white
mt1300_led blue_breath daemon # otherwise make sure it returns to blink blue
Make it executable by issuing the below in
chmod +x /usr/bin/mt1300_led_deamon
Restart the daemon by issuing the below in