Tried to revert to the original firmware on a DIN rail switch - ZMAI-90
See original GitHub issueWas able to successfully convert this device to Tasmota. However, as I expected, the metering features were not available. Before flashing I collected traces of the serial communication between the ESP8266 and the V8921 metering MCU, in an attempt to use the commands after the conversion, to retrieve the metering data. However, after reflashing, the V8921 does not respond to the commands. I assume that there must be initialization data sent during bootup which I was unable to collect.
In an attempt to put the device in the original state, I tried to use the backup generated by tuya-convert, and flash it using the NodeMCU PyFlasher. This resulted in the device entering an apparent loop condition, dumping what appears to be a repeating pattern of 21952 bytes through the serial port (at 115200 bps) - see attached file.
It there any obvious incorrection in the way the backup was reflashed? Here is the output of the command used for flashing (used NodeMCU PyFlasher):
Command: esptool.py --port COM3 --baud 115200 --after no_reset write_flash --flash_mode qio 0x00000 C:\Users\Luis\Documents\dev\home_automation\tasmota\zmai-90\firmware-xxxxxx.bin --erase-all
esptool.py v2.6
Serial port COM3
Connecting....
Detecting chip type... ESP8266
Chip is ESP8266EX
Features: WiFi
MAC: bc:dd:c2:xx:xx:xx
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 2MB
Erasing flash (this may take a while)...
Chip erase completed successfully in 2.3s
Flash params set to 0x0030
Compressed 1048576 bytes to 509810...
Wrote 1048576 bytes (509810 compressed) at 0x00000000 in 45.2 seconds (effective 185.6 kbit/s)...
Hash of data verified.
Leaving...
Staying in bootloader.
Firmware successfully flashed. Unplug/replug or reset device
to switch back to normal boot mode.
Is there eventually config data (e.g. in the EEPROM) that the backup doesn’t cover?
Thanks!
Issue Analytics
- State:
- Created 4 years ago
- Comments:19
That would explain it, the firmware is looking in the wrong place for the RF calibration data. Try explicitly setting flash size to 1MB with
esptool.py
when uploading.Just noticed also that
esptool.py
reported an auto-detected flash size of 2MB.tuya-convert
has only been designed and tested with 1MB devices.