Ansuel / tch-nginx-gui

Modified file to apply to a stock technicolor GUI
GNU General Public License v3.0
343 stars 52 forks source link

Coloring for xDSL graphs is incorrect #19

Closed meyergru closed 6 years ago

meyergru commented 6 years ago

In diagnostics-xdsl-graphics-modal.lp, there is a repeated section of code:

   if ( (5 < i && i < 32) || \
        (869 < i && i < 1205) || \
        (1970 < i && i < 3203) ) {\
        pointBackgroundColor.push("#90cd8a");\
    } else {\
        pointBackgroundColor.push("#f58368");\
    }\

It colors the respective bind for send and receive, but it does so by using static ranges.

The coloring for send/receive bins should be dependent on the actual band plan - e.g. for german Telekom and profile 17a, the last but one range extends only up to something like 2784 instead of 3203. So if the original code is correct for Italy, the band plans differ from those of Germany. Probably, they are at the ISP's discretion.

Maybe there is a way to glean this info from xdslctl output, but I have no idea how.

Oh, BTW: Fine work, thank you Ansuel!

Ansuel commented 6 years ago

i need to find a way to get the band plan from xdslctl info --PbParams (I mean to get the band from the output)

tought was the same for all vdsl :(

meyergru commented 6 years ago

Yes, that should be it. Here is my output of "xdslctl info --pbParams":

xdslctl info --pbParams
xdslctl: ADSL driver and PHY status
Status: Showtime
Last Retrain Reason:    0
Last initialization procedure status:   0
Max:    Upstream rate = 42067 Kbps, Downstream rate = 133251 Kbps
Bearer: 0, Upstream rate = 41998 Kbps, Downstream rate = 109342 Kbps
Bearer: 1, Upstream rate = 0 Kbps, Downstream rate = 0 Kbps
Discovery Phase (Initial) Band Plan
US: (28,60) (871,1205) (1972,2771)
DS: (65,859) (1216,1961) (2793,3943)
Medley Phase (Final) Band Plan
US: (28,60) (871,1205) (1972,2771)
DS: (65,859) (1216,1961) (2793,3943)
VDSL Port Details               Upstream                Downstream
Attainable Net Data Rate:        42067 kbps             133251 kbps
Actual Aggregate Tx Power:      -   0.2 dBm                12.8 dBm
Ansuel commented 6 years ago

@meyergru done :) now it based on this US: (28,60) (871,1205) (1972,2771) hope all works well...

(i mean that the reange are based on the xdslctl command)

meyergru commented 6 years ago

Works great!