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

Author Topic: DSLStats - logging the telnet connection text  (Read 642 times)

Silverback

  • Member
  • **
  • Posts: 37
DSLStats - logging the telnet connection text
« on: July 26, 2020, 08:23:46 PM »

Is there a way to log or view the actual text 'conversation' between DSLStats and the router / device when using the Special Login option to fault diagnose a connection failure?
Logged

Silverback

  • Member
  • **
  • Posts: 37
Re: DSLStats - logging the telnet connection text
« Reply #1 on: July 26, 2020, 11:56:47 PM »

Or has anybody connected to a Cisco device via telnet with DSLStats that can offer any advice?
Logged

Silverback

  • Member
  • **
  • Posts: 37
Re: DSLStats - logging the telnet connection text
« Reply #2 on: July 27, 2020, 02:07:16 PM »

I'm over the that bump, I think.  Added local login to router and used the normal login page in DSLStats.

I'm now experiencing an error when I try to pass a Custom CLI Command Prefix (Win64 version)

< "-" is an invalid float >

Is anybody using the the custom prefix option successfully?

Perhaps it compiled differently in the Linux version?

Any suggestions welcomed :)



Logged

roseway

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 39646
  • Penguins CAN fly
    • DSLstats
Re: DSLStats - logging the telnet connection text
« Reply #3 on: July 27, 2020, 03:20:46 PM »

What did you enter for the custom command prefix?
Logged
  Eric

Silverback

  • Member
  • **
  • Posts: 37
Re: DSLStats - logging the telnet connection text
« Reply #4 on: July 28, 2020, 10:54:23 PM »

I put 'test vdsl 0 modem exec xdslctl' in as a prefix.

When I hit the start > button I get the error ("-" is an invalid float'). It happens on Win64 and Ubuntu with both 6.5 and 6.5.9.

In a standard telnet session to the box 'test vdsl 0 modem exec xdslctl info --stats' returns what I expect.

Logged

roseway

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 39646
  • Penguins CAN fly
    • DSLstats
Re: DSLStats - logging the telnet connection text
« Reply #5 on: July 29, 2020, 06:38:31 AM »

Sorry, but I don't think that would be expected to work. It was never designed to do any more than specify a single word which wasn't already in the list. That would be a new feature, which unfortunately I'm unable to do now.
Logged
  Eric

Silverback

  • Member
  • **
  • Posts: 37
Re: DSLStats - logging the telnet connection text
« Reply #6 on: July 29, 2020, 01:08:41 PM »

Cool.  I understand :)

Thanks for letting me know.

Could you give a pointer to the relevent code in the source... a variable name perhaps?

Logged

roseway

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 39646
  • Penguins CAN fly
    • DSLstats
Re: DSLStats - logging the telnet connection text
« Reply #7 on: July 29, 2020, 04:56:18 PM »

It won't be easy to follow this through.

In the source file main.pas lines 5381 - 5411 are where the prefix is read and converted into the various telnet commands to be sent to the modem.

In the source file telnetunit1.pas lines 381-400 the various commands are sent to the modem. This is done by  a library called lNet (that's a lower case L). At this point your custom command will still be as you specified (it's just a string) but somewhere in the library functions it becomes mangled and returns an error. I'm afraid I don't know how to follow this through without a deep knowledge of lNet.
Logged
  Eric

Silverback

  • Member
  • **
  • Posts: 37
Re: DSLStats - logging the telnet connection text
« Reply #8 on: July 30, 2020, 01:42:17 PM »

Thanks.

I'm only looking at the source files in Notepad++ so no debug. I see the string array and see the LTelnetClient.SendMessage but I'm screwed by the innards of that library too. Not that my Pascal is anything but weak...

Playing with the app I think the string is passed ok and the command executed on the router, maybe the error is on the returned data...  There are a couple of commands that don't work on the 887 (--bits and --vectoring)

Oh well it was a nice thought :)
« Last Edit: July 30, 2020, 04:11:07 PM by Silverback »
Logged

Silverback

  • Member
  • **
  • Posts: 37
Re: DSLStats - logging the telnet connection text
« Reply #9 on: July 31, 2020, 12:07:46 AM »

Error is on returned data.

I've turned off monitoring of bits, modem uptime and vectoring status and the app connects and collects data :)

QLN, HLOG and SNR per tone don't get a correct data set but the rest looks ok a first glance.

That gives logging of the important stuff (for me at least).

Nice.
Logged

roseway

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 39646
  • Penguins CAN fly
    • DSLstats
Re: DSLStats - logging the telnet connection text
« Reply #10 on: July 31, 2020, 06:19:02 AM »

That's very smart work. :)
Logged
  Eric

Silverback

  • Member
  • **
  • Posts: 37
Re: DSLStats - logging the telnet connection text
« Reply #11 on: July 31, 2020, 10:01:32 AM »

Guided solution. I would not have got there without your assistance. Thank you.

Just for info.  For some reason (at least for this firmware version)  --Bits --QLN and --Hlog all return truncated data a few hundred tones in.  Although the data returned looks good.  The command has a sub parameter LINE but I've failed at guessing what it might be.

The Linux cat command for uptime surprisingly returns data when sent via telnet session to the 887 but with xdslctl prefixed the router will rightly poop out an error.

Any chance of SSH support? <joke>

M :)
Logged

roseway

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 39646
  • Penguins CAN fly
    • DSLstats
Re: DSLStats - logging the telnet connection text
« Reply #12 on: July 31, 2020, 10:44:14 AM »

As it happens, I did work on SSH a few years ago, and got it working well, BUT after several minutes operation the modem/router overheated and crashed. I tried a different modem, with the same result. I concluded that the extra processing required for handling the SSH interface with frequently repeated commands was just too much for these low powered devices.
Logged
  Eric

Silverback

  • Member
  • **
  • Posts: 37
Re: DSLStats - logging the telnet connection text
« Reply #13 on: July 31, 2020, 11:41:25 PM »

Although the 887 is the lower end of the Cisco range and an older device I would not necessarily call it a low powered unit compared to consumer grade stuff.  Also I just have it set up as a bridge and it's spec'ed for routing and most of what it's doing is at the hardware level.  I will have a second 887 available next week so if you fancy throwing an exe my way I'm up for testing SSH just for shits and giggle's...?
Logged

Alex Atkin UK

  • Kitizen
  • ****
  • Posts: 1381
    • My Broadband History
Re: DSLStats - logging the telnet connection text
« Reply #14 on: August 01, 2020, 05:57:39 PM »

You can proxy telnet on a Linux box and log the traffic:
Code: [Select]
nc -l -p 23 -c "nc ModemIP 23 -o telnet.log"
That may work on Windows too actually if you download Netcat for Windows, although you might need to change the first port depending on if Windows lets you open a privileged port.
« Last Edit: August 01, 2020, 06:10:14 PM by Alex Atkin UK »
Logged
Exchange: INTAKE (ECI) ISP/Modems: Zen (Home Hub 5A running OpenWrt) + Plusnet (VMG-3925-B10B) + Three (Hauwei B535-232)
Router: pfSense (i5-7200U) WiFi: Ubiquiti nanoHD
Pages: [1] 2