The TEW-810DR has 2 Lenses: A power symbol and a Globe. Behind each lense sit a green and amber LED. I have and older TEW-732BR running OpenWRT that has the same LED arrangement.
The power symbol seems to work. Blinking Orange while booting and Steady green once booted. The Globe LED never illuminates. On the TEW-732BR, running 19.07.1, the Globe lense is steady green at rest and blinks with pings over the ethernet.
I followed these directions https://openwrt.org/docs/guide-developer/add.new.device to interogate the GPIO's but did not get much information.
GPIO's 9, 12, 13, and 15 were busy. All the other GPIO's produced no output or were inaccessible.
The TEW-732BR LEDs have this OpenWRT configuration
After recovering the TEW-810DR and flashing it with my snapshot build, I still have one hurdle to overcome prior to submitting a patch - the "Globe" led does not function. The Trendnet/D-Link manuals for this board indicate the Globe LED should be green with an LAN connection and blink with data packets.
Some progress. I found this recent entry for the DIR-810L
> - Button codes OK both
>
> - No missing functionalities
>
> I noticed, however, that the green "Internet" LED blinks to the LAN4
> port, while -I guess- it should blink to the INTERNET (wan/eth0.2) port.
> But this was already happening before, it's not related to your patch.
>
> Roger
I moved my NIC cable from LAN1 to LAN4 and the "Internet/Globe" led now functions.
Globe/Internet LED is driven by internal switch port marked as LAN4
Right?
Then turn ephy LED into gpio mode and find which gpio (40-44) correspond to LAN4 port.
Both the TEW-810DR and the D-Link DIR-810L share a common board manufactured by Cameo. The code I pasted above is incorrect; the lan led pin 12 is orange.
Globe/Internet LED isn't driven by wan gpio. Half true. There are a pair of leds behind the Globe/internet LED - one green and one orange. There is a gpio pin assignment (12) in the dts for the orange one. The green Globe/Internet led could be gpio14. GPIO14 is not specified in the dts and did not show up until I plugged a NIC into LAN4
Globe/Internet LED is driven by internal switch port marked as LAN4. Could the internal switch have spawned gpio14?
Typo: ...I plugged a NIC into LAN14... should read ...I plugged a NIC into LAN4...
LAN1, LAN2 and LAN3 do not result in a green Globe/Internet led. Only LAN4 results in a green Globe/Internet led. LAN4 also results in a new GPIO14 appearing in /sys/class/gpio. GPIO14 was not in /sys/class/gpio when the NIC was plugged into LAN1.
I'll modify and make a new build - will take some time. I'll post the blink_all script output tomorrow.
Thanks
With the *dts changes the Globe/Internet led went blank. I watched the Globe/Internet led while the blink_add script was running and the Globe/Internet led never blinked green or orange.
root@Shepnet:/tmp# chmod +x blink_all.sh
root@Shepnet:/tmp# ./blink_all.sh 3s 40 44
GPIO LED Test
Usage: ./blink_all.sh [wait time] [gpio start] [gpio end]
Example: ./blink_all.sh 3s 0 1
leave gpio range blank to test all GPIOs.
There is a blank line at the bottom of the preformatted text box. I also tried ./blink_all.sh 3s 4 16 and the Globe/Internet LED did not blink at GPIO=14. Moved the NIC from LAN4 -> LAN1. GPIO 14 persisted although I did not reboot the router.
Thanks again, I'm learning alot.
Addendum: I downloaded the RaLink MT7620 spec sheet. The chip can support up to 72 gpio's. There is a separate pin, G4, name: WLED_N, type: O, IPU Description: WLAN Activity LED.
Could the default kernel not be configured for gpio's 40 to 44?
I double checked the dts modifications you provided in your post and rebuilt 2x.
Running ./blink_all.sh 3s 40 44 does not provide any output after "leave gpio range blank to test all GPIOs.", just an empty line. If I leave the GPIO range blank, no gpio's are detected after 23.
root@Shepnet:/tmp# ./blink_all.sh 3s 40 44
GPIO LED Test
Usage: ./blink_all.sh [wait time] [gpio start] [gpio end]
Example: ./blink_all.sh 3s 0 1
leave gpio range blank to test all GPIOs.
root@Shepnet:/tmp#
In FreeBSD, not all pins on a sound chip are utilized, some are left unconnected and I suspect that may be the case here.
The Trendnet TEW-810DR is an exact clone of the D-link DIR-810L which is already committed. I basically used the D-Link commits to build the TEW-810DR. The D-Link commit has the same issue with the "Globe/Internet" led. From this mailing list thread between 2 capable developers: http://lists.infradead.org/pipermail/openwrt-devel/2020-March/022045.html
Hi, > *I noticed, however, that the green "Internet" LED blinks to the LAN4 port,* > *while -I guess- it should blink to the INTERNET (wan/eth0.2) port.* > *But this was already happening before, it's not related to your patch.* green internet LED is not present in the DTS (only orange WAN LED), and there is no entry for the device in 01_leds. So, the LED seems to be controlled by some driver ... Best Adrian
I thought I should make the effort to improve the LED's on the Trendnet prior to submitting.