Hi,
I've been using trunk on a Buffalo WBMR-HP-G300H ADSL router with great
success, so I've been looking at the existing DSL support and am keen to
help out getting it better integrated.
I'm conscious that there are likely to be a number of different DSL
devices needing support and have been thinking about a way to have
relatively standard support in LuCI but with flexibility in
implementation.
I have put together some patches to start doing this, but thought it
best to check the concepts before getting too far ... also I don't know
if anyone else is working on this or if other ideas have been discussed.
So basically:
A single "control" script that is shipped as part of the relevant
driver (or app) for the device. For me, this is the lantiq one.
The control script (my suggestion is: /etc/init.d/dsl_control) would
be responsible for the normal start and stop as any rc script would be.
But also ... the control script can be used to get the DSL status,
either in human readable form, or in a standard form parsable by Luci.
In this way any DSL implementation need only provide basic start, stop
and status information and then it could easily appear in LuCI to
provide line status, speed and noise information without any hardware
specific detail in LuCI.
Just by way of example:
root@OpenWrt:~# /etc/init.d/dsl_control status
Line State: UP [0x801: showtime_tc_sync]
Data Rate: 4.064 Mb/s / 448 Kb/s
Line Attenuation: 49.0dB / 26.5dB
Noise Margin: 12.2dB / 25.0dB
Or, the LuCI compatible version ... I went for a "loadstring" approach
that returned a lua table:
root@OpenWrt:~# /etc/init.d/dsl_control luastat
local dsl={}
dsl.line_state_num=0x801
dsl.line_state_detail="showtime_tc_sync"
dsl.line_state="UP"
dsl.data_rate_down=4064000
dsl.data_rate_up=448000
dsl.data_rate_down_s="4.064 Mb"
dsl.data_rate_up_s="448 Kb"
dsl.line_attenuation_down=49.0
dsl.line_attenuation_up=26.5
dsl.noise_margin_down=12.3
dsl.noise_margin_up=25.0
return dsl
I've also implemented the basic summary in the LuCI admin overview page
which looks pretty nice, updates regularly (you can see the noise margin
changing) and doesn't seem to place much load on the system.
There's a bit more to do, it currently doesn't actually check the
daemon is running etc, also I think a "start_available" and
"stop_available" variable might be a nice way to control whether LuCI
should allow start and stop buttons ... possible on the network admin
page?
Anyway ... just a few ideas, interested in thoughts, I can post the
current patches if there's interest, or happy to explore other ideas if
I'm way off the mark.
Cheers,
Lee.
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel