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 ... 3 4 [5] 6 7 8

Author Topic: Getting extra DSL stats from TP-Link modem/routers  (Read 162015 times)

ejs

  • Kitizen
  • ****
  • Posts: 2078
Re: Getting extra DSL stats from TP-Link modem/routers
« Reply #60 on: October 20, 2015, 04:04:54 PM »

I've put the 9980 150507 firmware on my 8970, I expect it would work, but I am not really using it currently, it's sat on a shelf and occasionally switched on and used as a network switch.

Code: [Select]
# /firmware/dsl_cpe_pipe.sh vig
nReturn=0 DSL_DriverVersionApi=4.16.6-pd1pa1 DSL_ChipSetFWVersion=5.7.1.8.0.1 DSL_ChipSetHWVersion=Unknown DSL_ChipSetType=Lantiq-VRX200 DSL_DriverVersionMeiBsp=1.4.4 nHybrid=1

~ # /firmware/dsl_cpe_pipe.sh locs 0 -10
nReturn=20

~ # /firmware/dsl_cpe_pipe.sh locs 1 1
nReturn=-11
~ # /firmware/dsl_cpe_pipe.sh locg 0
nReturn=0 nConfigValue=-10

~ # /firmware/dsl_cpe_pipe.sh locg 1
nReturn=-11

locs / locg options 0 and 4 appear to be valid (4 is ADSL2/2+ enhanced US framing, enabled by default), options 1, 2 and 3 give that nReturn=-11, negative return values indicate an error.
Logged

frakitz

  • Just arrived
  • *
  • Posts: 4
Re: Getting extra DSL stats from TP-Link modem/routers
« Reply #61 on: October 20, 2015, 06:38:14 PM »

It seems to be working!

Thank you very much!
Logged

kitzuser87430

  • Reg Member
  • ***
  • Posts: 432
Re: Getting extra DSL stats from TP-Link modem/routers
« Reply #62 on: February 21, 2016, 12:22:52 PM »

JUst bought a tp-link w9970 modem/router with a broadcom chipset.

Using ejs' StatPOSTer-20150824.jar I can get (same as other tp-link routers) some stats but I cannot decrypt the config.bin configuration file from the GUI to try the addition to the config file as described here http://forum.kitz.co.uk/index.php/topic,14377.msg287247.html#msg287247

I presume the key has changed from this method http://teknoraver.net/software/hacks/tplink/

Any ideas how to find the 8 byte key for this model and firmware?
Logged

ejs

  • Kitizen
  • ****
  • Posts: 2078
Re: Getting extra DSL stats from TP-Link modem/routers
« Reply #63 on: February 21, 2016, 01:29:34 PM »

The bytes of the key used to encrypt the config file can be found by disassembling the cli binary. Of course it's much easier to find them if you already know what they are. The key appears to be the same for the TD-W9970.

The StatPOSTer program should save the decrypted file, but you will not be able to edit the file, because it is compressed. If you examine the decrypted file in a hex editor, you might see a few readable parts of the config file near the start of the file, but there are less readable parts further down the file. I do not know how to decompress the data, nor how to compress it again.

It might be possible to adapt the strategy used with the TD-W9980, but the first problem is that I don't have a blank editable xml config for the 9970, and the second problem is that there may have been some slight changes to the file format, the MD5 checksum at the start might be for the compressed data, rather than the uncompressed data like it is for the older models.

In summary, it might be possible to work out how to do it, but it requires some original research by someone who has the device and is willing to do a lot of experimenting with it, while it's not connected to the phone line of course, because it may require a lot of rebooting. It's also possible that if you upload a config file with somehow bad contents, the device may accept it, load it, and reboot, but the device may not function and requires pressing the factory reset button. The minimum tools needed would be a hex editor, an md5sum program, and some program like the openssl command that can do the encryption (can't use StatPOSTer because it adds or removes the MD5 checksum automatically).

If you send me a sample config file (with no personal data in - factory reset the 9970 first), I could look at it, but even if I could figure out how to adapt the method used with the 9980, which there is no guarantee I could do, or even that the strategy used with the 9980 can be applied, there would still be the problem of the blank editable config file needed.

I know there's a default_config.xml file in the firmware, but that's also encrypted on newer models, and I haven't found how to decrypt it yet, and in any case, that default_config.xml file is nothing like the config saved by the device, so even if someone finds the key and how to decrypt it, it's doubtful it could be used anyway.
Logged

kitzuser87430

  • Reg Member
  • ***
  • Posts: 432
Re: Getting extra DSL stats from TP-Link modem/routers
« Reply #64 on: February 21, 2016, 08:17:56 PM »

Thanks ejs...i will disconnect sometime this week, and use another modem; i will then reset and post a default config on a new thread.
Logged

kitzuser87430

  • Reg Member
  • ***
  • Posts: 432
Re: Getting extra DSL stats from TP-Link modem/routers
« Reply #65 on: February 25, 2016, 11:12:04 AM »

I have now reset and uploaded the default conf.bin.

http://forum.kitz.co.uk/index.php/topic,17108.0.html

Ian
Logged

kitz

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 33879
  • Trinity: Most guys do.
    • http://www.kitz.co.uk
Re: Getting extra DSL stats from TP-Link modem/routers
« Reply #66 on: March 13, 2016, 09:59:03 PM »

Update from ejs

The latest version of the StatPOSTer program is 20160306
http://ejs1920.users.sourceforge.net/StatPOSTer-20160306.jar

The new version has a choice of devices to target when encrypting a config file:
TD-W8970v1
TD-W9970 (as tested here)
TD-W9980
VR900 (untested)
Logged
Please do not PM me with queries for broadband help as I may not be able to respond.
-----
How to get your router line stats :: ADSL Exchange Checker

andyb2000

  • Just arrived
  • *
  • Posts: 3
Re: Getting extra DSL stats from TP-Link modem/routers
« Reply #67 on: December 12, 2016, 03:13:27 PM »

I'm trying to get some basic stats (including serial number) from my TD-W9970 and struggling, so I'm hoping it's something silly I'm doing that can be solved easily.

I'm using the following to try and retrieve the same info as the StatPOSTer java app, as I want to do this via shell scripts so using curl is a must. The command I'm using is:

Code: [Select]
curl -X POST -d '[IGD_DEV_INFO#0,0,0,0,0,0#0,0,0,0,0,0]0,0' --referer http://192.168.1.1/ --header "Cookie: Authorization=Basic `echo -n admin:admin | base64`" --header "Content-Type: text/plain; charset=UTF-8" "http://192.168.1.1/cgi?1&1"
But this constantly just returns "[error]71111"

I've tried several ways of providing the post data/binary, including it in a file and not, but none work, they all return the same. Using the statposter.jar it works fine, I can query "IGD_DEV_INFO" it returns the info I'm looking for.
Wireshark shows the post payload as:

Code: [Select]
[IGD_DEV_INFO#0,0,0,0,0,0#0,0,0,0,0,0]0,0\r\n
Which I've tried in the post data and data file without luck, can anyone spot the stupid mistake I'm making please?

Thanks!
Andy
Logged

ejs

  • Kitizen
  • ****
  • Posts: 2078
Re: Getting extra DSL stats from TP-Link modem/routers
« Reply #68 on: December 12, 2016, 04:59:02 PM »

The URL is incorrect but that doesn't actually matter, and the -X POST is unnecessary because curl automatically does a POST request if you specify -d.

The main trouble is with putting in the carriage return and new line characters into the data.

This should work:

Code: [Select]
curl -d $'[IGD_DEV_INFO#0,0,0,0,0,0#0,0,0,0,0,0]0,0\r\n' --referer http://192.168.1.1/ --header "Cookie: Authorization=Basic `echo -n admin:admin | base64`" --header "Content-Type: text/plain; charset=UTF-8" "http://192.168.1.1/cgi?1"
I abandoned doing anything with the TP-Link HTTP POST interface in favour of gaining proper telnet access.
Logged

andyb2000

  • Just arrived
  • *
  • Posts: 3
Re: Getting extra DSL stats from TP-Link modem/routers
« Reply #69 on: December 13, 2016, 09:08:20 AM »

Ahh! Thank you so much ejs, something so silly I'd missed it :-)

Working great now, thank you.
Logged

adslmax

  • Kitizen
  • ****
  • Posts: 1937
Re: Getting extra DSL stats from TP-Link modem/routers
« Reply #70 on: February 05, 2017, 08:11:30 PM »

Is there any chance of StatPOSTer program to work with TP Link VR600 please?

getting error:

2017.02.05 20:10:39 xDSL Stats (1st,Auto):
java.io.IOException: Server returned HTTP response code: 500 for URL: http://192.168.1.1/cgi?1&5
Logged

ejs

  • Kitizen
  • ****
  • Posts: 2078
Re: Getting extra DSL stats from TP-Link modem/routers
« Reply #71 on: February 05, 2017, 08:32:29 PM »

It often gives that error the first time, just try again.

Really though, the stats available using that method are limited and it's fairly unreliable, so that aspect of the program is deprecated. The program's main useful function now is for generating config files for gaining proper shell access. The CPU architecture of the VR600 is the same as the 9970, so the config file formatting might be the same.
Logged

adslmax

  • Kitizen
  • ****
  • Posts: 1937
Re: Getting extra DSL stats from TP-Link modem/routers
« Reply #72 on: February 05, 2017, 08:57:18 PM »

Still not working?

[attachment deleted by admin]

[attachment deleted by admin]
« Last Edit: February 05, 2017, 08:59:38 PM by adslmax »
Logged

burakkucat

  • Respected
  • Senior Kitizen
  • *
  • Posts: 38300
  • Over the Rainbow Bridge
    • The ELRepo Project
Re: Getting extra DSL stats from TP-Link modem/routers
« Reply #73 on: February 05, 2017, 09:15:32 PM »

Does the VR600 require you to enter a user name when logging in?  :-\

If no, just set the string in the "User name" box to null and try again.
Logged
:cat:  100% Linux and, previously, Unix. Co-founder of the ELRepo Project.

Please consider making a donation to support the running of this site.

adslmax

  • Kitizen
  • ****
  • Posts: 1937
Re: Getting extra DSL stats from TP-Link modem/routers
« Reply #74 on: February 05, 2017, 09:26:37 PM »

Bingo it working now. :)

The username have to be blank.

Code: [Select]
2017.02.05 21:24:08 xDSL Stats (1st,Auto):
[1,0,0,0,0,0]0
enable=1
status=Up
linkEncapsulationRequested=
linkEncapsulationUsed=G.993.2_Annex_K_PTM
modulationType=VDSL2
lineEncoding=
allowedProfiles=8a,8b,8c,8d,12a,12b,17a,30a
currentProfile=17a
X_TP_VDSLProfiles_8a=1
X_TP_VDSLProfiles_8b=1
X_TP_VDSLProfiles_8c=1
X_TP_VDSLProfiles_8d=1
X_TP_VDSLProfiles_12a=1
X_TP_VDSLProfiles_12b=1
X_TP_VDSLProfiles_17a=1
X_TP_VDSLProfiles_30a=0
dataPath=
interleaveDepth=0
lineNumber=0
upstreamCurrRate=19999
downstreamCurrRate=79999
upstreamMaxRate=28725
downstreamMaxRate=86088
upstreamNoiseMargin=151
downstreamNoiseMargin=67
upstreamAttenuation=128
downstreamAttenuation=68
upstreamPower=-2
downstreamPower=124
usNegBandPlanDiscPresentation=3
dsNegBandPlanDiscPresentation=3
SATNus=30,119,194,1023,1023
SATNds=88,151,247,1023,1023
LATNus=30,128,203,1023,1023
LATNds=68,152,247,1023,1023
SNRMarginus=152,151,151,-512,-512
SNRMarginds=68,66,68,-512,-512
transmitPowerUs=-153,-305,-4,-1281,-1281
transmitPowerDs=79,77,72,-1281,-1281
ATURVendor=
ATURCountry=
ATUCVendor=
ATUCCountry=
totalStart=14915
showtimeStart=14895
quarterHourStart=0
X_TP_Bitswap=On
X_TP_SRA=Off
X_TP_AdslModulationCfg=VDSL2
X_TP_AnnexType=Annex A
X_TP_SupportAdslMode=VDSL2:A;T1.413:A;G.lite:A;G.dmt:A;ADSL2:A,A/L;ADSL2+:A,M,A/L/M;Auto Sync-up:A,A/L,M,A/L/M
[1,0,0,0,0,0]1
receiveBlocks=0
transmitBlocks=0
cellDelin=0
linkRetrain=0
initErrors=0
initTimeouts=0
lossOfFraming=0
erroredSecs=0
X_TP_US_ErroredSecs=0
severelyErroredSecs=0
X_TP_US_SeverelyErroredSecs=0
FECErrors=525
ATUCFECErrors=87
HECErrors=0
ATUCHECErrors=0
CRCErrors=0
ATUCCRCErrors=22
ATUCSeverelyErroredSecs=0
[error]0

Logged
Pages: 1 ... 3 4 [5] 6 7 8
 

anything