Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Signal strength data #14

Open
fayeinmay opened this issue Feb 19, 2024 · 18 comments
Open

Signal strength data #14

fayeinmay opened this issue Feb 19, 2024 · 18 comments

Comments

@fayeinmay
Copy link

Hi,

I was wondering if it is possible to get the signal strength data of wifi devices somehow?

image

@AlexandrErohin
Copy link
Owner

Hi
Could you check what route is used to open this router's page?
go to browser's Inspect window > Network tab

@fayeinmay
Copy link
Author

I think by route you're referring to the URL? It would be http://192.168.0.1/webpages/index.html?t=ea3f7fe8#networkMap

image

@AlexandrErohin
Copy link
Owner

Could you clear logs, select XHR and again go to wifi clients page?

@fayeinmay
Copy link
Author

image

@AlexandrErohin
Copy link
Owner

could you run this script and post the results?

from tplinkrouterc6u import TplinkRouter
from logging import Logger

client = TplinkRouter('192.168.0.1', 'yourPassword', logger=Logger('test'))
client.authorize()
print(client.request('admin/smart_network?form=game_accelerator'))
print('---')
print(client.request('admin/wireless?form=statistics'))

@fayeinmay
Copy link
Author

fayeinmay commented Feb 19, 2024

Seems like it's not the game_accelerator stuff.

None
---
[{'mac': 'E8-6B-EA-E2-FE-54', 'type': '2.4GHz', 'encryption': 'none', 'rxpkts': 1053459, 'txpkts': 12850}, {'mac': 'B4-6D-C2-C5-56-29', 'type': '2.4GHz', 'encryption': 'none', 'rxpkts': 41330698, 'txpkts': 82594429}, {'mac': 'C8-C9-A3-25-73-77', 'type': '2.4GHz', 'encryption': 'none', 'rxpkts': 1048029, 'txpkts': 1151859}, {'mac': '00-20-00-D0-68-84', 'type': '2.4GHz', 'encryption': 'none', 'rxpkts': 1056904, 'txpkts': 19688}, {'mac': 'C4-3C-B0-62-FF-50', 'type': '2.4GHz', 'encryption': 'none', 'rxpkts': 5126109, 'txpkts': 8288635}, {'mac': 'D8-C0-A6-D5-B4-65', 'type': '2.4GHz', 'encryption': 'none', 'rxpkts': 1071864, 'txpkts': 25588}, {'mac': '48-55-19-D9-54-EA', 'type': '2.4GHz', 'encryption': 'none', 'rxpkts': 1048167, 'txpkts': 1310477}, {'mac': '38-42-0B-9A-96-6E', 'type': '5GHz', 'encryption': 'none', 'rxpkts': 1106431, 'txpkts': 359367}, {'mac': '48-22-54-1C-48-E0', 'type': '5GHz', 'encryption': 'none', 'rxpkts': 1386410, 'txpkts': 118530}, {'mac': '72-63-88-15-2E-D3', 'type': '5GHz', 'encryption': 'none', 'rxpkts': 1069875, 'txpkts': 24724}]

@AlexandrErohin
Copy link
Owner

Could you post the request to admin/smart_network?form=game_accelerator that you catched in browser?
In screenshot you have opened Headers, please copy info from Request tab

@fayeinmay
Copy link
Author

fayeinmay commented Feb 19, 2024

sign=5406c3ae9f55dde5d205d1216c539fc2a74143444c6e1a37976f586a45bc3ba309da8493d3365fc0f51ce48b092e078d7cbe992c55493b3c5968897b1dd36b57&data=dYR8YXE6DmK6a6QQn2UyNqYhTcxRrLDnhuwP3HOK4o0=

@AlexandrErohin
Copy link
Owner

there is the wrong characters in the end of your string

@fayeinmay
Copy link
Author

Weird. I corrected the comment.

@AlexandrErohin
Copy link
Owner

Try this one

from tplinkrouterc6u import TplinkRouter
from logging import Logger

client = TplinkRouter('192.168.0.1', 'yourPassword', logger=Logger('test'))
client.authorize()
print(client.request('admin/smart_network?form=game_accelerator', 'operation=load')

@fayeinmay
Copy link
Author

Output was None

@gordonaspin
Copy link
Contributor

you need "operation=loadDevice"

from tplinkrouterc6u import TplinkRouter
from logging import Logger

client = TplinkRouter('192.168.0.1', 'yourPassword', logger=Logger('test'))
client.authorize()
print(client.request('admin/smart_network?form=game_accelerator', 'operation=loadDevice')

it returns an array:

[{
        "index": 22,
        "trafficUsage": 12581880,
        "deviceType": "other",
        "remainTime": 0,
        "deviceName": "device-name",
        "key": "446132B6F7CE",
        "uploadSpeed": 0,
        "onlineTime": 164152.82,
        "mac": "44-61-32-B6-F7-CE",
        "downloadSpeed": 0,
        "enablePriority": False,
        "txrate": 433333,
        "ip": "192.168.0.219",
        "rxrate": 433333,
        "timePeriod": -1,
        "deviceTag": "5G",
        "signal": -52
    },
]

@AlexandrErohin
Copy link
Owner

@gordonaspin Thank you!

@gordonaspin
Copy link
Contributor

It's a pain. You have to decode the operation. The way I do it is put a breakpoint on the XHR matching the URL and a breakpoint on the decryptData function and use the console to call the decryptData function with the encrypted post data. Is there a better way ? I was thinking maybe to write a proxy server as a man-in-the-middle.

@AlexandrErohin
Copy link
Owner

@gordonaspin yeah, I do the same

@growtopiajaw
Copy link

sign=5406c3ae9f55dde5d205d1216c539fc2a74143444c6e1a37976f586a45bc3ba309da8493d3365fc0f51ce48b092e078d7cbe992c55493b3c5968897b1dd36b57&data=dYR8YXE6DmK6a6QQn2UyNqYhTcxRrLDnhuwP3HOK4o0=

Is it possible to decode this string?

@AlexandrErohin
Copy link
Owner

Added Signal strength for WIFI device in version 5.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants