[FS#321] BTHomeHub5 Type A dsl_notify.sh fails to set LED
LEDE Bugs
lede-bugs at lists.infradead.org
Tue Jan 31 05:21:25 PST 2017
The following task has a new comment added:
FS#321 - BTHomeHub5 Type A dsl_notify.sh fails to set LED
User who did this - Mauro Mozzarelli (ezplanet)
----------
ON THE BUG:
-----------
Further to my previous messages I discovered why your suggestion did not work.
When I create dsl_led via luci the following is inserted in /etc/config/system
config led
option default '0'
option name 'led_dsl'
option sysfs 'bthomehubv5a:red:broadband'
option trigger 'none'
/lib/functions.sh does not find dsl_led and thus the variable $led is not set in /sbin/dsl_notify.sh
It is only when I add manually the name to the led qualifier as follows:
config led 'led_dsl'
that finally $led is set correctly in /sbin/dsl_notify.sh
This looks to me as a bug.
ON THE LED FEATURE SPECIFIC TO BT HOME HUB 5:
---------------------------------------------
I know that what I am suggesting applies to BT Home Hub 5 (and perhaps other boards) only. This is why I said in my previous post that this could be included as a "compile" or "configuration" only option.
"we could provide a choice on weather to have dsl_notify.sh to invert the status of UP/DOWN within the configuration (firmware build configuration or alternatively software uci/luci configuration)"
To support configurability I created a modified patch that take dsl_led "default" parameter.
If the "default" is not set or set to '0' dsl_notify.sh behaves normally. If "default" is set to '1' it inverts the LED status on UP/DOWN.
I re-used the "default" parameter because it is already handled by luci and I did not want to venture into changing anything else. Using "default" set to '1' to invert the behaviour might be counter-intuitive, but it ensure that on a router with default values dsl_notify.sh behaves as per default.
A more elegant solution, if you prefer, would be to create a new "inverted" boolean parameter. But this would require changing also luci (I am not practical with that).
Please see below my system LED configuration, the new parametrized patch and a link to a video showing how the router behaves with the patch and configuration below applied.
config led 'led_wifi'
option name 'wifi'
option sysfs 'bthomehubv5a:blue:wireless'
option trigger 'phy0tpt'
option default '0'
config led 'led_internet'
option name 'internet'
option sysfs 'bthomehubv5a:blue:broadband'
option trigger 'netdev'
option default '0'
option dev 'pppoa-wan'
option mode 'link tx rx'
config led 'led_dimmed'
option name 'dimmed'
option sysfs 'dimmed'
option trigger 'none'
option default '1'
config led 'led_dsl'
option name 'led_dsl'
option sysfs 'bthomehubv5a:red:broadband'
option default '1'
option trigger 'none'
config led
option default '0'
option name 'dmz'
option trigger 'netdev'
option dev 'eth1.2'
option mode 'tx rx'
option sysfs 'bthomehubv5a:green:wireless'
The video shows the LED behavior with the patch.
In the video, first you see adsl connected (BLUE "b"),
then I issue a /etc/init.d/dsl_control stop followed by a start
You see the LED going from BLUE to RED then blinking through ADSL states, the going OFF and turn BLUE when the pppoa is connected.
After that I issue a reboot to show the states during startup through to reconnection.
This satisfies my requirements because I have visual feedback covering all cases without having to log into the computer.
----------
One or more files have been attached.
More information can be found at the following URL:
https://bugs.lede-project.org/index.php?do=details&task_id=321#comment1524
More information about the lede-bugs
mailing list