hn / ginlong-solis

Solis inverter ESP8266 data logger, S3 WiFi stick reverse engineering and ESPhome firmware
90 stars 16 forks source link

ltchiptool upload error "Not a valid FlashMode" #30

Closed isu-r closed 6 months ago

isu-r commented 6 months ago

Hello,

I successfully dumped the original firmware from the Datalogger Model S3 and have been experimented with various codes using PlatformIO. Uploading codes to the chip has been smooth without any issues.

But, I encountered an error when attempting to flash the firmware file generated using ESPHome as the instructions. As I'm new to ESPHome, Screenshot_4 I hope this data is enough for troubleshooting.

Thank you!

hn commented 6 months ago

Don't know what 'Not a valid FlashMode' means, you'll have to ask the ltchiptool maintainers. I never experienced that kind of error.

Maybe it's an option to flash the XIP binaries (choose 'Download OTA1/2 XIP image' within ESPHome) like this (not tested at all!):

$ ltchiptool flash write -d /dev/ttyUSB0 -f realtek-ambz -s 0xb000 solis-emw3080-0x00B000.bin
$ ltchiptool flash write -d /dev/ttyUSB0 -f realtek-ambz -s 0x100000 solis-emw3080-0x100000.bin
isu-r commented 6 months ago

Don't know what 'Not a valid FlashMode' means, you'll have to ask the ltchiptool maintainers. I never experienced that kind of error.

Maybe it's an option to flash the XIP binaries (choose 'Download OTA1/2 XIP image' within ESPHome) like this (not tested at all!):

$ ltchiptool flash write -d /dev/ttyUSB0 -f realtek-ambz -s 0xb000 solis-emw3080-0x00B000.bin
$ ltchiptool flash write -d /dev/ttyUSB0 -f realtek-ambz -s 0x100000 solis-emw3080-0x100000.bin

Hello. Thank you for the reply! I had tried flashing using this method, but it didn't work properly. After multiple attempts, I rewrote the original dump, but it also failed. After several rounds of testing, I found that I needed to write:

1st original dump, 2nd solis-emw3080-0x100000.bin, 3rd solis-emw3080-0x00B000.bin.

Now it is working :)

I also need to mention that the firmware didn't find and connect to hidden networks; it only connects to networks that broadcast SSID