[OpenWrt-Devel] [PATCH 2/2] lantiq: Fix status LED on TDW89X0 after boot is completed.
Vittorio G (VittGam)
openwrt at vittgam.net
Fri Apr 22 03:13:20 EDT 2016
On 22/04/2016 08:34:41 CEST, Mathias Kresin wrote:
> Am 21.04.2016 um 23:43 schrieb Vittorio Gambaletta (VittGam):
>> After recent patches, the status LED on this router would stay
>> switched off after boot is completed. A switched off status LED
>> often indicates a boot failure (eg. kernel panic), so fix this and
>> get back to the previous behaviour.
> This change was intentional. Personally, I don't like the idea of using the WPS led as permanent (running) status led. I've never tried it, but I may be possible to use WPS with hostapd and show the status of the WPS action using the WPS led. I like to prevent such a double use of leds.
Well, personally I think that the WPS LED on this router should be used as a "permanent" system status LED, since the power LED is hardwired to the power supply, and there is no other status LED to be used. Since the WPS LED is unused by default on OpenWrt, I think it's better to use it as full system status LED, to avoid "dying" visually on first boot when no DSL or Wi-Fi is configured. This is the same behaviour we have on the TP-LINK MR3020 for example: the System LED in OpenWrt (which stays on after boot) corresponds to the WPS LED as it was used in the original firmware.
Also, if things haven't changed, you need to write custom scripts to use the WPS LED to indicate WPS status. And if you do customize your OpenWrt install with such scripts, and you want the LED to default to off instead of on when WPS is not being used, you can just add a section for the WPS LED in /etc/config/system with "option trigger 'none'" and "option default '0'" to have it switch off after boot is finished.
> The basic idea was to let the WPS led blink as long as the device boots and switch it off at the time the boot has finished. Which means an unsuccessful boot is indicated by a still blinking WPS led.
Nope. If there is a kernel panic, all the GPIO LEDs will stop blinking and get switched off. At least when it happened to me it was like this, but it was some years ago so I might not remember well (or maybe things have changed and the kernel does not stop hardware-assisted LED blinking on panic anymore, or it was just some other coincidence...).
>> Signed-off-by: Vittorio Gambaletta <openwrt at vittgam.net>
>> --- a/target/linux/lantiq/dts/TDW89X0.dtsi
>> +++ b/target/linux/lantiq/dts/TDW89X0.dtsi
>> @@ -8,6 +8,7 @@
>> /* the power led can't be controlled, use the wps led instead */
>> boot = &wps;
>> failsafe = &wps;
>> + running = &wps;
>> dsl = &dsl;
>> internet = &internet;
>> openwrt-devel mailing list
>> openwrt-devel at lists.openwrt.org
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
More information about the openwrt-devel