Kitz ADSL Broadband Information
adsl spacer  
Support this site
Home Broadband ISPs Tech Routers Wiki Forum
 
     
   Compare ISP   Rate your ISP
   Glossary   Glossary
 
Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1] 2 3

Author Topic: DSLstats v5.3 with DGN2200 (v4)  (Read 15993 times)

Axel Foley

  • Member
  • **
  • Posts: 50
  • Memento audere semper
DSLstats v5.3 with DGN2200 (v4)
« on: December 19, 2014, 03:39:27 PM »

I'm using DTM and RouterStats to monitor my DGN2200 (v4) router with amod firmware. They're both working fine, but I don't quite like them, for different reasons.

I now found DSLstats, and would like to use it because I really like the GUI and all the features.

I tried setting it up like I did for DTM and RouterStats but it's not working.

I think Telnet authentication is ok, because I don't receive errors in that phase, but when sampling starts, after a while I receive the message: "No data returned in latest sample".

I'm using a custom firmware, called amod (http://alfie.altervista.org/amod2200V4/), which enables telnet by default, allows to save SNR modifications permanently, implements pppoe-relay and a bunch of other nice features.

The telnet prompt string (when I telnet via terminal) is: DGN2200V4 / #

The adsl control commands available from shell are: adsl, adslctl, xdslctl. adsl and adslctl are symlinks to xdslctl.

In DSLstat's "telnet->connection stats" I expected to log telnet data, but it's empty. I don't know if there's another way to debug what DSLstats is sending/receving.

Here's an example of stats I can read from telnet:

Code: [Select]
DGN2200V4 / # adslctl info
xdslctl.orig: ADSL driver and PHY status
Status: Showtime
Last Retrain Reason:    8000
Last initialization procedure status:   0
Max:    Upstream rate = 1113 Kbps, Downstream rate = 14816 Kbps
Bearer: 0, Upstream rate = 1106 Kbps, Downstream rate = 13230 Kbps

DGN2200V4 / # adslctl info --show
xdslctl.orig: ADSL driver and PHY status
Status: Showtime
Last Retrain Reason:    8000
Last initialization procedure status:   0
Max:    Upstream rate = 1113 Kbps, Downstream rate = 14748 Kbps
Bearer: 0, Upstream rate = 1106 Kbps, Downstream rate = 13230 Kbps

Link Power State:       L0
Mode:                   ADSL2+
TPS-TC:                 ATM Mode
Trellis:                U:ON /D:OFF
Line Status:            No Defect
Training Status:        Showtime
                Down            Up
SNR (dB):        7.1             6.9
Attn(dB):        30.0            18.8
Pwr(dBm):        19.1            12.1

                        ADSL2 framing
                        Bearer 0
MSGc:           58              14
B:              59              13
M:              4               16
T:              7               8
R:              14              12
S:              0.5791          6.4218
L:              3509            294
D:              32              8

                        Counters
                        Bearer 0
SF:             454155          458735
SFErr:          427             0
RS:             50865195                284853
RSCorr:         9524836         0
RSUnCorr:       436             0

                        Bearer 0
HEC:            327             0
OCD:            0               0
LCD:            0               0
Total Cells:    229785163               19207523
Data Cells:     31505886                14495885
Drop Cells:     0
Bit Errors:     0               0

ES:             4041            9
SES:            591             2
UAS:            903             903
AS:             7364

                        Bearer 0
INP:            0.50            1.00
INPRein:        0.00            0.00
delay:          5               13
PER:            16.21           16.05
OR:             31.57           9.96
AgR:            13210.75        1111.86

Bitswap:        655/655         1/1

DGN2200V4 / #

Thanks for any help you might give me to make it work with my setup.
Logged

roseway

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 43670
  • Penguins CAN fly
    • DSLstats
Re: DSLstats v5.3 with DGN2200 (v4)
« Reply #1 on: December 19, 2014, 04:49:32 PM »

If you get the message "No data returned in latest sample" with the first sample, then Telnet Data --> Connection Stats will be empty because no data has been received. This means that login has not completed although the username and password have been accepted.

There are two possibilities which occur to me:

1. The modem might need an extra 'kick' to get to the BusyBox prompt. Try enabling the option "Modem/router is HG622 type". This option sends an extra Enter after login, and might be what's needed.

2. Some small time delays might be needed. If you use the "Special login" page you can add small delays during login, which might resolve the problem. Fill in the other details to correspond with what you see during a manual login.
Logged
  Eric

Axel Foley

  • Member
  • **
  • Posts: 50
  • Memento audere semper
Re: DSLstats v5.3 with DGN2200 (v4)
« Reply #2 on: December 19, 2014, 07:56:46 PM »

If you get the message "No data returned in latest sample" with the first sample, then Telnet Data --> Connection Stats will be empty because no data has been received. This means that login has not completed although the username and password have been accepted.

There are two possibilities which occur to me:

1. The modem might need an extra 'kick' to get to the BusyBox prompt. Try enabling the option "Modem/router is HG622 type". This option sends an extra Enter after login, and might be what's needed.

2. Some small time delays might be needed. If you use the "Special login" page you can add small delays during login, which might resolve the problem. Fill in the other details to correspond with what you see during a manual login.

Tried HG622 option: "Error running HG622 workaround".

The router doesn't require extra enters, I thought about that and debugged it manually, it's very clean, here's a simple telnet (windows telnet) session captured: as you can see, as soon as it connects, it asks for login, then enter, then pwd, then I'm at the prompt.

Questions:

1. Do you check the prompt string when you login/connect? This firmware uses a custom prompt as you can see (DGN2200V4 / #).
2. What is the first command executed after the login?
3. Is there a way to debug all telnet communication?

Thanks for the help.

Code: [Select]
DGN2200V4 login: admin
Password:
DGN2200V4 / # adslctl info --show
xdslctl.orig: ADSL driver and PHY status
Status: Showtime
Last Retrain Reason:    8000
Last initialization procedure status:   0
Max:    Upstream rate = 1125 Kbps, Downstream rate = 15144 Kbps
Bearer: 0, Upstream rate = 1110 Kbps, Downstream rate = 14003 Kbps

Link Power State:       L0
Mode:                   ADSL2+
TPS-TC:                 ATM Mode
Trellis:                U:ON /D:OFF
Line Status:            No Defect
Training Status:        Showtime
                Down            Up
SNR (dB):        6.5             7.3
Attn(dB):        30.0            18.7
Pwr(dBm):        19.1            12.1

                        ADSL2 framing
                        Bearer 0
MSGc:           53              15
B:              240             13
M:              1               16
T:              2               8
R:              14              12
S:              0.5496          6.4000
L:              3712            295
D:              64              8

                        Counters
                        Bearer 0
SF:             695917          671733
SFErr:          2872            1
RS:             82118045                2756927
RSCorr:         28881373                332
RSUnCorr:       3316            0

                        Bearer 0
HEC:            2393            1
OCD:            0               0
LCD:            0               0
Total Cells:    372628502               29530284
Data Cells:     55041343                22426076
Drop Cells:     0
Bit Errors:     0               0

ES:             847             1
SES:            9               0
UAS:            58              58
AS:             11283

                        Bearer 0
INP:            0.50            1.00
INPRein:        0.00            0.00
delay:          9               13
PER:            16.21           16.80
OR:             29.11           10.00
AgR:            13978.21        1115.64

Bitswap:        2312/2312               1/1

DGN2200V4 /bin #
Logged

krypton

  • Reg Member
  • ***
  • Posts: 128
Re: DSLstats v5.3 with DGN2200 (v4)
« Reply #3 on: December 19, 2014, 08:13:28 PM »

3. Is there a way to debug all telnet communication?

You may want to use wireshark to see if the commands were executed and what data is being sent to DSLstats.
Logged

roseway

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 43670
  • Penguins CAN fly
    • DSLstats
Re: DSLstats v5.3 with DGN2200 (v4)
« Reply #4 on: December 19, 2014, 11:02:36 PM »

Quote
The router doesn't require extra enters, I thought about that and debugged it manually, it's very clean, here's a simple telnet (windows telnet) session captured: as you can see, as soon as it connects, it asks for login, then enter, then pwd, then I'm at the prompt.

Yes I know that, but the HG622 still needs that extra kick when logging in using the particular telnet library used by DSLstats. It's probably actually a timing issue, which is why I suggested that you try the Special Login option as well as the HG622 option.

To answer your questions:

1. There's some limited checking for the prompt, but only to check when a line appears containing one of the characters #, $, > and : so it will accept the # from your model.

2. The first thing it does after a successful login is process any custom commands which have been set up (if any) and then it collects the main stats with adsl info --stats  ('adsl' might be one of several different command prefixes).

3. As morphium says, wireshark might provide useful diagnostic information (but I won't be much use at interpreting it unfortunately).
Logged
  Eric

Axel Foley

  • Member
  • **
  • Posts: 50
  • Memento audere semper
Re: DSLstats v5.3 with DGN2200 (v4)
« Reply #5 on: December 20, 2014, 01:25:37 PM »

With Special Login I cannot even pass telnet authentication. It fails with "unable to login to modem/router".

I know I can sniff the network, but I thought there was a way to debug what dslstats was sending/receiving on the application side. I thought there was a debug log somewhere, it could be useful for telnet.

I'm sorry that all the other softwares (DMT and RouterStats) work and DLSstats doesn't, I would have preferred to use this to monitor the line and router.

Thanks anyway.
Logged

Axel Foley

  • Member
  • **
  • Posts: 50
  • Memento audere semper
Re: DSLstats v5.3 with DGN2200 (v4)
« Reply #6 on: December 22, 2014, 06:36:59 PM »

I've just sniffed the telnet session with Wireshark, and it looks good, the adsl command is executed and the last line is the prompt.

The only thing that I can think of is that the ansi codes to color the prompt are being misinterpreted by DSLstats so the prompt is not recognised and it keeps waiting for the end of the output, then goes in timeout waiting for data.

Please check the attached log, it's raw data (tx/rx) of the captured session.

Logged

Axel Foley

  • Member
  • **
  • Posts: 50
  • Memento audere semper
Re: DSLstats v5.3 with DGN2200 (v4)
« Reply #7 on: December 22, 2014, 06:49:27 PM »

Here are two images of the captured sessions:

1. The first is a normal login, authentication goes fine, the adsl command is executed.
2. The second is with special login enabled (without delays or other things set, just set user and pw).

In case 1, right after the prompt is received, the adsl command is executed and when prompt is returned, the software authenticates and then tells me "no data returned".
In case 2, right after the promot, the software gives me the error: "unable to login to modem/router".

So in case 1, the adsl command is sent. In case 2, it is not sent, and even if authentication went ok the software says login error.

From this I can only think that the prompt string is not detected correctly, probably because of the ansi codes used to color it.

Could you confirm if this could be the reason?

Thanks.
Logged

roseway

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 43670
  • Penguins CAN fly
    • DSLstats
Re: DSLstats v5.3 with DGN2200 (v4)
« Reply #8 on: December 22, 2014, 07:08:29 PM »

Thanks for that extra information. It does seem possible that there's a confusion over the prompt. I'll look at it as quickly as I can, but I fear I may not be able to get to it until after Christmas. I'll do my best.

[Later] I think I may have found the problem (as you suggested, it seems that the extra formatting characters in the prompt string are the cause of the problem). After a bit more testing I'll try to upload some replacement executables later tonight.

« Last Edit: December 22, 2014, 08:15:19 PM by roseway »
Logged
  Eric

Axel Foley

  • Member
  • **
  • Posts: 50
  • Memento audere semper
Re: DSLstats v5.3 with DGN2200 (v4)
« Reply #9 on: December 22, 2014, 08:16:54 PM »

Thanks for answering.

Bad news: I managed to change the prompt, modified in a plain simple one, with no strange color codes or characters (DGN2200V4 / #) and it still doesn't work.  :(

I'm out of options now...hope you find the problem, if you want me to test something let me know.

Merry christmas. :)


Logged

Axel Foley

  • Member
  • **
  • Posts: 50
  • Memento audere semper
Re: DSLstats v5.3 with DGN2200 (v4)
« Reply #10 on: December 22, 2014, 08:19:12 PM »

Thanks for that extra information. It does seem possible that there's a confusion over the prompt. I'll look at it as quickly as I can, but I fear I may not be able to get to it until after Christmas. I'll do my best.

[Later] I think I may have found the problem (as you suggested, it seems that the extra formatting characters in the prompt string are the cause of the problem). After a bit more testing I'll try to upload some replacement executables later tonight.

I just read this after posting the previous message. Check my previous post, unfortunately even with a simple prompt it doesn't work, but who knows, let's give it a try. :)

If you need to test it before releasing it I'm more than happy to try it.
Logged

roseway

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 43670
  • Penguins CAN fly
    • DSLstats
Re: DSLstats v5.3 with DGN2200 (v4)
« Reply #11 on: December 22, 2014, 09:40:10 PM »

Yes, let's give it a try anyway. I'm assuming that you use Windows. Here's a replacement executable (just extract the .exe file and copy it over the v5.3 version of dslstats.exe). If it doesn't work, then I'm afraid it will have to wait until after Christmas. :)

http://www.s446074245.websitehome.co.uk/files/dslstats-5.3.1.exe.zip
Logged
  Eric

Axel Foley

  • Member
  • **
  • Posts: 50
  • Memento audere semper
Re: DSLstats v5.3 with DGN2200 (v4)
« Reply #12 on: December 23, 2014, 01:33:33 AM »

Wooooooooooooooooorks!!! :D

I had an error at first start (check the image below), after 10 seconds from connection. I found that Traffic Monitoring was enabled, but it was configured with a wrong command. I configured the right command (ifconfig and interface atm0). Restarted and now it's running fine. :)

Out of curiosity: what was the issue?

Logged

Axel Foley

  • Member
  • **
  • Posts: 50
  • Memento audere semper
Re: DSLstats v5.3 with DGN2200 (v4)
« Reply #13 on: December 23, 2014, 01:40:38 AM »

I changed the router to its default prompt, with ansi color codes, and retried v5.3.1, and it works fine. :)

Thanks for this Christmas gift, I'll call you Santa Claus from now on.

« Last Edit: December 23, 2014, 01:42:53 AM by Axel Foley »
Logged

roseway

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 43670
  • Penguins CAN fly
    • DSLstats
Re: DSLstats v5.3 with DGN2200 (v4)
« Reply #14 on: December 23, 2014, 07:56:01 AM »

That's a relief, thanks for confirming it.

The change I made was in the detection of the prompt after issuing the various stats retrieval commands - previously I was checking for the prompt character as either the last character of the output or the next to last. Now I look for it in the last 20 characters (or anywhere in the string for commands returning short outputs).
Logged
  Eric
Pages: [1] 2 3
 

anything