Add TL-WR844N router client - #167
Conversation
|
@DeadmaroZ-TLOTL Thank you for PR! It looks like overrides for get_firmware, get_status are mostly same with parrent methods. Also I see that https://github.com/AlexandrErohin/TP-Link-Archer-C6U/blob/main/test/test_client_c80.py#L326 has block 00000. Could you tell me what the response is that brakes get_firmware from TplinkC80Router? |
9cca1ff to
8c19b36
Compare
|
Thanks for checking. You are right about The response that breaks So the unmodified parent method calls That is why the subclass keeps only the plaintext handling in
|
|
@DeadmaroZ-TLOTL Does your router response anything for (13|1,0,0) ? And does your router response for any of these 33|1,1,0 , 33|2,1,0, 33|1,2,0, 33|2,2,0 ? |
|
I re-checked this against the live TL-WR844N v1.0 router today after the C80-style authorization. All of these requests do get an HTTP 200 response and the raw body starts with plaintext Instead the router returns a set of other blocks. The useful client data is consistently in On the live router this block currently contains the active clients; the other entries are empty/zero-filled. That is why I used |
|
@DeadmaroZ-TLOTL I think that some other routers may have same behavior with yours - so checking in support method only compatible with your router will limit the use of this client. I think would be great to combine your get_status and get_status from TplinkC80Router to provide compatibility to more routers. Could you run this code and post the output? |
|
I re-ran direct probes against the TL-WR844N. For But repeated direct probes for the same For the Wi-Fi requests: all four requests returned HTTP 200 / plaintext That is why I avoided the parent C80 Wi-Fi block parsing for WR844N. The useful client data I can consistently get is from the DHCP-style |
|
@DeadmaroZ-TLOTL Do these methods work good for your router? reboot, set_wifi, get_ipv4_status, get_ipv4_reservations, get_dhcp_leases, get_vpn_status ? |
|
I ran the exact two request groups from your snippet against the live TL-WR844N after C80-style authorization. The full First request groupResponse: There is no It also includes expected generic blocks like: Second request groupResponse: This one did return So the behavior seems a bit odd on this firmware: the router returns valid plaintext |
|
@DeadmaroZ-TLOTL Sorry for the delay. Thank you for testing. I tried to make a more universal client using the results of your testing and your code example. Could you please test these updates? dbe848d I created test branch for that |
|
@DeadmaroZ-TLOTL I have released v5.26.0 . Could you test it please? |
Summary
TplinkWR844NRouterclient for TL-WR844N v1.000000data blocks after C80-style authorizationTesting
PYTHONPATH=. ..\\..\\.venv_tplink\\Scripts\\python.exe -m unittest discover ./test(317 tests)1.10.0 Build 211011 Rel.66152n(4555)