softScheck / tplink-smartplug

TP-Link WiFi SmartPlug Client and Wireshark Dissector
Apache License 2.0
1.15k stars 297 forks source link

Set mac address #78

Open wecoy76 opened 4 years ago

wecoy76 commented 4 years ago

I have several hs100 plugs. Some of them were bricked when they ran out of power during a software upgrade. I copied the dump file from the correct device to the bricked. The faulty plugs becomes operable, but the PROBLEM is that now everyone has the same mac address and cannot work on the same network. I tried to set the mac address with the command:

tplink_smartplug.py -t <192.168...> {"system": {"set_mac_addr": {"mac": "50-C7-BF-01-02-03"}}}

but without success. Command for on off is working with some change like this:

tplink_smartplug.py -t <192.168...> {\"system\": {\"set_relay_state\": {\"state\":0}}}

but set_mac don't

Please help

whitslack commented 3 years ago

The device reports its own MAC address in the get_sysinfo return value using colons, not hyphens. Have you tried set_mac_addr with colons in the hex string instead of hyphens?