Skip to content

Commit 6824e1a

Browse files
authored
Update for new TDDP client version
1 parent 448cc28 commit 6824e1a

1 file changed

Lines changed: 12 additions & 3 deletions

File tree

README.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Copy [tplink-smarthome.lua](tplink-smarthome.lua) into:
6363
A proof-of-concept python client to talk to a TP-Link device using the **TP-Link Device Debug Protocol (TDDP)**.
6464

6565
TDDP is implemented across a whole range of TP-Link devices including routers, access points, cameras and smartplugs.
66-
TDDP can read and write a device's configuration and issue special commands. On the HS110 SmartPlug it uses UDP port 1040, but might use different ports on other devices.
66+
TDDP can read and write a device's configuration and issue special commands. UDP port 1040 is used to send commands, replies come back on UDP port 61000. This client has been tested with a TP-Link Archer C9 Wireless Router and a TP-Link HS-110 WiFi Smart Plug.
6767

6868
TDDP is a binary protocol documented in patent [CN102096654A](https://www.google.com/patents/CN102096654A?cl=en).
6969

@@ -72,8 +72,17 @@ Data is returned DES-encrypted and requires the username and password of the dev
7272

7373
#### Usage ####
7474

75-
`./tddp-client.py -t <ip> -u username -p password -c [test1|test2|test3]`
75+
`./tddp-client.py -t <ip> -u username -p password -c 0A`
7676

7777
Provide the target IP using -t. You can provide a username and password, otherwise admin/admin is used as a default. They are necessary to decrypt the data that is returned.
7878

79-
Only three basic data readout commands (`test1, test2, test3`) are implemented. They are named test since it is unclear what type of data they might read out on different type of devices.
79+
Provide the command as a two-character hex string, e.g. -c 0A. What type of data a command might read out will be different for various TP-Link devices.
80+
81+
#### Example ####
82+
Reading out the WAN link status on an Archer C9 in default configuration shows the link is down (0):
83+
```
84+
./tddp-client.py -t 192.168.0.1 -c 0E
85+
Request Data: Version 02 Type 03 Status 00 Length 00000000 ID 0001 Subtype 0e
86+
Reply Data: Version 02 Type 03 Status 00 Length 00000018 ID 0001 Subtype 0e
87+
Decrypted: wan_ph_link 1 0
88+
```

0 commit comments

Comments
 (0)