Seguridad Wireless - Wifi

Equipos y materiales => Puntos de acceso, routers, switchs y bridges => Openwrt & LEDE => Mensaje iniciado por: kaitak en 22-05-2014, 16:53 (Jueves)

Título: Ayudar con lantiq_dsl
Publicado por: kaitak en 22-05-2014, 16:53 (Jueves)
Saludos y por favor perdona el Inglés

Would like to add some more vdsl line information to lantiq_dsl.sh and luci status web page.

This is an example from kitz- that sadly never made it into openwrt patchwork.

root@OpenWrt:~# /etc/init.d/dsl_control status
CPE Chipset:      Lantiq-VRx:5.4.8.6.1.6
CO Chipset:      BDCM:v10.07.26
Line State:      UP [0x801: showtime_tc_sync]
Attain Data Rate:   49106 Kbps / 2625 Kbps
Actual Data Rate:   49080 Kbps / 2684 Kbps
Interleave Delay:       8.50 ms / 5.50 ms
Impulse Noise Prot:     1.0 sym / 0.7 sym
Line Attenuation:   32.2 dB / 0.0 dB
Signal Attenuation:   28.2 dB / 0.0 dB
Noise Margin:      6.1 dB / 5.5 dB
Transmit Power:      13.6 dBm / 6.3 dBm
Line Uptime:      2m 4s
FEC Errors:             1433 / 6607
CRC Errors:             150 / 441
ES:                     133 / 2
SES:                    42 / 0
UAS:                    311 / 311

Working with this basic script so far

Código: [Seleccionar]
#!/bin/sh /etc/rc.common
# Copyright (C) 2012 OpenWrt.org

XDSL_CTRL=dsl_cpe_control

#
# Basic functions to send CLI commands to the vdsl_cpe_control daemon
#
dsl_cmd() {
killall -0 ${XDSL_CTRL} && (
echo "$@" > /tmp/pipe/dsl_cpe0_cmd
cat /tmp/pipe/dsl_cpe0_ack
)
}
dsl_val() {
echo $(expr "$1" : '.*'$2'=\([-\.[:alnum:]]*\).*')
}

#
# Simple divide by 10 routine to cope with one decimal place
#
dbt() {
local a=$(expr $1 / 10)
local b=$(expr $1 % 10)
echo "${a}.${b}"
}
#
# Take a number and convert to k or meg
#
scale() {
local val=$1
local a
local b

if [ "$val" -gt 1000000 ]; then
a=$(expr $val / 1000)
b=$(expr $a % 1000)
a=$(expr $a / 1000)
printf "%d.%03d Mb" ${a} ${b}
elif [ "$val" -gt 1000 ]; then
a=$(expr $val / 1000)
printf "%d Kb" ${a}
else
echo "${val} b"
fi
}

#
# Read the data rates for both directions
#
data_rates() {
local csg
local lsg
local dru
local drd
local adru
local adrd
local sdru
local sdrd
local sadru
local sadrd

csg=$(dsl_cmd g997csg 0 1)
drd=$(dsl_val "$csg" ActualDataRate)

csg=$(dsl_cmd g997csg 0 0)
dru=$(dsl_val "$csg" ActualDataRate)

lsg=$(dsl_cmd g997lsg 1 1)
adrd=$(dsl_val "$lsg" ATTNDR)

lsg=$(dsl_cmd g997lsg 0 1)
adru=$(dsl_val "$lsg" ATTNDR)

[ -z "$drd" ] && drd=0
[ -z "$dru" ] && dru=0
[ -z "$adrd" ] && adrd=0
[ -z "$adru" ] && adru=0

sdrd=$(scale $drd)
sdru=$(scale $dru)

sadrd=$(scale $adrd)
sadru=$(scale $adru)

if [ "$action" = "lucistat" ]; then
echo "dsl.data_rate_down=$drd"
echo "dsl.data_rate_up=$dru"
echo "dsl.data_rate_down_s=\"$sdrd\""
echo "dsl.data_rate_up_s=\"$sdru\""
echo "dsl.att_data_rate_down=\"$adrd\""
echo "dsl.att_data_rate_up=\"$adru\""
echo "dsl.att_data_rate_down_s=\"$sadrd\""
echo "dsl.att_data_rate_up_s=\"$sadru\""
else
echo "Attain Data Rate: ${sadrd}ps / ${sadru}ps"
echo "Actual Data Rate: ${sdrd}ps / ${sdru}ps"
fi
}

#
# Chipset
#
chipset() {
local vig
local cs
local csv

vig=$(dsl_cmd vig)
cs=$(dsl_val "$vig" DSL_ChipSetType)
csv=$(dsl_val "$vig" DSL_ChipSetHWVersion)

if [ "$action" = "lucistat" ]; then
echo "dsl.chipset=\"${cs} ${csv}\""
else
echo "Chipset: ${cs} ${csv}"
fi
}

#
# Work out how long the line has been up
#
line_uptime() {
local ccsg
local et
local etr
local d
local h
local m
local s
local rc=""

ccsg=$(dsl_cmd pmccsg 0 0 0)
et=$(dsl_val "$ccsg" nElapsedTime)

[ -z "$et" ] && et=0

if [ "$action" = "lucistat" ]; then
echo "dsl.line_uptime=${et}"
return
fi

d=$(expr $et / 86400)
etr=$(expr $et % 86400)
h=$(expr $etr / 3600)
etr=$(expr $etr % 3600)
m=$(expr $etr / 60)
s=$(expr $etr % 60)


[ "${d}${h}${m}${s}" -ne 0 ] && rc="${s}s"
[ "${d}${h}${m}" -ne 0 ] && rc="${m}m ${rc}"
[ "${d}${h}" -ne 0 ] && rc="${h}h ${rc}"
[ "${d}" -ne 0 ] && rc="${d}d ${rc}"

[ -z "$rc" ] && rc="down"
echo "Line Uptime: ${rc}"
}

#
# Get noise and attenuation figures
#
line_data() {
local lsg
local latnu
local latnd
local snru
local snrd

lsg=$(dsl_cmd g997lsg 1 1)
latnd=$(dsl_val "$lsg" LATN)
snrd=$(dsl_val "$lsg" SNR)

lsg=$(dsl_cmd g997lsg 0 1)
latnu=$(dsl_val "$lsg" LATN)
snru=$(dsl_val "$lsg" SNR)

[ -z "$latnd" ] && latnd=0
[ -z "$latnu" ] && latnu=0
[ -z "$snrd" ] && snrd=0
[ -z "$snru" ] && snru=0

latnd=$(dbt $latnd)
latnu=$(dbt $latnu)
snrd=$(dbt $snrd)
snru=$(dbt $snru)

if [ "$action" = "lucistat" ]; then
echo "dsl.line_attenuation_down=$latnd"
echo "dsl.line_attenuation_up=$latnu"
echo "dsl.noise_margin_down=$snrd"
echo "dsl.noise_margin_up=$snru"
else
echo "Line Attenuation: ${latnd}dB / ${latnu}dB"
echo "Noise Margin: ${snrd}dB / ${snru}dB"
fi
}

#
# Is the line up? Or what state is it in?
#
line_state() {
local lsg=$(dsl_cmd lsg)
local ls=$(dsl_val "$lsg" nLineState);
local s;

case "$ls" in
"0x0") s="not initialized" ;;
"0x1") s="exception" ;;
"0x10") s="not updated" ;;
"0xff") s="idle request" ;;
"0x100") s="idle" ;;
"0x1ff") s="silent request" ;;
"0x200") s="silent" ;;
"0x300") s="handshake" ;;
"0x380") s="full_init" ;;
"0x400") s="discovery" ;;
"0x500") s="training" ;;
"0x600") s="analysis" ;;
"0x700") s="exchange" ;;
"0x800") s="showtime_no_sync" ;;
"0x801") s="showtime_tc_sync" ;;
"0x900") s="fastretrain" ;;
"0xa00") s="lowpower_l2" ;;
"0xb00") s="loopdiagnostic active" ;;
"0xb10") s="loopdiagnostic data exchange" ;;
"0xb20") s="loopdiagnostic data request" ;;
"0xc00") s="loopdiagnostic complete" ;;
"0x1000000") s="test" ;;
"0xd00") s="resync" ;;
"0x3c0") s="short init entry" ;;
"") s="not running daemon"; ls="0xfff" ;;
*) s="unknown" ;;
esac

if [ $action = "lucistat" ]; then
echo "dsl.line_state_num=$ls"
echo "dsl.line_state_detail=\"$s\""
if [ "$ls" = "0x801" ]; then
echo "dsl.line_state=\"UP\""
else
echo "dsl.line_state=\"DOWN\""
fi
else
if [ "$ls" = "0x801" ]; then
echo "Line State: UP [$ls: $s]"
else
echo "Line State: DOWN [$ls: $s]"
fi
fi
}

status() {
chipset
line_state
data_rates
line_data
line_uptime
}

lucistat() {
echo "local dsl={}"
status
echo "return dsl"
}

root@OpenWrt:~# /etc/init.d/dsl_control status
Chipset:                Lantiq-VRx Unknown
Line State:             UP [0x801: showtime_tc_sync]
Attain Data Rate:       0 / 0 Mbps
Actual Data Rate:       0 / 0 Mbps
Line Attenuation:       0dB / 0.0dB
Noise Margin:           0dB / 0dB
Line Uptime:            0m 52s

Help would be most welcome to add this additional information to the script.

Interleave Delay
Impulse noise protection
FEC Errors:            
CRC Errors:            
ES:                    
SES:                    
UAS:    

Yo soy un novato con poca experiencia en comparación con los otros grandes carteles en este sitio ayuda sería muy apreciada!
Muchas gracias
Título: Re: Re: Ayudar con lantiq_dsl
Publicado por: sanson en 22-05-2014, 17:58 (Jueves)
Hola

¿y por que escribes en ingles , ?   Entiendo que al decir " perdón por el ingles ".  Es por que no es tu idioma.  Este foro es en castellano por tanto no hay necesidad de escribir en ingles si no es tu idioma .

Saludos
Título: Re: Ayudar con lantiq_dsl
Publicado por: kaitak en 22-05-2014, 18:13 (Jueves)
Hola
Thanks for the reply.

English is far easier for me, ;) {Hence the apology for not being able to post fully in castellano}
Just wanted to post  a  few words spainish/castellano out of respect for the forum users.

Thanks  ;D
Título: Re: Re: Ayudar con lantiq_dsl
Publicado por: sanson en 22-05-2014, 18:32 (Jueves)
Hola

Oh okay, I thought you were Spanish and you made an effort to write in english

Saludos
Título: Re: Ayudar con lantiq_dsl
Publicado por: Tki2000 en 22-05-2014, 18:46 (Jueves)
Citar
Yo soy un novato con poca experiencia en comparación con los otros grandes carteles en este sitio ayuda sería muy apreciada!
Difícilmente un español escribiría así...  ;D

Hi! Welcome to the forum!
Sometimes google translate does not "translate" very well. So when I have to write something in a foreign language I put the translation along with the original not translated text. That way there's a possibility for other people who can read your mother language to try to understand the mistakes made by Saint Google.
Título: Re: Ayudar con lantiq_dsl
Publicado por: kaitak en 22-05-2014, 19:18 (Jueves)
Thanks for the warm welcome !  Gracias por la cálida bienvenida!

Did think about dual posting -  didn't   want to clutter  threads   :-[
Pensé en el doble desplazamiento - no quería estorbar hilos-


From the help command

ActualInterleaveDelay &  ActualImpulseNoiseProtection is under from g997csg

Código: [Seleccionar]
g997csg 0 1
nReturn=0 nChannel=0 nDirection=1 ActualDataRate  PreviousDataRate             000 ActualInterleaveDelay  ActualImpulseNoiseProtection
 ActualInterleaveDelay  ActualImpulseNoiseProtection


for FEC errors

Código: [Seleccionar]
pmcc1dg 0 1 0
nReturn=0 nChannel=0 nDirection=1 nHistoryInterval=0 nElapsedTime=0 bValid=1 nCodeViolations      =1 nFEC=0

For CRC & HEC
Código: [Seleccionar]
>pmdpc1dg 0 1 0
nReturn=0 nChannel=0 nDirection=1 nHistoryInterval=0 nElapsedTime= 0bValid=1 nHEC=0 nTotalCells=0 nUserTotalCells=0 nIBE=0 nTxUserTotalCells=0 nTxIBE=0 nCRC_P=0 nCRCP_P=0 nCV_P=0 nCVP_P=0

For ES & SES
Código: [Seleccionar]
pmlsc1dg 1 0
nReturn=0 nDirection=1 nHistoryInterval=0 nElapsedTime=0 bValid=1 nES=0 nSES=0  nLOSS=0nUAS=0 nLO        FS=0

System Msan Vendor ID
Código: [Seleccionar]
g997listrg 0
nReturn=0 nDirection=0 G994VendorID=IFTNU SystemVendorID=IFTN VersionNumber=5 SerialNumber=1 SelfTestResult=0 XTSECapabilities=(00,00,00,00,00,00,00,07)

Struggling to write that extra info into the script -
The posters on here are of very high caliber - any  pointers help ect would be greatly appreciated
in any language!

Luchando para escribir esa información adicional en el guión -
Los carteles de aquí son de muy alto calibre - cualquier punteros ayudan ect sería muy apreciada
en cualquier idioma!
Título: Re: Ayudar con lantiq_dsl
Publicado por: doblecero en 23-05-2014, 08:16 (Viernes)
Hi,
I wonder whether they (OpenWrt people) are going to be happy with you approach of expanding the given information in the status command (no offense, I'm not complaining), they might not accept a patch bacause of this - not sure, just raising, let's see what other members say

A ddifferent approch would be adding those exta info into a new command. Something like status-all. So, /etc/init.d/dsl_control status would return the same that always has been returning and /etc/init.d/dsl_control status-all would return all the information we (actually you :)) can get from the driver.

Anyway, good work done so far  >:( >:( >:(

Cheers.
Título: Re: Ayudar con lantiq_dsl
Publicado por: Pteridium en 23-05-2014, 10:34 (Viernes)
Hi,
I wonder whether they (OpenWrt people) are going to be happy with you approach of expanding the given information in the status command (no offense, I'm not complaining), they might not accept a patch bacause of this - not sure, just raising, let's see what other members say

A ddifferent approch would be adding those exta info into a new command. Something like status-all. So, /etc/init.d/dsl_control status would return the same that always has been returning and /etc/init.d/dsl_control status-all would return all the information we (actually you :)) can get from the driver.

Anyway, good work done so far  >:( >:( >:(

Cheers.
I agree with you: status for the basic info and status-all for the extended. Should be easy to make it.
Another option is to make an independent script (something like /bin/dsl_status.sh) that shows the extended info. What do you think?

@kaitak: great discovery! A lot of thanks for share it.  >:( >:( >:(
Título: Re: Ayudar con lantiq_dsl
Publicado por: kaitak en 23-05-2014, 16:02 (Viernes)
Thank you for the kind words  :D

Although I was only really just adding to the great work of Lee Essen,
Frank Meerkötter, asbokid ,espeltron and of course John Crispin
.*
 
A new command would be great - would make it easier to  add an element/tab in luci. ?

You guys know far more on how best to approach openwrt patches so I'll follow you guys.

Managed to add downstream/upstream  Interleave Delay and Noise P from g997csg 0 1 / g997csg 0 0

 --- for now I'll hold off adding error rates to "status" ,as I think your approach is better -- ;)

Código: [Seleccionar]
Interleave Delay:       1350ms / 950ms
Impulse Noise P:        50sym / 26sym
Line Attenuation:       17.8dB / 0.0dB
Noise Margin:            7.1dB / 6.2dB

Thanks
un cordial saludo
---------------------------------------------------------------------------------------------------------------------

 * http://patchwork.openwrt.org/patch/2941
   https://lists.openwrt.org/pipermail/openwrt-devel/2012-January/013602.html

http://luci.subsignal.org/trac/attachment/ticket/620/OpenWrt-Devel-dsl-support-for-the-luci-webinterface.patch

   http://hackingecibfocusv2fubirevb.wordpress.com/
   http://huaweihg612hacking.wordpress.com/
 
https://foro.seguridadwireless.net/openwrt/(desarrollo)-openwrt-en-astoria-arv7519rw22-livebox-2-1/160/
Título: Re: Ayudar con lantiq_dsl
Publicado por: Pteridium en 23-05-2014, 16:38 (Viernes)
Thank you for the kind words  :D

Although I was only really just adding to the great work of Lee Essen,
Frank Meerkötter, asbokid  and of course John Crispin
.*
 
A new command would be great - would make it easier to  add an element/tab in luci. ?

You guys know far more on how best to approach openwrt patches so I'll follow you guys.

Managed to add downstream/upstream  Interleave Delay and Noise P from g997csg 0 1 / g997csg 0 0

 --- for now I'll hold off adding error rates to "status" ,as I think your approach is better -- ;)

Código: [Seleccionar]
Interleave Delay:       1350ms / 950ms
Impulse Noise P:        50sym / 26sym
Line Attenuation:       17.8dB / 0.0dB
Noise Margin:            7.1dB / 6.2dB

Thanks
un cordial saludo
---------------------------------------------------------------------------------------------------------------------

 * http://patchwork.openwrt.org/patch/2941
   https://lists.openwrt.org/pipermail/openwrt-devel/2012-January/013602.html

The patches you have mentioned was included in openwrt and LuCI (if not the patches itself, at least the idea). With those links the job should be easier.
I still think that, for the moment, the initial approach should be add "dsl_control status-all " as doblecero pointed or write an independent script.

My idea is to make both options an let developers decide which is the best for OpenWRT. What do you think?
Título: Re: Ayudar con lantiq_dsl
Publicado por: kaitak en 23-05-2014, 17:03 (Viernes)
I'll just follow you guys in what ever method has the best chance to be included to patchwork.  :D

I have no real experience in this area.

You guys are far for skilled than I - You''ll have a script produced before I've even thought about where to start  ;D  ;D

muchas gracias  :D
Título: Re: Ayudar con lantiq_dsl
Publicado por: Tki2000 en 23-05-2014, 18:01 (Viernes)
I think that, whatever the change is to be, it has to be backwards compatible. So I think it should be treated as an addon.
As an addon, you may or may not use the info returned by dsl_status, and will not break some other apps (or scripts that someone has already made) that rely on the "legacy" behaviour.
If you implement that as a forced addition, then you could break some other apps that rely on it.
If implemented with another whole command, or as an aditional argument to dsl_status, it's the programmer's choice. Just select one way or the other.
Título: Re: Ayudar con lantiq_dsl
Publicado por: Pteridium en 23-05-2014, 18:40 (Viernes)
If implemented with another whole command, or as an aditional argument to dsl_status, it's the programmer's choice. Just select one way or the other.

That is the plan: make an add-on in dsl_control or an independent script that gathers the additional info. If we don't do it in that way the patches will be rejected.
Título: Re: Ayudar con lantiq_dsl
Publicado por: kaitak en 24-05-2014, 00:53 (Sábado)
Thanks  guys  ;) ;D

Título: Re:
Publicado por: doblecero en 24-05-2014, 11:49 (Sábado)
Thanks to you!
Your time and effort are highly appreciated ;)

Enviado desde mi GT-I9300 mediante Tapatalk

Título: Re: Ayudar con lantiq_dsl
Publicado por: kaitak en 24-05-2014, 19:24 (Sábado)
gracias, gracias  ;D

If there are any commands you would like testing or adding to the template  feel free to ask /test or amend with your elegant scripts  as  I am experiencing writers block  :-[

Código: [Seleccionar]
CPE Chipset:      Lantiq-VRx:5.4.8.6.1.6
CO Chipset:      BDCM:v10.07.26
Line State:      UP [0x801: showtime_tc_sync]
Attain Data Rate:   49106 Kbps / 2625 Kbps
Actual Data Rate:   49080 Kbps / 2684 Kbps
Interleave Delay:       8.50 ms / 5.50 ms
Impulse Noise Prot:     1.0 sym / 0.7 sym
Line Attenuation:   32.2 dB / 0.0 dB
Signal Attenuation:   28.2 dB / 0.0 dB
Noise Margin:      6.1 dB / 5.5 dB
Transmit Power:      13.6 dBm / 6.3 dBm
Line Uptime:      2m 4s
FEC Errors:             1433 / 6607
CRC Errors:             150 / 441
ES:                     133 / 2
SES:                    42 / 0
UAS:                    311 / 311

disfrutar de la final de fútbol  / Monaco F1  ;)

saludos cordiales
Título: Re: Ayudar con lantiq_dsl
Publicado por: Pteridium en 25-05-2014, 16:21 (Domingo)
This is only a draft but should work. Was not added lucistats to avoid problems with LuCI.
Código: [Seleccionar]
#!/bin/sh /etc/rc.common
# Copyright (C) 2012 OpenWrt.org

XDSL_CTRL=dsl_cpe_control

#
# Basic functions to send CLI commands to the vdsl_cpe_control daemon
#
dsl_cmd() {
killall -0 ${XDSL_CTRL} && (
echo "$@" > /tmp/pipe/dsl_cpe0_cmd
cat /tmp/pipe/dsl_cpe0_ack
)
}
dsl_val() {
echo $(expr "$1" : '.*'$2'=\([-\.[:alnum:]]*\).*')
}

#
# Simple divide by 10 routine to cope with one decimal place
#
dbt() {
local a=$(expr $1 / 10)
local b=$(expr $1 % 10)
echo "${a}.${b}"
}
#
# Take a number and convert to k or meg
#
scale() {
local val=$1
local a
local b

if [ "$val" -gt 1000000 ]; then
a=$(expr $val / 1000)
b=$(expr $a % 1000)
a=$(expr $a / 1000)
printf "%d.%03d Mb" ${a} ${b}
elif [ "$val" -gt 1000 ]; then
a=$(expr $val / 1000)
printf "%d Kb" ${a}
else
echo "${val} b"
fi
}

#
# Read the data rates for both directions
#
data_rates() {
local csg
local dru
local drd
local sdru
local sdrd

csg=$(dsl_cmd g997csg 0 1)
drd=$(dsl_val "$csg" ActualDataRate)

csg=$(dsl_cmd g997csg 0 0)
dru=$(dsl_val "$csg" ActualDataRate)

[ -z "$drd" ] && drd=0
[ -z "$dru" ] && dru=0

sdrd=$(scale $drd)
sdru=$(scale $dru)

if [ "$action" = "lucistat" ]; then
echo "dsl.data_rate_down=$drd"
echo "dsl.data_rate_up=$dru"
echo "dsl.data_rate_down_s=\"$sdrd\""
echo "dsl.data_rate_up_s=\"$sdru\""
else
echo "Data Rate: ${sdrd}/s / ${sdru}/s"
fi
}

#
# Read the extended data rates for both directions
#
data_rates_extended() {
local csg
local lsg
local dru
local drd
local adru
local adrd
local sdru
local sdrd
local sadru
local sadrd

csg=$(dsl_cmd g997csg 0 1)
drd=$(dsl_val "$csg" ActualDataRate)

csg=$(dsl_cmd g997csg 0 0)
dru=$(dsl_val "$csg" ActualDataRate)

lsg=$(dsl_cmd g997lsg 1 1)
adrd=$(dsl_val "$lsg" ATTNDR)

lsg=$(dsl_cmd g997lsg 0 1)
adru=$(dsl_val "$lsg" ATTNDR)

[ -z "$drd" ] && drd=0
[ -z "$dru" ] && dru=0
[ -z "$adrd" ] && adrd=0
[ -z "$adru" ] && adru=0

sdrd=$(scale $drd)
sdru=$(scale $dru)

sadrd=$(scale $adrd)
sadru=$(scale $adru)

if [ "$action" = "lucistat" ]; then
echo "dsl.data_rate_down=$drd"
echo "dsl.data_rate_up=$dru"
echo "dsl.data_rate_down_s=\"$sdrd\""
echo "dsl.data_rate_up_s=\"$sdru\""
echo "dsl.att_data_rate_down=\"$adrd\""
echo "dsl.att_data_rate_up=\"$adru\""
echo "dsl.att_data_rate_down_s=\"$sadrd\""
echo "dsl.att_data_rate_up_s=\"$sadru\""
else
echo "Attain Data Rate: ${sadrd}ps / ${sadru}ps"
echo "Actual Data Rate: ${sdrd}ps / ${sdru}ps"
fi
}

#
# Chipset
#
chipset() {
local vig
local cs
local csv

vig=$(dsl_cmd vig)
cs=$(dsl_val "$vig" DSL_ChipSetType)
csv=$(dsl_val "$vig" DSL_ChipSetHWVersion)

if [ "$action" = "lucistat" ]; then
echo "dsl.chipset=\"${cs} ${csv}\""
else
echo "Chipset: ${cs} ${csv}"
fi
}

#
# Work out how long the line has been up
#
line_uptime() {
local ccsg
local et
local etr
local d
local h
local m
local s
local rc=""

ccsg=$(dsl_cmd pmccsg 0 0 0)
et=$(dsl_val "$ccsg" nElapsedTime)

[ -z "$et" ] && et=0

if [ "$action" = "lucistat" ]; then
echo "dsl.line_uptime=${et}"
return
fi

d=$(expr $et / 86400)
etr=$(expr $et % 86400)
h=$(expr $etr / 3600)
etr=$(expr $etr % 3600)
m=$(expr $etr / 60)
s=$(expr $etr % 60)


[ "${d}${h}${m}${s}" -ne 0 ] && rc="${s}s"
[ "${d}${h}${m}" -ne 0 ] && rc="${m}m ${rc}"
[ "${d}${h}" -ne 0 ] && rc="${h}h ${rc}"
[ "${d}" -ne 0 ] && rc="${d}d ${rc}"

[ -z "$rc" ] && rc="down"
echo "Line Uptime: ${rc}"
}

#
# Get noise and attenuation figures
#
line_data() {
local lsg
local latnu
local latnd
local snru
local snrd

lsg=$(dsl_cmd g997lsg 1 1)
latnd=$(dsl_val "$lsg" LATN)
snrd=$(dsl_val "$lsg" SNR)

lsg=$(dsl_cmd g997lsg 0 1)
latnu=$(dsl_val "$lsg" LATN)
snru=$(dsl_val "$lsg" SNR)

[ -z "$latnd" ] && latnd=0
[ -z "$latnu" ] && latnu=0
[ -z "$snrd" ] && snrd=0
[ -z "$snru" ] && snru=0

latnd=$(dbt $latnd)
latnu=$(dbt $latnu)
snrd=$(dbt $snrd)
snru=$(dbt $snru)

if [ "$action" = "lucistat" ]; then
echo "dsl.line_attenuation_down=$latnd"
echo "dsl.line_attenuation_up=$latnu"
echo "dsl.noise_margin_down=$snrd"
echo "dsl.noise_margin_up=$snru"
else
echo "Line Attenuation: ${latnd}dB / ${latnu}dB"
echo "Noise Margin: ${snrd}dB / ${snru}dB"
fi
}

#
# Is the line up? Or what state is it in?
#
line_state() {
local lsg=$(dsl_cmd lsg)
local ls=$(dsl_val "$lsg" nLineState);
local s;

case "$ls" in
"0x0") s="not initialized" ;;
"0x1") s="exception" ;;
"0x10") s="not updated" ;;
"0xff") s="idle request" ;;
"0x100") s="idle" ;;
"0x1ff") s="silent request" ;;
"0x200") s="silent" ;;
"0x300") s="handshake" ;;
"0x380") s="full_init" ;;
"0x400") s="discovery" ;;
"0x500") s="training" ;;
"0x600") s="analysis" ;;
"0x700") s="exchange" ;;
"0x800") s="showtime_no_sync" ;;
"0x801") s="showtime_tc_sync" ;;
"0x900") s="fastretrain" ;;
"0xa00") s="lowpower_l2" ;;
"0xb00") s="loopdiagnostic active" ;;
"0xb10") s="loopdiagnostic data exchange" ;;
"0xb20") s="loopdiagnostic data request" ;;
"0xc00") s="loopdiagnostic complete" ;;
"0x1000000") s="test" ;;
"0xd00") s="resync" ;;
"0x3c0") s="short init entry" ;;
"") s="not running daemon"; ls="0xfff" ;;
*) s="unknown" ;;
esac

if [ $action = "lucistat" ]; then
echo "dsl.line_state_num=$ls"
echo "dsl.line_state_detail=\"$s\""
if [ "$ls" = "0x801" ]; then
echo "dsl.line_state=\"UP\""
else
echo "dsl.line_state=\"DOWN\""
fi
else
if [ "$ls" = "0x801" ]; then
echo "Line State: UP [$ls: $s]"
else
echo "Line State: DOWN [$ls: $s]"
fi
fi
}

status() {
chipset
line_state
data_rates
line_data
line_uptime
}

status_all() {
chipset
line_state
data_rates_extended
line_data
line_uptime
}

lucistat() {
echo "local dsl={}"
status
echo "return dsl"
}
The extended info is displayed with "/etc/init.d/dsl_control status_all".
I couldn't test the script so any advice will be welcome.  :-\

Edit: here (http://www.mediafire.com/download/g1ofsmx1m0d1ua0/ltq_dsl_info.tar.bz2) are the patch and the modified lantiq_dsl.sh. The file is located, inside the flash of the router, in /lib/functions/. The patch is intended to be applied in the OpenWRT sources with a simple "patch -p0 -i dsl_info.patch".
Título: Re: Ayudar con lantiq_dsl
Publicado por: kaitak en 25-05-2014, 21:02 (Domingo)
Gracias gracias for the draft.

Worked no problem when adding extra commands /help in dsl_control  ( shortened "all" command also works great  
 
/etc/init.d/dsl_control
Código: [Seleccionar]
 
#!/bin/sh /etc/rc.common
# Copyright (C) 2012 OpenWrt.org
# needs to start before the atm layer which starts at 50
START=48

EXTRA_COMMANDS="status status_all lucistat"       ++
EXTRA_HELP="    status  Get DSL status information
        status_ all     Get DSL status extended  information   +++
        lucistat  Get status information if lua friendly format"


root@OpenWrt:~#  /etc/init.d/dsl_control status_all
Código: [Seleccionar]
Chipset:                Lantiq-VRx Unknown
Line State:             UP [0x801: showtime_tc_sync]
Attain Data Rate:       0. 0 Mbps / 0.0 Mbps
Actual Data Rate:       0.0 Mbps / 0.0 Mbps
Line Attenuation:       17.8dB / 0.0dB
Noise Margin:           6.5dB / 6.1dB
Line Uptime:            0h  0m 40s

root@OpenWrt:~#  /etc/init.d/dsl_control status
Código: [Seleccionar]
Chipset:                Lantiq-VRx Unknown
Line State:             UP [0x801: showtime_tc_sync]
Data Rate:              0 Mb/s / 0Mb/s
Line Attenuation:       17.8dB / 0.0dB
Noise Margin:           6.5dB / 6.1dB
Line Uptime:            0h 0m 7s


 root@OpenWrt:~# /etc/init.d/dsl_control lucistat
Código: [Seleccionar]
local dsl={}
dsl.chipset="Lantiq-VRx Unknown"
dsl.line_state_num=0x801
dsl.line_state_detail="showtime_tc_sync"
dsl.line_state="UP"
dsl.data_rate_down=0
dsl.data_rate_up=0
dsl.data_rate_down_s="0 Mb"
dsl.data_rate_up_s=" 0Mb"
dsl.line_attenuation_down=17.8
dsl.line_attenuation_up=0.0
dsl.noise_margin_down=6.5
dsl.noise_margin_up=6.1
dsl.line_uptime=100
return dsl


Syntax: /etc/init.d/dsl_control [command]
Código: [Seleccionar]
Available commands:
        start   Start the service
        stop    Stop the service
        restart Restart the service
        reload  Reload configuration files (or restart if that fails)
        enable  Enable service autostart
        disable Disable service autostart
        status  Get DSL status information
        status_ all     Get DSL status extended  information
        lucistat  Get status information if lua friendly format

Título: Re: Ayudar con lantiq_dsl
Publicado por: kaitak en 26-05-2014, 15:38 (Lunes)
No problems so far  20h+   running smoothly  {lisamente?}

Código: [Seleccionar]
root@OpenWrt:~# /etc/init.d/dsl_control all
Chipset:                Lantiq-VRx Unknown
Line State:             UP [0x801: showtime_tc_sync]
Attain Data Rate:       49.588 Mbps / 11.134 Mbps
Actual Data Rate:       48.752 Mbps / 11.352 Mbps
Line Attenuation:       17.8dB / 0.0dB
Noise Margin:           6.4dB / 6.0dB
Line Uptime:            21h 52m 11s
Gracias  :D
Título: Re: Ayudar con lantiq_dsl
Publicado por: doblecero en 26-05-2014, 16:20 (Lunes)
Great!
As soon as I sort some compilations issues out I'll update this on my Livebox and see how it works too. :)
Título: Re: Ayudar con lantiq_dsl
Publicado por: kaitak en 26-05-2014, 21:46 (Lunes)
Tired the patch with a much older build  [ via SCP ]  also no problems  :D

Código: [Seleccionar]
root@OpenWrt:~# /etc/init.d/dsl_control all
Chipset:                Lantiq-VRx Unknown
Line State:             UP [0x801: showtime_tc_sync]
Attain Data Rate:       49.387 Mbps / 11.272 Mbps
Actual Data Rate:       48.712 Mbps / 11.152 Mbps
Line Attenuation:       17.9dB / 0.0dB
Noise Margin:           6.5dB / 6.2dB
Line Uptime:            3h 19m 33s

saludos cordiales
Título: Re: Ayudar con lantiq_dsl
Publicado por: kaitak en 28-05-2014, 17:37 (Miércoles)
Still no problem....
-no lock ups, panics or conflict's so far-  (gracias  Pteridium  ;D  

Other than my poor scripting skill trying to complete {tick the boxes} the template layout  for "all "  

CPE Chipset:      [✔]
CO Chipset:       [To do] [✔]
Line State:           [✔]
Attain Data Rate:   [✔]
Actual Data Rate:   [✔]
Interleave Delay:    [To do]   [✔]
Impulse Noise Prot: [To do]  [✔]
Line Attenuation:    [✔]
Signal Attenuation:   [To do] [✔]
Noise Margin:            [✔]
Transmit Power:         [✔]
Line Uptime:               [✔]
FEC Errors:             [To do]  [✔]
CRC Errors:             [To do]  [✔]
ES:                          [To do]  [✔]
SES:                        [To do]    [✔]
UAS:                        [To do]     [✔]

Added Transmit power  & Signal Attenuation

/etc/init.d/dsl_control all
Código: [Seleccionar]
root@OpenWrt:~# /etc/init.d/dsl_control all
Chipset:                Lantiq-VRx Unknown
Line State:             UP [0x801: showtime_tc_sync]
Attain Data Rate:       49.998 Mbps / 11.375 Mbps
Actual Data Rate:       49.528 Mbps / 11.320 Mbps
Line Attenuation:       17.8dB / 0.0dB
Signal Attenuation:     19.6dB / 0.0dB
Noise Margin:           6.6dB / 6.2dB
Transmit Power:         13.7dBm / 6.9dBm
Line Uptime:            7h 13m 1s

{feel free to add or point out a more elegant script for  Transmit power & Signal Attenuation }
Código: [Seleccionar]

local atpu
local atpd
local satnu
local satnd

lsg=$(dsl_cmd g997lsg 1 1)
atpu=$(dsl_val "$lsg" ACTATP)

lsg=$(dsl_cmd g997lsg 0 1)
atpd=$(dsl_val "$lsg" ACTATP)

[ -z "$satnd" ] && satnd=0
[ -z "$satnu" ] && satnu=0
[ -z "$atpu" ] && atpu=0
[ -z "$atpd" ] && atpd=0

satnd=$(dbt $satnd)
satnu=$(dbt $satnu)
atpd=$(dbt $atpd)
atpu=$(dbt $atpu)


echo "dsl.signal_attenuation_down=$satnd"
echo "dsl.signal_attenuation_up=$satnu"
echo "dsl.transmit_power_down=$atpd"
echo "dsl.transmit_power_up=$atpu"

echo "Signal Attenuation: ${satnd}dB / ${satnu}dB"
echo "Transmit Power: ${atpd}dBm / ${atpu}dBm"


The error rates are the ones giving the most trouble.  :-[

The 15min error rates might be more useful ?

 Great deal of Msan line management is based around 15mins caution Counters for profile / Interleaving setting.

saludos cordiales
Título: Re: Ayudar con lantiq_dsl
Publicado por: Pteridium en 29-05-2014, 12:21 (Jueves)
Very good job kaitak!
Now i'm busy with the ARV7519RW22 but i'll try to merge your template. Once merged i will publish it for testing.
Título: Re: Ayudar con lantiq_dsl
Publicado por: kaitak en 29-05-2014, 18:10 (Jueves)
gracias  Pteridium

No rush , I understand how busy you guys are.  The work / help is  very much  appreciated  :)
No hay prisa, entiendo lo ocupado que ustedes son. El trabajo / ayuda es muy apreciada


Filled in a few more "ticks" with  Interleave Delay / Impulse Noise P ;)
Código: [Seleccionar]
Chipset:                Lantiq-VRx Unknown
Line State:             UP [0x801: showtime_tc_sync]
Attain Data Rate:       49.998 Mbps / 11.375 Mbps
Actual Data Rate:       49.528 Mbps / 11.320 Mbps
Line Attenuation:       17.8dB / 0.0dB
Signal Attenuation:     19.6dB / 0.0dB
Noise Margin:           6.7dB / 6.1dB
Transmit Power:         13.7dBm / 6.9dBm
Interleave Delay:        1325ms/ 950ms
Impulse Noise P:        50sym / 26sym
Line Uptime:            1d 0h 3m 50s


{As always feel free to add or point out a more elegant script for Interleave Delay / Impulse Noise P }

Código: [Seleccionar]
       local uid
        local did
        local uinp
        local dinp

csg=$(dsl_cmd g997csg 0 1)
        did=$(dsl_val "$csg" ActualInterleaveDelay)
        dinp=$(dsl_val "$csg" ActualImpulseNoiseProtection)

csg=$(dsl_cmd g997csg 0 0)
        uid=$(dsl_val "$csg" ActualInterleaveDelay)
        uinp=$(dsl_val "$csg" ActualImpulseNoiseProtection)

[ -z "$uid" ] && uid=0
        [ -z "$did" ] && did=0
        [ -z "$uinp" ] && uinp=0
        [ -z "$dinp" ] && dinp=0

echo "dsl.Interleave_data_rate_down=$did"
                echo "dsl.Interleave_data_rate_up=$uid"
                echo "dsl.Internoise_data_rate_down=$dinp"
                echo "dsl.Internoise_data_rate_up=$uinp"

echo "Transmit Power: ${atpd}dBm / ${atpu}dBm"
                echo "Interleave Delay: ${did}ms/ ${uid}ms"
                echo "Impulse Noise P:        ${dinp}sym / ${uinp}sym"

saludos cordiales
Título: Re: Ayudar con lantiq_dsl
Publicado por: Pteridium en 30-05-2014, 22:11 (Viernes)
Saturday or sunday i will make a new patch with the info that you have collected.
Sorry for the delay.

Best regards.

Note: avoid using a spanish translator because they are not accurate and generate funny phrases. Example:
- Original: I understand how busy you guys are.
- Incorrect translation: entiendo lo ocupado que ustedes son.
- Correct translation: entiendo lo ocupado que ustedes están.
In spanish the to be verb means ser or estar, that have different meanings.
- I am busy: estoy ocupado.
- I am tall: soy alto.
Título: Re: Ayudar con lantiq_dsl
Publicado por: Tki2000 en 31-05-2014, 06:49 (Sábado)
Saturday or sunday i will make a new patch with the info that you have collected.
Sorry for the delay.

Best regards.

Note: avoid using a spanish translator because they are not accurate and generate funny phrases. Example:
- Original: I understand how busy you guys are.
- Incorrect translation: entiendo lo ocupado que ustedes son.
- Correct translation: entiendo lo ocupado que ustedes están.
In spanish the to be verb means ser or estar, that have different meanings.
- I am busy: estoy ocupado.
- I am tall: soy alto.

Jejejeje  ;D

Por eso le dije lo de poner las cosas por duplicado en ambos idiomas.

That's the reason I told him to double post in both languages.

Título: Re: Ayudar con lantiq_dsl
Publicado por: kaitak en 31-05-2014, 14:54 (Sábado)
Wow didn't think it would be that quick... Thanks!

Been Inducing some errors on to the line ( noisy laptop psu's work well) to see if the error commands are correct and how it reads.

CPE Chipset:      Lantiq-VRx:  5.5.1.7.1.6
CO Chipset:                 IFTN / IFTNU
Line State:                  UP [0x801: showtime_tc_sync]
Attain Data Rate:       49.998 Mbps / 11.375 Mbps
Actual Data Rate:       49.528 Mbps / 11.320 Mbps
Signal Attenuation:     19.7dB / 0.0dB
Noise Margin:             6.6dB / 6.0dB
Transmit Power:         13.7dBm / 6.9dBm
Interleave delay:       1475ms/ 0ms
Impulse Noise P:        50sym / 0sym
FEC 15m:                   13s / 1867s       {testing}  
FEC 24h:                    223597s / 8644s
CRC 15m:                   4s / 0s               {testing}
CRC 24h:                   1097s / 41s
ES 15m:                     0s / 0s                {testing}
ES 24h:                     1026s / 2s
SES 15m:                 0s / 0s                   {testing}
SES 24h:                 0s / 0s
UAS 15m:                 0s / 0s                   {testing}
UAS 24h:                 257s / 257s                    
Line Uptime:              2h 57m 17s


15mins error rates are not part of the original template just placed in for testing


Thank you  Pteridium for taking the time with this!

Translators   ;D
Best regards
Título: Re: Ayudar con lantiq_dsl
Publicado por: Pteridium en 02-06-2014, 22:49 (Lunes)
Another draft (http://www.mediafire.com/download/fhw8jwudwpbe15f/ltq_dsl.tar.bz2) for testing.
Maybe it needs some retouches ...  ^-^
Título: Re: Ayudar con lantiq_dsl
Publicado por: kaitak en 03-06-2014, 00:15 (Martes)
Thanks Pteridium !

Will start testing  ;D
Título: Re: Ayudar con lantiq_dsl
Publicado por: kaitak en 05-06-2014, 00:06 (Jueves)
Quick update to say it working - no problems so far.

Adding the error's might need a bit more  time / fine fine tuning as there somewhat troublesome.

Best regards
Título: Re: Ayudar con lantiq_dsl
Publicado por: int0x13 en 17-03-2015, 16:45 (Martes)
Another draft (http://www.mediafire.com/download/fhw8jwudwpbe15f/ltq_dsl.tar.bz2) for testing.
Maybe it needs some retouches ...  ^-^
Hello, where can i find the file you're talking about?
Título: Re: Ayudar con lantiq_dsl
Publicado por: Pteridium en 17-03-2015, 20:36 (Martes)
Another draft (http://www.mediafire.com/download/fhw8jwudwpbe15f/ltq_dsl.tar.bz2) for testing.
Maybe it needs some retouches ...  ^-^
Hello, where can i find the file you're talking about?
Here:
http://www.mediafire.com/download/fhw8jwudwpbe15f/ltq_dsl.tar.bz2
Título: Re: Ayudar con lantiq_dsl
Publicado por: int0x13 en 17-03-2015, 21:40 (Martes)
Another draft (http://www.mediafire.com/download/fhw8jwudwpbe15f/ltq_dsl.tar.bz2) for testing.
Maybe it needs some retouches ...  ^-^
Hello, where can i find the file you're talking about?
Here:
http://www.mediafire.com/download/fhw8jwudwpbe15f/ltq_dsl.tar.bz2
Thank you, i will test it on my Tp-Link TD-W8970 flashed with openwrt.
Why there was no link before? The link was removed?
I'm working on trying to force SNR but so far it's not working. I'm also working on a project to change interleave delay so i can have less ping! Do you have any idead about those projects?
Título: Re: Ayudar con lantiq_dsl
Publicado por: Pteridium en 17-03-2015, 23:53 (Martes)
Another draft (http://www.mediafire.com/download/fhw8jwudwpbe15f/ltq_dsl.tar.bz2) for testing.
Maybe it needs some retouches ...  ^-^
Hello, where can i find the file you're talking about?
Here:
http://www.mediafire.com/download/fhw8jwudwpbe15f/ltq_dsl.tar.bz2
Thank you, i will test it on my Tp-Link TD-W8970 flashed with openwrt.
Why there was no link before? The link was removed?
I'm working on trying to force SNR but so far it's not working. I'm also working on a project to change interleave delay so i can have less ping! Do you have any idead about those projects?
The link was in the post; clicking on "draft" redirects to mediafire.

No idea about any project to tune the xDSL in the Lantiq SoCs.  :'(
Título: Re: Ayudar con lantiq_dsl
Publicado por: int0x13 en 18-03-2015, 02:22 (Miércoles)
Another draft (http://www.mediafire.com/download/fhw8jwudwpbe15f/ltq_dsl.tar.bz2) for testing.
Maybe it needs some retouches ...  ^-^
Hello, where can i find the file you're talking about?
Here:
http://www.mediafire.com/download/fhw8jwudwpbe15f/ltq_dsl.tar.bz2
Thank you, i will test it on my Tp-Link TD-W8970 flashed with openwrt.
Why there was no link before? The link was removed?
I'm working on trying to force SNR but so far it's not working. I'm also working on a project to change interleave delay so i can have less ping! Do you have any idead about those projects?
The link was in the post; clicking on "draft" redirects to mediafire.

No idea about any project to tune the xDSL in the Lantiq SoCs.  :'(
My bad i didnt see there was a link! This link color is really not clear, it's light blue!
Anyway about tuning DSL, did you try to increase bandwidth by decreasing SNR?
Following this:
https://forum.openwrt.org/viewtopic.php?pid=222065
I tried many times, and i still have 5db of SNR, can you try and tell if it works for you?
I'm very disapointed about the speed perf of my Lantiq chipset so far, it's REALLY slow compared to broadcom. I talk about sync speeds. Something like 200kbytes/s less than broadcom 6348 6358.
Título: Re: Ayudar con lantiq_dsl
Publicado por: Pteridium en 19-03-2015, 15:59 (Jueves)
My bad i didnt see there was a link! This link color is really not clear, it's light blue!
Anyway about tuning DSL, did you try to increase bandwidth by decreasing SNR?
Following this:
https://forum.openwrt.org/viewtopic.php?pid=222065
I tried many times, and i still have 5db of SNR, can you try and tell if it works for you?
I'm very disapointed about the speed perf of my Lantiq chipset so far, it's REALLY slow compared to broadcom. I talk about sync speeds. Something like 200kbytes/s less than broadcom 6348 6358.
I don't use Lantiq based routers as modem-routers because they loose 300Kb/s compared with bcm6328 and 500Kb/s compared with TI AR7 (actually I have 3500Kb/s of download rate with a Zyxel P660HW-D1).
Is the ping lower compared with the bcm63xx? If yes, despite the speed loosed, some programs, games and webs should work better.
Título: Re: Ayudar con lantiq_dsl
Publicado por: int0x13 en 20-03-2015, 19:20 (Viernes)
My bad i didnt see there was a link! This link color is really not clear, it's light blue!
Anyway about tuning DSL, did you try to increase bandwidth by decreasing SNR?
Following this:
https://forum.openwrt.org/viewtopic.php?pid=222065
I tried many times, and i still have 5db of SNR, can you try and tell if it works for you?
I'm very disapointed about the speed perf of my Lantiq chipset so far, it's REALLY slow compared to broadcom. I talk about sync speeds. Something like 200kbytes/s less than broadcom 6348 6358.
I don't use Lantiq based routers as modem-routers because they loose 300Kb/s compared with bcm6328 and 500Kb/s compared with TI AR7 (actually I have 3500Kb/s of download rate with a Zyxel P660HW-D1).
Is the ping lower compared with the bcm63xx? If yes, despite the speed loosed, some programs, games and webs should work better.

The ping is the same. I didnt know TI AR7 has better speed than BCM. I've decided to invest time into Lantiq because somebody said to me it's free and we can do everything. But i find it's so much bulshit. It's free but nobody use it so nobody knows how to tweak it. I still have no clue how to change interleaving delay and most important how to increase target SNR.
Título: Re: Ayudar con lantiq_dsl
Publicado por: Pteridium en 21-03-2015, 10:18 (Sábado)
My bad i didnt see there was a link! This link color is really not clear, it's light blue!
Anyway about tuning DSL, did you try to increase bandwidth by decreasing SNR?
Following this:
https://forum.openwrt.org/viewtopic.php?pid=222065
I tried many times, and i still have 5db of SNR, can you try and tell if it works for you?
I'm very disapointed about the speed perf of my Lantiq chipset so far, it's REALLY slow compared to broadcom. I talk about sync speeds. Something like 200kbytes/s less than broadcom 6348 6358.
I don't use Lantiq based routers as modem-routers because they loose 300Kb/s compared with bcm6328 and 500Kb/s compared with TI AR7 (actually I have 3500Kb/s of download rate with a Zyxel P660HW-D1).
Is the ping lower compared with the bcm63xx? If yes, despite the speed loosed, some programs, games and webs should work better.

The ping is the same. I didnt know TI AR7 has better speed than BCM. I've decided to invest time into Lantiq because somebody said to me it's free and we can do everything. But i find it's so much bulshit. It's free but nobody use it so nobody knows how to tweak it. I still have no clue how to change interleaving delay and most important how to increase target SNR.
In my case the AR7 (http://wiki.openwrt.org/doc/hardware/soc/soc.lantiq) is the best in terms of adsl speed, followed by broadcom, and the worst I've tested is the Realtek RTL8672. Lantiq is in the middle (with stock firmware or OpenWRT), but i have no problems of connection stability with Danube or VRX200 so if you are looking for something that does not give problems the TD-W8970 should achieve that goal.
Said this, OpenWRT is designed for routers, and only TI AR7 and Lantiq have modem support on it, so is not strange that the xDSL support and tweaking is far from being good, but at least, you can have only one device to manage dsl and advanced routing.
Note: is this and other forums some people commented that the dsl connectivity with Lantiq based routers is very good for them, while others can't even make them synchronize with their ISPs so they need additional equipment.