OpenWrt Forum Archive

Topic: [WNDR3700] help me identify LEDS please

The content of this topic has been archived on 1 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Helllo,

I just found an old Netgear WNDR3700v1 I'd like to play with.

I've successfully turned on/off some of the LEDs, but there a a few that I can't find.

1st, the success :
USB - green :         /sys/devices/platform/wndr3700-led-usb/leds/netgear\:green\:usb/brightness
POWER - orange :     /sys/devices/platform/leds-gpio/leds/netgear:orange:power/brightness
POWER - green :     /sys/devices/platform/leds-gpio/leds/netgear:green:power/brightness
BTN_WPS - orange:    /sys/devices/platform/leds-gpio/leds/netgear:orange:wps/brightness
BTN_WPS - green :     /sys/devices/platform/leds-gpio/leds/netgear:green:wps/brightness
WiFi 5 Ghz - blue :     /sys/devices/pci0000:00/0000:00:12.0/leds/ath9k-phy1/brightness

2nd, the failed ones :
- WiFi 2.4 Ghz
- Wan
- LAN (1 to 4)
- WiFi button

Actually, it's mostly the last one (WiFi Button) I would like to find.

I found this, but some seem not to work with a simple "echo 1 > X"

root@warty:/# find . -name brightness
./sys/devices/pci0000:00/0000:00:11.0/leds/ath9k-phy0/brightness
./sys/devices/pci0000:00/0000:00:12.0/leds/ath9k-phy1/brightness
./sys/devices/platform/leds-gpio/leds/netgear:orange:power/brightness
./sys/devices/platform/leds-gpio/leds/netgear:orange:wps/brightness
./sys/devices/platform/leds-gpio/leds/netgear:green:wan/brightness
./sys/devices/platform/leds-gpio/leds/netgear:green:wps/brightness
./sys/devices/platform/leds-gpio/leds/netgear:green:power/brightness
./sys/devices/platform/wndr3700-led-usb/leds/netgear:green:usb/brightness

How can I find the missing Leds, and possibly different colours ?

2.4 GHZ wifi led is pci0000:00/0000:00:11.0/leds/ath9k-phy0/brightness
   root@OpenWrt:/sys/devices# echo 1 > pci0000\:00/0000\:00\:11.0/leds/ath9k-phy0/brightness

To my knowledge, the WAN and LAN port leds are controlled by the switch, and can only be programmed to follow one of the predefined logic patterns. Read wiki and the WNDR3700 network config for details on config: https://wiki.openwrt.org/toh/netgear/wn … figuration
https://dev.openwrt.org/browser/trunk/t … twork#L449

For WAN LED we can toggle the color via class/leds/netgear:green:wan/brightness
   root@OpenWrt:/sys# echo 1 >  class/leds/netgear\:green\:wan/brightness
   root@OpenWrt:/sys# echo 0 >  class/leds/netgear\:green\:wan/brightness
(see also https://forum.openwrt.org/viewtopic.php … 50#p153850 )


I don't think that Wifi button has any LED.

Maybe I need to mention some stuff :

# cat /etc/*rel*
DISTRIB_ID="OpenWrt"
DISTRIB_RELEASE="14.07"
DISTRIB_REVISION="r42625"
DISTRIB_CODENAME="barrier_breaker"
DISTRIB_TARGET="ar71xx/generic"
DISTRIB_DESCRIPTION="OpenWrt Barrier Breaker 14.07"
DISTRIB_TAINTS=""

I've configured my WNDR3700 to act as a "dumb AP/switch", so WAN port belongs to the LAN.

I've tried to turn on/off the 2.4 GHz WiFi LED as you mentioned, but it still doesn't work.

I'm not interested in controlling the switch LEDs.
After checking from closer, you're right, there is no LED for the WiFi button.

My main goal (besides mastering the universe) is the following :

- When pushing the button, WiFi turns on for one hour
- After 59 minutes, the WPS button will blink to warn "Hey, if you don't push me within one minute, WiFi will be turned off !!"
-then act upon...

Since my first post, I've install "wifitoggle" : I guess I can use this code  to complete my goal.

I must have played with something wrong, I can't event make wifitoggle work :
When I press BTN_2, here is the logread output :

Tue Dec 22 21:56:13 2015 user.err wifitoggle: led: ath9k-phy0 ath9k-phy1 not found
Tue Dec 22 21:56:13 2015 user.info wifitoggle: device(all) enabled
Tue Dec 22 21:56:13 2015 user.notice root: the button was BTN_2 and the action was pressed
Tue Dec 22 21:56:14 2015 user.notice root: the button was BTN_2 and the action was released

No led, and when going on th LuCi interface, WiFi is off.

# uci export wifitoggle
package wifitoggle

config wifitoggle
        option persistent '0'
        option led_enable_trigger 'timer'
        option led_enable_delayon '500'
        option led_enable_delayoff '500'
        option led_disable_default '0'
        option led_sysfs 'ath9k-phy0 ath9k-phy1'
        option button 'BTN_2'
        option timer '0'

I've tried to remove the package wifitoggle, then re-install it, still KO.

Also, I've tried a little script :

for i in *;do echo $i; echo 1 > $i/brightness;sleep 3; echo 0 > $i/brightness;echo -e "\n\n";sleep 2;done

I can see all of my LEDS turning on/off, except ath9k-phy0 : any idea why ?

The discussion might have continued from here.