Onhub TP-LINK TGR1900 future support?

Fight with my asus onhub is pain in ass... Why they did suach a crappy designed router with nice hw?

I was in search of using special onhub features. I gleaned some answers from this thread. They shall be shared below. I'm using the Asus version.

The speaker works.
It is mentioned aboved
You can test the speaker like this:

opkg update
opkg install mpg123
wget https://freetestdata.com/wp-content/uploads/2021/09/Free_Test_Data_100KB_MP3.mp3 -O /tmp/test.mp3
mpg123 /tmp/test.mp3

One post mentions getting onhub working as a blutooth speaker
Zigbee is also mentioned in that post, no specific confirmation of it working in OpenWrt.

For the LEDS, looks like TP-LINK has more
ASUS has single tri-color TP-Link has 9

TP-Link Led test scripts were shared

The RGB led on Asus works good and can be controlled from Luci. It shows up as 3 different colored Leds Red, Green, Blue.
There are some ath Leds also, curious if anyone knows what they are for, or how to use them.

ls /sys/class/leds
ath10k-phy0   ath10k-phy1   ath10k-phy2   blue:status   green:status  red:status
#you can control the RGB led like this:
echo 255 > /sys/class/leds/red:status/brightness
echo 255 > /sys/class/leds/green:status/brightness
echo 255 > /sys/class/leds/blue:status/brightness
2 Likes

I experimented with Bluetooth but I never hit the combination that worked. However, there is a shairplay package that enables AirPlay that works. The speaker is not very good, but it does work.

These are the three radios. Phy0 is the 2.4g, phy1 is the 5g and phy2 is the combination 2.4/5g radio (low power, one antenna)

Here's the portion of Lucky1's uci script to set the LEDs in the TP-Link OnHub - It would be nice if some variation of this could be used on the ASUS with its one tri-color LED:

uci add system led # =cfg038bba
uci set system.@led[-1].sysfs='red:status-0'
uci set system.@led[-1].trigger='netdev'
uci set system.@led[-1].dev='phy2-ap0'
uci add_list system.@led[-1].mode='link'
uci add_list system.@led[-1].mode='tx'
uci add_list system.@led[-1].mode='rx'

uci add system led # =cfg048bba
uci set system.@led[-1].sysfs='red:status-3'
uci set system.@led[-1].trigger='netdev'
uci set system.@led[-1].dev='phy2-ap0'
uci add_list system.@led[-1].mode='link'
uci add_list system.@led[-1].mode='tx'
uci add_list system.@led[-1].mode='rx'

uci add system led # =cfg058bba
uci set system.@led[-1].sysfs='green:status-1'
uci set system.@led[-1].trigger='netdev'
uci set system.@led[-1].dev='phy1-ap0'
uci add_list system.@led[-1].mode='link'
uci add_list system.@led[-1].mode='tx'
uci add_list system.@led[-1].mode='rx'

uci add system led # =cfg068bba
uci set system.@led[-1].sysfs='green:status-4'
uci set system.@led[-1].trigger='netdev'
uci set system.@led[-1].dev='phy1-ap0'
uci add_list system.@led[-1].mode='link'
uci add_list system.@led[-1].mode='tx'
uci add_list system.@led[-1].mode='rx'

uci add system led # =cfg078bba
uci set system.@led[-1].sysfs='blue:status-2'
uci set system.@led[-1].trigger='netdev'
uci set system.@led[-1].dev='phy0-ap0'
uci add_list system.@led[-1].mode='link'
uci add_list system.@led[-1].mode='tx'
uci add_list system.@led[-1].mode='rx'

uci add system led # =cfg088bba
uci set system.@led[-1].sysfs='blue:status-5'
uci set system.@led[-1].trigger='netdev'
uci set system.@led[-1].dev='phy0-ap0'
uci add_list system.@led[-1].mode='link'
uci add_list system.@led[-1].mode='tx'
uci add_list system.@led[-1].mode='rx'

uci commit system


reboot

I'm only doing a basic re purpose an as there are so many led on the tp-link
but you can make up your own in luci very easily
while making changes you will see unsaved charges in the top right
this is before you hit apply
clinking this is the easy way to get the uci commands to streamline for a script like that
hope this helps

On the Asus, I’d be happy with a blue light when idle, blinking green for network activity and blinking purple when the traffic is going through the VPN. Red when there is no connection at all or blinking red if there is a system crash or some other calamity that could be triggered or detected.

I'd imagine you only have the 3 leds
red green & blue
have a look it's all there in luci
if your up to scripting i think you can do the other stuff
go look it up there's lots of documentation out there for this stuff

Thanks for the encouragement. I'm going to try and get something working. I can't crash the thing changing LED settings. Here's where I'm looking:

LED Configuration

Night LED timer for wifi router for OpenWrt

Any other places out there with instructions to do it with Luci?

these are the mode advanced stuff leading into scripting or command line
but just try the basic luci menu
System > LED Configuration > Add LED action

I'm just not sure what the LEDs with those names do? I tried turning them on and off and didn't notice anything change on the device.

The first three are the three radios in the router.

Thanks for the comment. They are LEDs named the same as the three radios. But, my point is that they don't do anything, so why are they there.

On the LEDs for Asus.
Normally, after device boot, the green one is on.
I put in startup commands to turn them all off.
System>Startup>Local Startup

# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.
echo 0 > /sys/class/leds/red:status/brightness
echo 0 > /sys/class/leds/blue:status/brightness
echo 0 > /sys/class/leds/green:status/brightness
exit 0

I modded led test script for onhub, if you want to try that.

For UCI script for Asus similar to TP-LINK, this is similar:

uci add system led # =cfg038bba
uci set system.@led[-1].name='red-phy2'
uci set system.@led[-1].sysfs='red:status'
uci set system.@led[-1].trigger='netdev'
uci set system.@led[-1].dev='phy2-ap0'
uci add_list system.@led[-1].mode='link'
uci add_list system.@led[-1].mode='tx'
uci add_list system.@led[-1].mode='rx'
uci add system led # =cfg048bba
uci set system.@led[-1].name='green-phy1'
uci set system.@led[-1].sysfs='green:status'
uci set system.@led[-1].trigger='netdev'
uci set system.@led[-1].dev='radio1.network1'
uci add_list system.@led[-1].mode='link'
uci add_list system.@led[-1].mode='tx'
uci add_list system.@led[-1].mode='rx'
uci add system led # =cfg058bba
uci set system.@led[-1].name='blue-phy0'
uci set system.@led[-1].sysfs='blue:status'
uci set system.@led[-1].trigger='netdev'
uci set system.@led[-1].dev='phy0-ap0'
uci add_list system.@led[-1].mode='link'
uci add_list system.@led[-1].mode='tx'
uci add_list system.@led[-1].mode='rx'

In OpenWrt you configure three separate LEDs, but physically it is one tri-color LED. So, if blue and red is on, you see purple.

This uci script is copied from doing it via Luci as Lucky1 described. In GUI, it shows SSID name and in UCI it has phy name. The blinking on activity doesn't seem to be very noticeable. It seemed like the link option was dependent on the radio being enabled or disabled versus actual link connection. May require more testing to be sure.

Do we know what the significance of the “ cfg0xxbba “ things? Does the Asus use those?

It is after #, so ignored. Was copied directly from uci Luci created.

Sections deserve some extra explanation in regards to naming. A section can be named or unnamed. Unnamed sections will get an autogenerated ID/CFGID (like “cfg073777”) and be presented with an anonymous-name (like “@switch[0]”)

Section names may only contain alphanum and “_” (for shell compatibility). Hyphen '-' is not allowed.

See more on uci https://openwrt.org/docs/guide-user/base-system/uci

I didn't even notice that "#."

I'm using my Asus On-Hub as a travel router and it's working well - even though I don't fully understand what all the superfluous vlan interfaces do. I don't want to mess with it too much because if you screw it up, you really have to start from scratch all the way back to zeroing the eMMC.

I'm going to try through Luci. I want a LED pattern that will tell me whether I have a 2.4g or 5g wireless connection and whether or not the VPN is operational. And I want the flashing for network activity.

If OpenVPN is down, I want red. If 2.4g wireless has connectivity I want green, if 5g wireless has connectivity I want blue. If connectivity is through Ethernet then I want purple. How does that sound?

Out of the box from Luci, there are only specific triggers for LEDs
image

You can always try a custom script that runs from chron and changes Leds. Could try using Hotplug functionality as well.

For your last paragraph, since you can only control three LEDs (really 1 tri-color), you can't have four things tracked. In other words, If VPN is down (red) and you have 5g (blue) the LED is already purple, so you can't have another thing be used for purple.

Try some things and see what works best for you.

There are packages for different led effects that can be installed.