Kitz Forum

Broadband Related => ADSL Issues => Topic started by: beanieboy182 on July 29, 2012, 09:46:34 PM

Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: beanieboy182 on July 29, 2012, 09:46:34 PM
hey guys i stumbled onto this thread and wanted to ask the guys in the know about my line and what do you think about my line and ways to improve the graphs im about to show you
I can see in my bit loading and snr by tone graph that around the 480 there are a lot of spots missing and their there even when i reboot + the other 2 big ones worry me
so could someone shed some light if these are due to me and i can somehow make them better or anything like that
thanks a lot for the time if anyone replies :) <3
+ im obviously trying to get what i pay for and im on sky broadband (up to) 20meg unlimited and DLM is currently running on my line again as i asked for it just because i put a faceplate in on master socket and sorted out all my telephone wirering after years of getting around 6 meg and having drop outs lol
my line is very stable and i have had it up to around 16.5meg and stable for weeks but wanted to see if i could try something to sort it thats why im here :)
as i know little to nothing about quiet line noise and how to fix it im in your helpful hands!
kev

my line stats are:
(the retrain was my fault)

/usr/sbin/adslctl: ADSL driver and PHY status
Status: ShowtimeRetrain Reason:   1
Channel: FAST, Upstream rate = 896 Kbps, Downstream rate = 13475 Kbps
Link Power State: L0
Mode:         ADSL2+
Channel:      Fast
Trellis:      U:ON /D:ON
Line Status:      No Defect
Training Status:   Showtime
      Down      Up
SNR (dB):   6.6      7.5
Attn(dB):   29.0      15.5
Pwr(dBm):   1.6      10.6
Max(Kbps):   16000      1056
Rate (Kbps):   13475      896
         G.dmt framing
K:      211(0)      29
R:      16      16
S:      1      4
D:      64      8
         ADSL2 framing
MSGc:      59      66
B:      210      28
M:      1      4
T:      2      1
R:      16      16
S:      0.4998      4.0000
L:      3633      264
D:      64      8
         Counters
SF:      1442309      1301750
SFErr:      158      49
RS:      187500206      1956668
RSCorr:      1207027      70
RSUnCorr:   6518      0

HEC:      139      108
OCD:      18      0
LCD:      0      0
Total Cells:   744677860      60188459
Data Cells:   63901690      9029152
Drop Cells:   1854
Bit Errors:   0      0

ES:      950      19
SES:      3      0
UAS:      145      55
AS:      23432

INP:      1.12      1.93
PER:      16.24      18.00
delay:      7.99      8.00
OR:      32.00      32.00

Bitswap:   4740      478

Total time = 1 days 1 min 45 sec
SF  = 31929841
CRC = 3410
LOS = 3
LOF = 27
ES  = 950
Latest 1 day time = 1 min 45 sec
SF  = 6483
CRC = 0
LOS = 0
LOF = 0
ES  = 0
Latest 15 minutes time = 1 min 45 sec
SF  = 6483
CRC = 0
LOS = 0
LOF = 0
ES  = 0
Previous 15 minutes time = 15 min 0 sec
SF  = 55381
CRC = 4
LOS = 0
LOF = 0
ES  = 2
Previous 1 day time = 24 hours 0 sec
SF  = 5317104
CRC = 218
LOS = 0
LOF = 0
ES  = 119
15 minutes interval [-30 min to -15 min] time = 15 min 0 sec
SF  = 55381
CRC = 0
LOS = 0
LOF = 0
ES  = 0
15 minutes interval [-45 min to -30 min] time = 15 min 0 sec
SF  = 55380
CRC = 5
LOS = 0
LOF = 0
ES  = 2
15 minutes interval [-60 min to -45 min] time = 15 min 0 sec
SF  = 55443
CRC = 7
LOS = 0
LOF = 0
ES  = 3
Showtime Drop Reason:   1
Last Retrain Reason:   1
Title: Re: Re: ADSL2+ Tones & Bitloading Problem
Post by: beanieboy182 on August 02, 2012, 07:03:52 PM
no one :(
Title: Re: Re: ADSL2+ Tones & Bitloading Problem
Post by: burakkucat on August 02, 2012, 07:54:39 PM
no one :(

 ^-^  Oh dear. A sad face. I think I know what has happened -- your post, being tucked away in a pre-existing thread has been overlooked by those who could help you. My evening meal is almost ready to eat, so I'll just make a couple of quick comments --

If your line is stable, why have you asked for the DLM to be restarted on it? It makes sense (at least to me) to have any DLM turned off.

As for gaps in the bit-loading, it could well be due to Broadcast radio transmitters in your region. Perhaps Asbokid will be able to correlate that gaps with known transmitters and perform geolocation of your approximate area.

 :)
Title: Re: Re: ADSL2+ Tones & Bitloading Problem
Post by: kitz on August 02, 2012, 08:54:48 PM
Hi beanie boy and welcome :)

I'll split your posts out of this thread and move them over to the adsl section where hopefully it will be easier to see and someone may be able to come up with a suggestion as to what could be causing those gaps.
Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: asbokid on August 02, 2012, 09:34:27 PM
Hello BeanieBoy,

Welcome to Kitz  :)

Quote
my line is very stable and i have had it up to around 16.5meg and stable for weeks but wanted to see if i could try something to sort it thats why im here :)

Glad to hear your line is stable.  You might be able to squeeze a few extra Mbps by lowering the target SNR. You've got 6.6dB to play with.  You could probably halve that with a decent transceiver in the modem, at the cost of some additional errors.  It really depends on your goals. Is speed more important than stability?

As Burakkucat has already mentioned, those major troughs in the Bit Loading graph are caused noise from AM broadcast radio ingress.   Not a lot you can do about that, unless you fancy shielding your subscriber line all the way back to the cabinet or to the exchange  :o

The notches higher up in the ADSL2+ spectrum cannot be AM (MW) broadcast though, since the frequencies are too high.  So discovering the cause might be worthwhile

Nevertheless, it's an impressive performance you've got there.   What sort of distance are you from the exchange?

Maybe give Paul's (Bald_Eagle) scripts a whirl. They are very precise.  If you want to PM or email the raw data that have gathered, I enjoy studying RF ingress  ::)

On that vein, if anyone wants to collaborate on a project to programmatically analyse QLN data for RF ingress then please say hello. There are a few ideas bouncing around in my otherwise empty head  :D

cheers, a
Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: beanieboy182 on August 03, 2012, 07:53:06 PM
awh great to have a responce and thanks for moving the post :D
i have now double filtered my whole telephone line from the bt line that comes directly into my house and the sky dg834gt plugs directly into it via the first filter
i got my stats up a bit and using a SNR of about 3.9 ish to 1.5
ill post some new screen shots and such
i am less than a mile from the green box and the exchange is around about a mile and a half away im guessing by googling exchanges and finding my closest one
i have also double filtered which actually is quadruple filtering a Dect phone i have and all my other phones (2 sockets) are 1 filter setups on each
line is super stable and have never had a drop out to be fair even when ive been running SNR down to 3.5 ish

(settings)

/usr/sbin/adslctl: ADSL driver and PHY status
Status: ShowtimeRetrain Reason:   8000
Channel: FAST, Upstream rate = 916 Kbps, Downstream rate = 15113 Kbps
Link Power State: L0
Mode:         ADSL2+
Channel:      Fast
Trellis:      U:ON /D:ON
Line Status:      No Defect
Training Status:   Showtime
      Down      Up
SNR (dB):   3.8      8.5
Attn(dB):   29.0      15.4
Pwr(dBm):   0.0      10.6
Max(Kbps):   17756      1080
Rate (Kbps):   15113      916
         G.dmt framing
K:      236(0)      29
R:      16      16
S:      1      4
D:      64      8
         ADSL2 framing
MSGc:      59      66
B:      235      28
M:      1      4
T:      2      1
R:      16      16
S:      0.4986      3.9111
L:      4043      270
D:      64      8
         Counters
SF:      59415      56682
SFErr:      1      1
RS:      7723986      984804
RSCorr:      284791      0
RSUnCorr:   76      0

HEC:      1      0
OCD:      0      0
LCD:      0      0
Total Cells:   34345892      2230694
Data Cells:   44567      13824
Drop Cells:   0
Bit Errors:   0      0

ES:      410      1
SES:      28      9
UAS:      47      1935
AS:      963

INP:      1.01      1.89
PER:      16.20      17.60
delay:      7.97      7.82
OR:      32.08      32.72

Bitswap:   206      25

Total time = 7 hours 36 min 49 sec
SF  = 1689221
CRC = 1954
LOS = 0
LOF = 0
ES  = 410
Latest 1 day time = 7 hours 36 min 49 sec
SF  = 1689221
CRC = 1954
LOS = 0
LOF = 0
ES  = 410
Latest 15 minutes time = 6 min 49 sec
SF  = 25252
CRC = 1
LOS = 0
LOF = 0
ES  = 1
Previous 15 minutes time = 15 min 0 sec
SF  = 53868
CRC = 113
LOS = 0
LOF = 0
ES  = 21
Previous 1 day time = 0 sec
SF  = 0
CRC = 0
LOS = 0
LOF = 0
ES  = 0
15 minutes interval [-30 min to -15 min] time = 15 min 0 sec
SF  = 55583
CRC = 22
LOS = 0
LOF = 0
ES  = 12
15 minutes interval [-45 min to -30 min] time = 15 min 0 sec
SF  = 55645
CRC = 18
LOS = 0
LOF = 0
ES  = 12
15 minutes interval [-60 min to -45 min] time = 15 min 0 sec
SF  = 55520
CRC = 29
LOS = 0
LOF = 0
ES  = 16
Showtime Drop Reason:   8000
Last Retrain Reason:   8000

dunno what the last retrain reason was but it reset my router which stopped my manual SNR adjustment...weird
Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: beanieboy182 on August 03, 2012, 07:55:10 PM
sorry also DLM is now off it only ran for 10 days and now apparently my line is set to 1.4mb/s
or i presume onces its complete it turns off again ?
does DLM stay on always ?
could be a problem lol
Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: burakkucat on August 03, 2012, 08:05:49 PM
sorry also DLM is now off it only ran for 10 days and now apparently my line is set to 1.4mb/s
or i presume onces its complete it turns off again ?
does DLM stay on always ?
could be a problem lol

The Dynamic Line Management software package is something that certain ISPs / CPs are willing (or able) to turn off upon request from their customer. I am unaware of any configuration where it is turned on or off automatically. As far as I know, manual intervention is required to toggle it from one state to the other.
Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: beanieboy182 on August 03, 2012, 08:48:21 PM
ah thats great to know
i will defo ring up and get them to turn it off
they put DLM on my line so that it can adjust my speed because i sorted out all my telephone wirering and before it sucked :)
i just presumed it turned off after the 10 days as it says it will fluctuate for 10 days and then came back with a line setup of 1.4mbs or around that
Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: burakkucat on August 03, 2012, 09:59:59 PM
I wonder if your ISP / CP just reset your line into "training mode", as if it was a newly provisioned service. That would fit with your comments about a ten day training period, etc.  ;)
Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: beanieboy182 on August 03, 2012, 10:15:43 PM
ah maybe ur right then :D
good to know someone out there is using their brain power! lol
thanks mate!
i wonder how im gonna sort out the ADSL2+ stuff to improve my speeds or line hmmz
Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: beanieboy182 on August 04, 2012, 12:53:03 AM
update
line has been on for a while now
/usr/sbin/adslctl: ADSL driver and PHY status
Status: ShowtimeRetrain Reason:   8000
Channel: FAST, Upstream rate = 916 Kbps, Downstream rate = 15113 Kbps
Link Power State: L0
Mode:         ADSL2+
Channel:      Fast
Trellis:      U:ON /D:ON
Line Status:      No Defect
Training Status:   Showtime
      Down      Up
SNR (dB):   3.9      8.0
Attn(dB):   29.0      15.4
Pwr(dBm):   0.0      10.6
Max(Kbps):   17844      1080
Rate (Kbps):   15113      916
         G.dmt framing
K:      236(0)      29
R:      16      16
S:      1      4
D:      64      8
         ADSL2 framing
MSGc:      59      66
B:      235      28
M:      1      4
T:      2      1
R:      16      16
S:      0.4986      3.9111
L:      4043      270
D:      64      8
         Counters
SF:      1175070      1120196
SFErr:      148      7
RS:      152759216      2282419
RSCorr:      4205709      7
RSUnCorr:   8475      0

HEC:      144      9
OCD:      14      0
LCD:      0      0
Total Cells:   678724606      49735981
Data Cells:   9988263      3379366
Drop Cells:   0
Bit Errors:   0      0

ES:      478      3
SES:      28      9
UAS:      47      1935
AS:      19043

INP:      1.01      1.89
PER:      16.20      17.60
delay:      7.97      7.82
OR:      32.08      32.72

Bitswap:   4128      433

Total time = 12 hours 38 min 9 sec
SF  = 2804876
CRC = 2101
LOS = 0
LOF = 0
ES  = 478
Latest 1 day time = 12 hours 38 min 9 sec
SF  = 2804876
CRC = 2101
LOS = 0
LOF = 0
ES  = 478
Latest 15 minutes time = 8 min 9 sec
SF  = 30203
CRC = 2
LOS = 0
LOF = 0
ES  = 1
Previous 15 minutes time = 15 min 0 sec
SF  = 55578
CRC = 7
LOS = 0
LOF = 0
ES  = 3
Previous 1 day time = 0 sec
SF  = 0
CRC = 0
LOS = 0
LOF = 0
ES  = 0
15 minutes interval [-30 min to -15 min] time = 15 min 0 sec
SF  = 55455
CRC = 11
LOS = 0
LOF = 0
ES  = 5
15 minutes interval [-45 min to -30 min] time = 15 min 0 sec
SF  = 55578
CRC = 15
LOS = 0
LOF = 0
ES  = 7
15 minutes interval [-60 min to -45 min] time = 15 min 0 sec
SF  = 55517
CRC = 9
LOS = 0
LOF = 0
ES  = 4
Showtime Drop Reason:   8000
Last Retrain Reason:   8000

Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: burakkucat on August 04, 2012, 03:22:47 AM
Quote
SNR (dB):   3.9      8.0
Attn(dB):   29.0      15.4
Pwr(dBm):   0.0      10.6
Max(Kbps):   17844      1080
Rate (Kbps):   15113      916

Looking at the above, I'd say that you are probably getting the most throughput that you can for that sync speed.
Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: beanieboy182 on August 04, 2012, 05:46:40 PM
darn :P thought i could push it a bit more
oh well not too shabby
this time last year was getting around 6meg haha
double filtered phone side of things and so cant do much more :(
Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: beanieboy182 on August 04, 2012, 09:33:46 PM
The notches higher up in the ADSL2+ spectrum cannot be AM (MW) broadcast though, since the frequencies are too high.  So discovering the cause might be worthwhile

im wondering if you could help me work on that a bit :S
or give me any ideas to try ? or advice ?
sorry for the asking for help kinda deal but i really appreciate any info you guys give me!

thanks in advance to anyone who has helped or does

kevin
Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: asbokid on August 04, 2012, 09:57:27 PM
The raw QLN data from the modem is needed. Presumably this is a Broadcom-chipset modem?  Then calculate the frequencies of those noise spikes, by multiplying each subcarrier index where noise is measured by 4.3125kHz, the channel spacing for xDSL in Europe.

So the precision is at best to the nearest 4.3125kHz. Then try and correlate those frequences to likely sources.  Also, you might want to study the periodicity of the spikes (the frequency gap between each noise spike) since that can identify a noisy switched-mode PSU as the cause - a common cause.

cheers, a
Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: beanieboy182 on August 04, 2012, 10:33:36 PM
The raw QLN data from the modem is needed. Presumably this is a Broadcom-chipset modem?  Then calculate the frequencies of those noise spikes, by multiplying each subcarrier index where noise is measured by 4.3125kHz, the channel spacing for xDSL in Europe.

So the precision is at best to the nearest 4.3125kHz. Then try and correlate those frequences to likely sources.  Also, you might want to study the periodicity of the spikes (the frequency gap between each noise spike) since that can identify a noisy switched-mode PSU as the cause - a common cause.

cheers, a

good lord i read that was was a little  ??? haha :D
if a switched mode psu could be the cause is there anyway to test this ? by unplugging devices and seeing if the quiet line noise graph gets better or worse after a retrain ?
as to calculate the frequency i would have little to no way or know how to do it :S
sounds very complicated lol

also would wrapping a ferrit core around the power cable of the router and any devices around the house make a difference ?

sorry i know its really hard giving help to someone as noobish as me on the whole frequency side of things :S
i know little about it
Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: asbokid on August 05, 2012, 12:34:06 AM
if a switched mode psu could be the cause is there anyway to test this ? by unplugging devices and seeing if the quiet line noise graph gets better or worse after a retrain ?
as to calculate the frequency i would have little to no way or know how to do it :S
sounds very complicated lol

It's really easy. Bald_Eagle's scripts for Windows are the way to go.   They will download the raw data from the modem (which modem is it?). That allows the QLN dataset to be studied in detail, to find the noise peaks in the ADSL tone map.

Quote
also would wrapping a ferrit core around the power cable of the router and any devices around the house make a difference ?

sorry i know its really hard giving help to someone as noobish as me on the whole frequency side of things :S
i know little about it

First I would use Paul's scripts to identify the tone indices where the noise is occurring. Calculate the frequencies of that noise from those indices, and then study what might be causing the noise.

cheers, a
Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: beanieboy182 on August 05, 2012, 10:21:44 AM
great im gonna get that bald eagle script running now :)
will post back soon
kevin
Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: beanieboy182 on August 05, 2012, 11:08:01 AM
also its a netgear dg834gt :)
Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: beanieboy182 on August 05, 2012, 11:43:09 AM

It's really easy. Bald_Eagle's scripts for Windows are the way to go.   They will download the raw data from the modem (which modem is it?). That allows the QLN dataset to be studied in detail, to find the noise peaks in the ADSL tone map.

ok this may sound dumb but how and where do i find it ?
or how do i use it ?
so confused lol
Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: asbokid on August 05, 2012, 01:00:39 PM
Sorry beanie, I can't see the ADSL scripts at the moment.  Paul converted them from his VDSL2 scripts, but not sure where he's put them.  I thought they were in that Zoom modem thread, but can't see them now.  Anyone know where they are?  Where is Paul, any way?

cheers, a

Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: beanieboy182 on August 05, 2012, 01:19:35 PM
Sorry beanie, I can't see the ADSL scripts at the moment.  Paul converted them from his VDSL2 scripts, but not sure where he's put them.  I thought they were in that Zoom modem thread, but can't see them now.  Anyone know where they are?  Where is Paul, any way?

cheers, a

do you have any idea what the telnet username and password is ? is it the same as the login to the web interface ?
ive tried to telnet before but it always says wrong username and password
hmmmz
im using a netgear dg834gt with the netgear firmware of 1.04.13 (the newest)
Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: asbokid on August 05, 2012, 01:35:01 PM
Not sure about that particular device.  Though the DgStats tool must have both the telnet username and password stored in its configuration, to be able to access that line data.

cheers, a
Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: beanieboy182 on August 05, 2012, 02:13:11 PM
ive tried the ADSL_Stats and changed login2 to my password and edited all the scripts so that its 192.168.2.1 not 0.1 but still errors :(
Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: rhohne on August 05, 2012, 03:11:25 PM
Hi beanie
What errors are you getting?

The edits to GET CURRENT STATS.BAT are minimal

If not installed to default location then edit LOGIN_FOLDER,PATH and MAIN_FOLDER variables.
Edit 4x wget commands for correct user,password and IP address
Edit plink command for correct IP address

Edit LOGIN1.TXT and LOGIN2.TXT maintaining the line endings, otherwise login may fail

Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: burakkucat on August 05, 2012, 04:02:06 PM
Sorry beanie, I can't see the ADSL scripts at the moment.  Paul converted them from his VDSL2 scripts, but not sure where he's put them.  I thought they were in that Zoom modem thread, but can't see them now.  Anyone know where they are?  Where is Paul, any way?

As far as I can deduce, it is that time of the year when No-Feathers McGraw takes Mrs Eagle on their annual holiday . . .
Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: beanieboy182 on August 05, 2012, 04:19:38 PM
errors now are around 53 for a up time of 3 hours ?
also i was just wondering as someone said the errors in the Bit Loading & SNR by Tone from 450 - 480 there are 2 holes which can not be AM (MW) broadcasts so working out what they are could be benificial
Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: rhohne on August 05, 2012, 04:39:55 PM
For those who haven't found the ADSL scripts they are here (http://forum.kitz.co.uk/index.php/topic,11216.0.html)

Latest released version is v1.4 incorporating v3.2 of the graphing scripts. This version is biased towards the ZOOM and needs a few minor tweaks for netgear stats collection

I'm using a modified version on a DG834GT with DGTEAM firmware. Hopefully when beanie gets it working we'll be seeing graphs similar to the attached, less the laptop PSU interference.
Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: beanieboy182 on August 05, 2012, 05:08:38 PM
ok here this is how i edited it

my routers ip address is
192.168.2.1

user admin
password password

here is the script
which still doesnt create any pictures well it does but they hold no data in them

rem ##########################################################################
rem #                                                                        #
rem #  This batch file automatically logs in to the Plink Terminal's shell,  #
rem #  then issues the commands:-                                            #
rem #                                                                        #
rem #  adslctl info --Bits                                                   #
rem #  adslctl info --linediag                                               #
rem #  adslctl info --stats                                                  #
rem #                                                                        #
rem #  Then it exits the Plink terminal & stores the data file               #
rem #  "Plink_FILEDATE.log" in the default subfolder:-                       #
rem #                                                                        #
rem #  C:\ADSL_Stats\Current_Stats_%FILEDATE%                                #
rem #  where FILEDATE is in the format YYYYMMDD-HHMM                         #
rem #                                                                        #
rem #  It then goes on to generate the graphs by calling ADSLGRAPH.BAT       #
rem #                                                                        #
rem ##########################################################################



@echo off

cls

SET VERSION=3.2

rem ********** Set the LOGIN folder **********
SET LOGIN_FOLDER=C:\ADSL_Stats\Apps


SET OLD_PATH=%PATH%


PATH=C:\ADSL_Stats\Scripts;C:\ADSL_Stats\Apps;%PATH%


rem ********************************************************************


echo.
echo.

echo Gathering statistics from the modem
echo.
echo.
echo Please wait a few seconds.........................
echo.


rem ************ Set the date to the same format as in PuTTy.log ***************

set LOGDATE=%date:~6,4%.%date:~3,2%.%date:~0,2%

set t=%time%

if "%t:~0,1%"==" " (
   set t=0%t:~1,7%

) else (
   set t=%t:~0,8%

)


set LOGTIME=%t%
echo.

echo LOGDATE =%LOGDATE%
echo LOGTIME =%LOGTIME%
echo.


rem ********** Set the date format for data storage purposes **********

set FILEDATE=%date:~6,4%%date:~3,2%%date:~0,2%

rem set t=%time%


IF "%time:~0,1%" LSS "1" (
   set t=0%time:~1,1%%time:~3,2%

) else (
   set t=%time:~0,2%%time:~3,2%

)


set FILEDATE=%FILEDATE%-%t%
echo FILEDATE =%FILEDATE%
echo.



rem ********** Set the main folder for storage of the log & graphs **********
rem ********** If it doesn't already exist, create it              **********

set MAIN_FOLDER=C:\ADSL_Stats

echo MAIN_FOLDER =%MAIN_FOLDER%


rem ********** Check for the MAIN_FOLDER's existence **********

if not exist %MAIN_FOLDER% (

   echo.
   echo %MAIN_FOLDER does not exist, so creating it
   md %MAIN_FOLDER%
   echo.

) else (
   
   echo.
   echo %MAIN_FOLDER% DOES exist
   echo.
  )   




rem ********** Create a subfolder of the the main folder in which to store the log & graphs **********

rem ********** Set the name

set SUBFOLDER=%MAIN_FOLDER%\Current_Stats\Current_Stats_%FILEDATE%

echo SUBFOLDER = %SUBFOLDER%

if not exist %SUBFOLDER% (

   echo.
   echo SUBFOLDER does not exist, so creating it
   md %SUBFOLDER%
   echo.

) else (
   
   echo.
   echo %SUBFOLDER% DOES exist
   echo.
  )   



echo =~=~=~=~=~=~=~=~=~=~=~= Plink log %LOGDATE% %LOGTIME% =~=~=~=~=~=~=~=~=~=~=~=





rem ********** Set the log file name **********
set LOGFILENAME=\Plink_%FILEDATE%.log

echo =~=~=~=~=~=~=~=~=~=~=~= Plink log %LOGDATE% %LOGTIME% =~=~=~=~=~=~=~=~=~=~=~= > %SUBFOLDER%%LOGFILENAME%
echo. >> %SUBFOLDER%%LOGFILENAME%



rem ***** Quietly enable Telnet access                *****
rem ***** Seems to need running twice to ensure login *****

wget -q httP://admin:password@192.168.2.1/setup.cgi?todo=debug
wget -q httP://admin:password@192.168.2.1/setup.cgi?todo=debug



rem ***** This one does USE LOGIN FILES *****
(echo *1>CON & sleep 1^
 & type %LOGIN_FOLDER%\LOGIN1.TXT & echo **2>CON & sleep 1^
 & type %LOGIN_FOLDER%\LOGIN2.TXT & echo ***3>CON & sleep 1^
 & echo adsl info --Bits & echo ****4>CON^
 & sleep 1 & echo adsl info --linediag & echo *****5>CON & sleep 2^
 & echo adsl info --stats & echo ******6>CON & sleep 1 & echo exit & echo *******7>CON & sleep 1^
 & echo ********8>CON  & sleep 2 & echo *********9>CON ) ^| Plink -telnet -P 23 192.168.2.1 >> %SUBFOLDER%%LOGFILENAME%



rem ***** Quietly Logout of Telnet access                *****
rem ***** THis is also run twice to ensure logout        *****

wget -q httP://admin:password@192.168.2.1/setup.cgi?todo=logout
wget -q httP://admin:password@192.168.2.1/setup.cgi?todo=logout



rem ***** remove any of the enabling and disabling output files

del setup.cgi*.*


echo.
echo All done!
echo.
echo.

echo  ****************************************************************************



rem ***** Remove "rem" from the next 2 lines if only wanting to generate the log (i.e. do not generate the graphs) *****
rem pause
rem exit



rem ********** change directory to the Subfolder **********
pushd %SUBFOLDER%





rem ****** Actually graph the obtained stats ************
call ADSLGRAPH %SUBFOLDER%%LOGFILENAME%

rem pause
rem exit


Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: beanieboy182 on August 05, 2012, 05:10:24 PM
this is from the cmd prompt

 %1 = C:\ADSL_Stats\Current_Stats\Current_Stats_20120805-1709\Plink_20120805-170
9.log

 ****************************************************************************

  Creating ADSL Connection Statistics Graphs - Version 3.2

  Using Data from:-

  C:\ADSL_Stats\Current_Stats\Current_Stats_20120805-1709\Plink_20120805-1709.lo
g

  Data obtained 05/08/12 17:09

 ****************************************************************************

 ************************************************************************
 * The ADSL Mode could not be determined from "adslctl info --stats" *
 * The data is either not present, or is unreadable                     *
 ************************************************************************

 Defaulting to produce graphs scaled for G.DMT Mode (256 Tones)


 The ADSL MODE was determined to be G.DMT


 Creating Bits-20120805-1709.png

multiplot> plot 'Bits.txt' using 1:($1>0 && $1<32 ? $2 : 1/0) w boxes lc 14 fs s
olid
                                                                               ^

           line 0: warning: Skipping data file with no valid points

multiplot> plot 'Bits.txt' using 1:($1>31 && $1<515 ? $2 : 1/0) w boxes lc 1 fs
solid

^
           line 0: warning: Skipping data file with no valid points
 Creating  SNR-20120805-1709.jpg

gnuplot> plot 'SNR.txt' w boxes fs solid
                                   ^
         line 0: warning: Skipping data file with no valid points
 Creating  QLN-20120805-1709.jpg

gnuplot> plot 'QLN.txt' w lines
                          ^
         line 0: warning: Skipping data file with no valid points
 Creating  Hlog-20120805-1709.jpg

gnuplot> plot 'Hlog.txt' w lines
                           ^
         line 0: warning: Skipping data file with no valid points
convert.exe: missing an image filename `stats-20120805-1709.jpg' @ error/convert
.c/ConvertImageCommand/3016.
convert.exe: missing an image filename `Counters-20120805-1709.jpg' @ error/conv
ert.c/ConvertImageCommand/3016.

 Creating Montage of:-
 Bits-20120805-1709.png
  SNR-20120805-1709.png
  QLN-20120805-1709.png
 Hlog-20120805-1709.png
montage.exe: unable to open image `stats-20120805-1709.jpg': No such file or dir
ectory @ error/blob.c/OpenBlob/2589.
montage.exe: unable to open image `Counters-20120805-1709.jpg': No such file or
directory @ error/blob.c/OpenBlob/2589.
montage.exe: unable to open image `stats-20120805-1709.jpg': No such file or dir
ectory @ error/blob.c/OpenBlob/2589.
montage.exe: unable to open image `Counters-20120805-1709.jpg': No such file or
directory @ error/blob.c/OpenBlob/2589.


Press any key to continue . . .
Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: beanieboy182 on August 05, 2012, 05:18:07 PM
im thinking about reloading the dgteam firmware but my router auto upgraded to 1.04 can i downgrade to 1.03 i think the latest dgteam firmware is 1.03 something
but wont that auto upgrade ?
GAH why will this script not work  >:(
Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: rhohne on August 05, 2012, 05:20:43 PM
Please could you attach a copy of Plink_20120805-1709.log after removing any sensitive information.
Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: beanieboy182 on August 05, 2012, 05:25:35 PM
=~=~=~=~=~=~=~=~=~=~=~= Plink log 2012.08.05 17:04:06 =~=~=~=~=~=~=~=~=~=~=~=
 
 login: admin
Password:
adsl info --linediag
^@
Login incorrect
 login:
Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: beanieboy182 on August 05, 2012, 05:26:10 PM
=~=~=~=~=~=~=~=~=~=~=~= Plink log 2012.08.05 17:09:09 =~=~=~=~=~=~=~=~=~=~=~=
 
 login: admin
Password:
adsl info --linediag
^@
Login incorrect
 login:
Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: beanieboy182 on August 05, 2012, 05:28:33 PM
this is why i asked if the telnet password and username were the same on the netgear firmware not skys and not dgteams
i have the dg834gt 1.04. something
username is admin
password is password
i just logged into it via another browser to check if it auto saved my password from ages ago before i changed it
and it came up with the login box
admin
password
and im in i can see all the router stats
but i have no clue why it says incorrect when using this script

the login1.txt is admin
and login2.txt is password
Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: rhohne on August 05, 2012, 05:51:18 PM
Assuming that you can manually telnet in using the values entered into LOGIN1.TXT (admin) and LOGIN2.TXT (password) then I would suspect the line endings are incorrect. Please could you check the size of these files. Are they value length+1 or value length+2.

For the DGTEAM firmware they must have UNIX style line endings ie length+1, not to sure about the native firmware.
Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: beanieboy182 on August 05, 2012, 05:59:19 PM
i just tried to telnet to 192.168.2.1
and admin
password
said incorrect login ???
how is that possible
thats the password
Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: beanieboy182 on August 05, 2012, 05:59:55 PM
+ how would i check the value lengths ???
that confused me a bit :D
Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: rhohne on August 05, 2012, 06:28:29 PM
Please can you confirm which firmware you are using.

I believe the latest netgear one is 1.03.23, but sky is 1.04.13, if the latter have you tried password of sky ?

File size can be determined from properties of file (right click on file and select properties) or from DIR command from a DOS box
Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: beanieboy182 on August 05, 2012, 06:39:30 PM
going to reload the proper dgteam firmware now have had enough :)
Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: beanieboy182 on August 05, 2012, 08:42:42 PM
whats the user name and password telnet for the dgteam firmware ?
Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: beanieboy182 on August 05, 2012, 08:49:29 PM
ok nvm
i am able to telnet to 192.168.2.1 with admin and password now
but still the script doesnt work for me
GRRR
tried it with a enter after the admin in login1.txt
and without and with both a enter after each lol
this is what i got

=~=~=~=~=~=~=~=~=~=~=~= Plink log 2012.08.05 20:47:40 =~=~=~=~=~=~=~=~=~=~=~=
 
Login: admin

Password:
password

adsl info --Bits

Login incorrect
Login: Password:
adsl info --linediag

adsl info --stats

Login incorrect
Login: Password:
exit

Login incorrect

Title: Re: Re: ADSL2+ Tones & Bitloading Problem
Post by: roseway on August 05, 2012, 08:54:50 PM
It looks to me as though the login is failing and you are typing the command too soon, before the 'login incorrect' message is displayed.

With the standard Netgear firmware you have to enable debug mode before using telnet. With the DGTeam firmware there is an option to enable debug mode permanently. Have you got that option checked?
Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: beanieboy182 on August 05, 2012, 08:55:50 PM
ok its the login1.txt and login2.txt that is messing me up
how should they look ?
should they have a second line (as in u press enter after the admin or password)
im missing something
if i use

admin (enter to get a second line)

it looks better
like

login: admin

Password:

but if i put a enter after password in login2.txt it looks like this

login: admin

password:
password


:S
Title: Re: Re: ADSL2+ Tones & Bitloading Problem
Post by: beanieboy182 on August 05, 2012, 08:57:15 PM
With the standard Netgear firmware you have to enable debug mode before using telnet. With the DGTeam firmware there is an option to enable debug mode permanently. Have you got that option checked?

yes its on just after i uploaded it i made sure that option was ticked

i can telnet into the busybox at anytime from a cmd prompt with admin password ( admin password)

works like a charm

but using those scripts its the login1.txt and login2.txt that seem to be messing me about

i think someone said they should have +1 or +2 after them ??
how do i find that out ?
Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: rhohne on August 05, 2012, 09:35:53 PM
The +1/+2 refers to the size of the file. They should not have DOS line terminations (2 chars) but UNIX style terminations (1 char)

If username is admin then size of file should be 6 bytes, likewise for password it should be 9 bytes. Have you tried restoring login1.txt and login2.txt

Code: [Select]
dir log*.txt
 Directory of C:\ADSL_stats\Apps
18/05/2012  20:34                 6 login1.txt
18/05/2012  20:35                 9 login2.txt
19/02/2012  01:29                 4 login3.txt
               3 File(s)             19 bytes
Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: beanieboy182 on August 05, 2012, 09:46:15 PM
here are the current stats :D finally
Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: burakkucat on August 05, 2012, 10:21:40 PM
So looking at your QLN graph and attempting to obtain the data directly from my laptop's screen, you have peaks at the following approximate tone numbers --

Code: [Select]
130, 160, 173, 202, 210, 218, 250, 262, 291, 304, 360, 408, 432, 465, 480 & 501

Of those peaks, three correspond to the valleys in your Bits and SNR graphs. They are at tones 291, 360 and 465.

Performing the calculations --

Code: [Select]
291 x 4.3125 kHz = 1255 kHz
360 x 4.3125 kHz = 1553 kHz
465 x 4.3125 kHz = 2005 kHz
Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: beanieboy182 on August 05, 2012, 10:44:15 PM
sounding more and more like a noob every post
so now i know that what do i need to do next ?
Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: beanieboy182 on August 05, 2012, 10:45:49 PM
they are radio broadcasts i think on AM MW
but the higher up tones are the ones that are suspected to be correctable ?
Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: burakkucat on August 05, 2012, 11:04:05 PM
You might like to bookmark this page (http://www.mediumwaveradio.com/uk.php), then check to see if those frequencies are approximately correct for a transmitter near you.

Please be aware that my calculations are only approximate and you should allow for a maximum error of about +/- 4 kHz.  ;)
Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: beanieboy182 on August 05, 2012, 11:11:19 PM
well I'm in bristol uk

so i can see on the map that there is 3 radio stations very close by that are in that list
but someone said back in this post that the higher up ones are not going to be radio stations as they are 2 high??
Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: asbokid on August 06, 2012, 01:25:22 AM
(https://forum.kitz.co.uk/proxy.php?request=http%3A%2F%2Fwww3.picturepush.com%2Fphoto%2Fa%2F8907576%2Foimg%2Fbeanieboy%2Fqlnmap.png&hash=88cad19476ff84764d76d1e86e3e927221a50e9f) (http://picturepush.com/public/8907576)
(click for full size)

Perhaps I can appeal again for collaboration on a project to programmatically analyse QLN data for RF ingress?

The general problem is one of noise peak or spike detection.  There is a good survey of peak detection algorithms for mass spectrometry analysis here [1]. The survey was authored by Chao Yang, et al from Hong Kong University of Science & Tech.  All of the algorithms they surveyed are open source. And although intended for proteome research, they should be re-usable for our project.

In that survey, the 'winning' peak detection algorithm, in terms of its sensitivity vs its false discovery rate, is an algorithm based on Continuous Wavelet Transforms (cwt).     The algorithm was developed by a team at Northwestern University, led by Pan Du. [2]   It is written for 'R'. [3]

The algorithm integrates a smoothing filter (to remove background noise), and baseline correction.

Further work would involve mapping the frequencies of the detected QLN noise peaks to the broadcast channels of AM radio. In Europe, AM (MW) radio band is assigned 9kHz channel spacing.  Whereas ADSL/VDSL2 uses spacing of 4.3125kHz.   So the channels don't immediately coincide.  Some 'jiggery pokery' / tolerance / fuzzy logic is involved.

Does that appeal to anyone here?!

cheers, a

[1] http://www.biomedcentral.com/1471-2105/10/4
[2] http://www.bioconductor.org/packages/release/bioc/html/MassSpecWavelet.html
[3] http://www.r-project.org/
Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: asbokid on August 06, 2012, 03:34:50 AM
As far as I can deduce, it is that time of the year when No-Feathers McGraw takes Mrs Eagle on their annual holiday . . .

Poor old Paul. According to Judith Chalmers, Hawaii can be very boring at this time of year. Hope Baldy_Bird has packed some graph print-outs to enjoy on the beach! :)

cheers, a
Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: beanieboy182 on August 06, 2012, 01:48:21 PM
so the 2 higher up spikes you have put ?'s next to how would i go about working out what is causing them :S
Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: beanieboy182 on August 06, 2012, 04:54:04 PM
so i have to look for a frequency of 1768 kHz ?
and 2000 khz ??
and work out what is making that noise on my line?
please explain how this is possible or what i could try :S

sorry to ask for so much help
i really appreciate it and will use my knowledge in the future :)
Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: asbokid on August 06, 2012, 06:23:45 PM
so i have to look for a frequency of 1768 kHz ?
and 2000 khz ??

$1m question!

Those frequencies were Burakkucat's estimates from your QLN graph, so maybe examine the raw tonemap data for QLN to find the exact tone indices for those noise spikes.

Quote
and work out what is making that noise on my line?
please explain how this is possible or what i could try :S

Perhaps a wideband radio scanner with a directional antenna tuned to those frequencies could identify the origin of the noise? Is it AM modulation? It might not be a 'broadcast' at all, just some noisy appliance in your neighbourhood.  Or maybe try a shortwave (~160m band) radio receiver?  The cheapo shortwave receivers sold by Lidl/Aldi unfortunately are no good for this. [1]

Or if you want to study it in depth, perhaps a software-defined radio (SDR), professional [2] or otherwise (with RF transverter) [3] ?

Have fun  :)

cheers, a

[1] http://forums.digitalspy.co.uk/showthread.php?t=1672360
[2] http://www.radioworld.co.uk/catalog/wr-g33ddc_excalibur_pro_winradio_receiver-p-8188.html
[3] http://dangerousprototypes.com/2012/03/20/introducing-rtl-sdr-a-20-sdr/
Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: beanieboy182 on August 06, 2012, 06:42:42 PM
just checked stats again and here are the results
looks like the pesky 460 x 4.3125 so around 1983 kHz
im gonna have to search for a radio that receives am up to that :S
because i don't have 2 grand to spend on the machine i need to trying to find that noise haha
Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: Bald_Eagle1 on August 08, 2012, 04:47:47 PM

As far as I can deduce, it is that time of the year when No-Feathers McGraw takes Mrs Eagle on their annual holiday . . .


Indeedy.

Back in Blighty now & it looks like I brought some sunshine back from Cyprus for the Olympics too  :)



Poor old Paul. According to Judith Chalmers, Hawaii can be very boring at this time of year. Hope Baldy_Bird has packed some graph print-outs to enjoy on the beach! :)


Haha. Far too busy enjoying the all-inclusive facilities at the swim-up pool bar & the evening through to early morning entertainment in the nearby Ayia Napa to even let the thought of a graph or a script cross my mind.



@ beanieboy182,

Glad you eventually got the script(s) working O.K.  :)
Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: beanieboy182 on August 08, 2012, 11:21:55 PM
cheers :)
they work like a charm
it was my stupid router and typing in the login1.txt and login2.txt and saving them as it didnt save them as unix or whatever it was supposed to be
:(
but as it works now i can see why my line isn't so great :)
but really i have little to no chance of finding the spike at around 2000 kHz :(
well without buying something expensive lol
Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: burakkucat on August 08, 2012, 11:34:40 PM
Quote
but really i have little to no chance of finding the spike at around 2000 kHz :(
well without buying something expensive :lol:

But it doesn't have to expensive! Please take a look at the following links --

http://www.ebay.co.uk/itm/370607013140
http://dangerousprototypes.com/2012/03/20/introducing-rtl-sdr-a-20-sdr/
http://sdr.osmocom.org/trac/wiki/rtl-sdr

Under £12 to buy the hardware (using eBay) and then just build the Open Source software for whatever OS you are using.  ;)
Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: asbokid on August 09, 2012, 04:53:14 PM
The gurus of SDR have patched the RTL-SDR driver to allow an antenna to be attached directly to the RTL2832 [1].  The Realtek IC is found in low-cost DVB-T USB sticks. [2][3]   This hack bypasses the Elonics e4000 DVB-T/FM tuner that is found on these sticks. Bypassing gains direct access to RF between 0 - 30MHz, the frequency range used by xDSL.    Before this patch, recovering signals from these low frequencies involved an up-converter like these [4][5]

This patch could turn the ten buck RTL-based DVB-T dongle into an excellent tool for tracking RF noise ingressing an xDSL broadband service.

cheers, a

[1] http://www.realtek.com.tw/products/productsView.aspx?Langid=1&PNid=22&PFid=35&Level=4&Conn=3&ProdID=257
[2] http://groups.google.com/forum/#!topic/ultra-cheap-sdr/cG988R1D8uE
[3] http://cgit.osmocom.org/cgit/rtl-sdr/commit/?h=steve-m/direct_sampling&id=4b49512fccbba68670f86942cc457be0c87d6871
[4] http://george-smart.co.uk/wiki/FunCube_Upconverter
[5] http://www.ct1ffu.com/site/index.php?option=com_content&view=article&id=178&Itemid=104
Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: burakkucat on August 09, 2012, 08:48:06 PM
Just between us, b*cat confesses to have ordered one of the appropriate type DVB-T USB sticks [1] from eBay. When it delivered to The Cattery, from Hong Kong, there will be yet another plaything for his amusement.  ;)

[1] http://www.ebay.co.uk/itm/140817268570
Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: beanieboy182 on August 10, 2012, 09:18:02 PM
well when i get paid i shall invest in that little dongle and antenna
but then i might need some help setting it up and working out how to listen to it and walk around whilst listening for noise or viewing it with software or whatever ? :S
Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: asbokid on August 10, 2012, 10:35:41 PM
This forum boasts its own expert on RF filter design <ahem!>  Hopefully he (or she?!) might find a spare moment to cast his (or her) expert eye over the filtering used on the up-converters for these dongles.   Maybe there are ways to improve their performance?

The up-converter allows the DVB-T dongle to be tuned to xDSL frequencies, right down to DC.  Which would make them a great ultra-low cost addition to Walter's legendary Wheelbarrow of Broadband Resuscitation Tools.

At the moment, and even though the up-converters are very simple in design, they still command a crazy price (£50+).   Great Uncle Ebenezer bin Asbo, however, has been studying the up-converters with a view to building something similar.  In terms of the components  - all of which are SMD, even the coils -  the boards should cost almost nothing to make.

Relevant links will be added below..

cheers, a
Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: burakkucat on August 11, 2012, 02:09:57 AM
Quote
The up-converter allows the DVB-T dongle to be tuned to xDSL frequencies, right down to DC.  Which would make them a great ultra-low cost addition to Walter's legendary Wheelbarrow of Broadband Resuscitation Tools.

Great minds think alike!  ;D

I was considering the possibility of Walter using an up-converter, a DVB-T dongle, a Raspberry Pi, an LCD display and a directional aerial. 
Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: asbokid on August 12, 2012, 03:09:46 AM
A team at Northwestern University has released an open source Wavelet-based Peak Detection algorithm for Mass Spectrometry Analysis. [1][2] It can be re-purposed for this comparatively trivial task of RF ingress noise detection on DSL lines.

We start with qln.txt, a two column text file of QLN tonemap data from a Broadcom chipset modem. It is just a capture from the modem shell command xdslcmd info --QLN.

Code: [Select]
$ head -20 qln.txt
"index"         "QLN"
   0            -113.0000
   1            -123.0000
   2            -123.0000
   3            -123.0000
   4            -123.0000
   5            -123.0000
   6            -123.0000
   7            -123.0000
   8            -123.0000
   9            -123.0000
   10           -123.0000
   11           -123.0000
   12           -123.0000
   13           -123.0000
   14           -123.0000
   15           -123.0000
   16           -122.0000
   17           -122.0000
   18           -122.0000

We begin by loading R, the "free software environment for statistical computing and graphics" [3]. Then we install Northwestern's Wavelet-based Peak Detection library. [2].

Code: [Select]
$ R

R version 2.15.1 (2012-06-22) -- "Roasted Marshmallows"
Copyright (C) 2012 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: x86_64-pc-linux-gnu (64-bit)

> source("http://bioconductor.org/biocLite.R")
BiocInstaller version 1.4.7, ?biocLite for help
> biocLite("MassSpecWavelet")
BioC_mirror: http://bioconductor.org
Using R version 2.15, BiocInstaller version 1.4.7.
Installing package(s) 'MassSpecWavelet'
..
* DONE (MassSpecWavelet)

The PeakDet library is loaded, and we read in our QLN dataset before calling the peak-det functions from the library:

Code: [Select]
> library(MassSpecWavelet)
Loading required package: waveslim
> qlnDAT <- read.table("qln.txt", colClasses = c(rep("NULL",1), rep("numeric",1)), header=TRUE)
> qlnMAT <- data.matrix(qlnDAT)
> wCoefs <- cwt(qlnMAT, scales=seq(1,31,1), wavelet='mexh')
> localMax <- getLocalMaximumCWT(wCoefs)
> ridgeList <- getRidge(localMax)
> majorPeakInfo <- identifyMajorPeaks(qlnMAT, nearbyPeak=TRUE, ridgeList, wCoefs, SNR.Th=1)
> peakIndex <- majorPeakInfo$peakIndex

Which discovers the following Peak Information..

Eight noise peaks in total, using those thresholds. Discovered at DMTs #84  #141  #162  #249  #268  #283  #339  #377,  each of a given intensity.

Code: [Select]
> majorPeakInfo
$peakIndex
 1_84 1_141 1_162 1_249 1_268 1_283 1_339 1_377
   84   141   162   249   268   283   339   377

$peakValue
       1_2       1_30       1_45       1_51       1_66       1_84      1_100
 5.9741241 14.6055427  3.4114940  0.0000000  2.2530691 23.2881416  1.9204691
     1_112      1_120      1_141      1_162      1_200      1_212      1_226
 0.0000000  2.6028832 19.9828253 75.8928215  0.7603451  0.0000000  0.0000000
     1_249      1_268      1_283      1_301      1_323      1_339      1_367
14.3018559 52.1779085 10.8258617  0.0000000  0.0000000 12.3137493  1.2914229
     1_377      1_399      1_409      1_417      1_429      1_442      1_457
 6.7045729  1.1645874  0.0000000  0.0000000  1.4541205  0.0000000  4.2575986
     1_477      1_485
 1.5450179  0.0000000

$peakCenterIndex
  1_2  1_30  1_45  1_51  1_66  1_84 1_100 1_112 1_120 1_141 1_162 1_200 1_212
    3    28    48    51    70    60    96   112   117   140   159   198   212
1_226 1_249 1_268 1_283 1_301 1_323 1_339 1_367 1_377 1_399 1_409 1_417 1_429
  226   249   270   284   301   323   339   367   389   396   409   417   427
1_442 1_457 1_477 1_485
  442   468   478   485

$peakSNR
       1_2       1_30       1_45       1_51       1_66       1_84      1_100
 1.4794073  3.6031302  0.8416022  0.0000000  0.5558233  5.7450933  0.4737722
     1_112      1_120      1_141      1_162      1_200      1_212      1_226
 0.0000000  0.6421211  4.9296847 18.7224618  0.1875742  0.0000000  0.0000000
     1_249      1_268      1_283      1_301      1_323      1_339      1_367
 3.5282118 12.8720857  2.6706977  0.0000000  0.0000000  3.0377537  0.3185890
     1_377      1_399      1_409      1_417      1_429      1_442      1_457
 1.6539919  0.2872992  0.0000000  0.0000000  0.3587258  0.0000000  1.0503329
     1_477      1_485
 0.3811499  0.0000000

$peakScale
  1_2  1_30  1_45  1_51  1_66  1_84 1_100 1_112 1_120 1_141 1_162 1_200 1_212
    5     5     5     0     6    30     5     0     5     5    30     5     0
1_226 1_249 1_268 1_283 1_301 1_323 1_339 1_367 1_377 1_399 1_409 1_417 1_429
    0     5    25     5     0     0     5     5    20     5     0     0     5
1_442 1_457 1_477 1_485
    0    15     8     0

$potentialPeakIndex
 1_84 1_100 1_112 1_120 1_141 1_162 1_200 1_212 1_226 1_249 1_268 1_283 1_301
   84   100   112   120   141   162   200   212   226   249   268   283   301
1_323 1_339 1_367 1_377 1_399 1_409 1_417 1_429
  323   339   367   377   399   409   417   429

$allPeakIndex
  1_2  1_30  1_45  1_51  1_66  1_84 1_100 1_112 1_120 1_141 1_162 1_200 1_212
    2    30    45    51    66    84   100   112   120   141   162   200   212
1_226 1_249 1_268 1_283 1_301 1_323 1_339 1_367 1_377 1_399 1_409 1_417 1_429
  226   249   268   283   301   323   339   367   377   399   409   417   429
1_442 1_457 1_477 1_485
  442   457   477   485

And that data can be plotted with the following command. In the graphs, the noise peaks above our threshold are highlighted in red.

Code: [Select]
> plotPeak(qlnMAT, peakIndex, main=paste("identified QLN peaks"))

Which produces this graph:

(https://forum.kitz.co.uk/proxy.php?request=http%3A%2F%2Fwww2.picturepush.com%2Fphoto%2Fa%2F8954345%2F480%2Fqln_analysis%2FScreenshot-from-2012-08-12-02%253A36%253A58.png&hash=f2e0371a71e7c22b6773582007469e715416f59c) (http://picturepush.com/public/8954345)
(click for full size)

We can also do a baseline correction to visually examine the SNR of each noise peak:

Code: [Select]
> plotRange <- c(1,512)
> peakSNR <- majorPeakInfo$peakSNR
> allPeakIndex <- majorPeakInfo$allPeakIndex
> selInd <- which(allPeakIndex >= plotRange[1] & allPeakIndex < plotRange[2])
> plot(allPeakIndex[selInd], peakSNR[selInd], type='h', xlab='DMT Index', ylab='Peak noise to background ratio')
> points(peakIndex, peakSNR[names(peakIndex)], type='h', col='red')
> peakIndex <- majorPeakInfo$peakIndex
> title('CWT Baseline correction - SNR of peaks - majorPeaks in red')

(https://forum.kitz.co.uk/proxy.php?request=http%3A%2F%2Fwww3.picturepush.com%2Fphoto%2Fa%2F8954346%2F480%2Fqln_analysis%2FScreenshot-from-2012-08-12-02%253A48%253A12.png&hash=97198bf3995e68543ad979063a5592d435b7edc8) (http://picturepush.com/public/8954346)
(click for full size)

Hopefully, it is possible to build these Peak Detection functions as a static library, and to use a C language binding to call them from own code. [4]

The next stage is re-sampling(?) the DSL data to align it with the 9kHz channel spacing of AM broadcast radio.

An idea mentioned earlier is to apply a cluster detection algorithm to those noise peak frequencies, for geolocation purposes. [5]

Perhaps the tool could become a plug-in for a DSL line-monitoring application like the one Roseway is developing  :) [6]

cheers, a

[1] http://www2.in.tu-clausthal.de/~hammer/lectures/biomlsem/sechs.pdf
[2] http://www.bioconductor.org/packages/release/bioc/html/MassSpecWavelet.html
[3] http://www.r-project.org/
[4] http://stackoverflow.com/questions/7457635/calling-r-function-from-c
[5] http://forum.kitz.co.uk/index.php/topic,11424.msg220565.html#msg220565
[6] http://forum.kitz.co.uk/index.php/topic,11478.0.html
Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: burakkucat on August 12, 2012, 06:34:58 PM
Very nice.  :)

Someone was obviously wide awake whilst b*cat was sleeping!  ::)
Title: Re: Re: ADSL2+ Tones & Bitloading Problem
Post by: roseway on August 12, 2012, 06:51:04 PM
Quote
Perhaps the tool could become a plug-in for a DSL line-monitoring application like the one Roseway is developing

I think that may be too much for my poor old brain, but I can certainly save the QLN data (and any other useful data) as text files for other programs to use.
Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: asbokid on August 23, 2012, 04:40:23 AM
The gurus of SDR have patched the RTL-SDR driver to allow an antenna to be attached directly to the RTL2832 [1].  The Realtek IC is found in low-cost DVB-T USB sticks. [2][3]   This hack bypasses the Elonics e4000 DVB-T/FM tuner that is found on these sticks. Bypassing gains direct access to RF between 0 - 30MHz, the frequency range used by xDSL.    Before this patch, recovering signals from these low frequencies involved an up-converter like these [4][5]

This patch could turn the ten buck RTL-based DVB-T dongle into an excellent tool for tracking RF noise ingressing an xDSL broadband service.

cheers, a

Just between us, b*cat confesses to have ordered one of the appropriate type DVB-T USB sticks [6] from eBay. When it delivered to The Cattery, from Hong Kong, there will be yet another plaything for his amusement.  ;)

An enjoyable evening was spent atop the highest local peak playing with one of these dongles. It even tuned to Mrs Humphreys' (illegal) baby monitor transmitting on 195.250MHz.  Either the tuner has a faulty squelch or that poor child badly needs burping!

The datasheet and reference schematic for the best performing tuner found in these DVB-T dongles, the Elonics E4000 multiband tuner, have finally "come out", courtesy of Ben Ryan - he's the man to hang!  [7]

For those who do not want to sign up for a silly BGW "Live.Com" account, simply to download those datasheets from Ben's Live.Com page, they can sign up for a Google Corp. account to download the files from here instead ::) [8]

Tragically, Elonics, the Edinburgh-based fabless chipmaker, has gone bust. So while the release of documentation on the E4000 is obviously great news, unfortunately, no one is making the tuner ICs any more.   But hopefully an enterprise will soon snap up Elonics' IPR from the Official Receiver.

cheers, a

[1] http://www.realtek.com.tw/products/productsView.aspx?Langid=1&PNid=22&PFid=35&Level=4&Conn=3&ProdID=257
[2] http://groups.google.com/forum/#!topic/ultra-cheap-sdr/cG988R1D8uE
[3] http://cgit.osmocom.org/cgit/rtl-sdr/commit/?h=steve-m/direct_sampling&id=4b49512fccbba68670f86942cc457be0c87d6871
[4] http://george-smart.co.uk/wiki/FunCube_Upconverter
[5] http://www.ct1ffu.com/site/index.php?option=com_content&view=article&id=178&Itemid=104
[6] http://www.ebay.co.uk/itm/140817268570
[7] http://groups.google.com/d/msg/ultra-cheap-sdr/zXhBfiYdxf4/L2r108nnyXQJ
[8] http://docs.google.com/folder/d/0B6wW18mYskvBSnJQeVl0YmVDVzA/edit

EDIT: Links adjusted ;)
Title: Re: ADSL2+ Tones & Bitloading Problem
Post by: burakkucat on August 23, 2012, 06:11:00 PM
 ^-^ There is nothing to report, from The Cattery, on that front. My dongle is still in transit from the orient.  :)