Gosund WP5

From Leo's Notes
Revision as of 02:48, 8 May 2021 by Leo (talk | contribs)
This page was last edited on 8 May 2021, at 02:48.

The Gosund WP5 is a cheap smart plug. Internally, it uses the ESP8285 chip. Before you buy these, be aware that you cannot load Tasmota over the air at the moment (if ever) because most (all?) new smart plugs that utilizes the Tuya platform are now assigned a randomized PSK key from the factory and is not compatible with Tasmota-Convert.

Tinkering

Open the WP5 by prying on the back side of the plug, separating the outer casing from the inner circular plate. Try not to rip the side casing; minor bends and distortions can be repaired with a heat gun.

To connect to the ESP8285, connect TX to RX and vice versa via a shift level to a USB UART. Connect 3.3v power using the 3v3 pad and ground to the metal shielding. Enter flash mode by grounding IO0 during power on.

Dumping firmware

Trying to dump the firmware with esptool, but am getting this issue:

$ python -m esptool --port /dev/ttyUSB0 --chip auto read_flash  0 0x100000 firmware.bin
esptool.py v3.0
Serial port /dev/ttyUSB0
Connecting........_____....._
Detecting chip type... ESP8266
Chip is ESP8285
Features: WiFi, Embedded Flash
Crystal is 26MHz
MAC: c4:dd:57:0d:2c:de
Uploading stub...
Running stub...
Stub running...
1048576 (100 %)
1048576 (100 %)
 
A fatal error occurred: Digest mismatch: expected 9B60686A442B0A68591CFB54D28B867B, got 458345CAB9C61F97AAB45943ED64C234

Trying again at 9600 baud.

Troubleshooting

Esptool cannot connect

When trying to dump the firmware from the ESP, I kept on getting this error message:

Unsupported Command Error received. Probably this means Secure Download Mode is enabled, autodetection will not work. Need to manually specify the chip.

After trying a few more times, it started working. It is most likely a sketchy connection that's causing this issue. Ensure the TX/RX pins are connected securely.

See Also