Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OTA with BAD_CHECKSUM making device not responsible #208

Closed
camilorodegheri opened this issue Nov 6, 2016 · 8 comments · Fixed by #219
Closed

OTA with BAD_CHECKSUM making device not responsible #208

camilorodegheri opened this issue Nov 6, 2016 · 8 comments · Fixed by #219
Labels

Comments

@camilorodegheri
Copy link

Hi,

I've been testing the new changes with OTA and base64 and I haven't been able to successfully get it to work yet.

To report the current situation, when sending a ota (using @mrpace2 script) the device is issuing a 400 BAD_CHECKSUM, but rebooting and then not responding until hard reset.

I can provide the logs from serial and mqtt if needed.

Is there anyone working on this? Otherwise I can take a look at it and try to solve it.

@marvinroger
Copy link
Member

Can you test without base64? I think the base64 implementation is somehow broken.

@ghost
Copy link

ghost commented Nov 14, 2016

A pair of MQTT and serial logs would be great. Also, can you share your base64-encoded firmware and the matching firmware binary? Note that this is just for trying to help with the 400 BAD_CHECKSUM.

You must have sent an MD5 which is why Homie rebooted after the failed OTA attempt. Something went wrong during that reboot. This is probably unrelated to the triggering 400 BAD_CHECKSUM issue. See #204.

@marvinroger
Copy link
Member

@camilorodegheri Closing this, as the base64 OTA issue will be tracked here: #204

but rebooting and then not responding until hard reset

As @mrpace2 said, there's a known esp8266/Arduino issue. When you flash a firmware over Serial, calling ESP.restart() right after (which is done internally in Homie) hangs the ESP8266 the way you're experiencing it. However, if you power cycle the device after the flash, it will work restart without any issues.

So, as a rule of thumb: after you flash any sketch on the ESP8266, power cycle it once. There won't be any ESP.restart() issues after that. 😉

@marvinroger
Copy link
Member

@camilorodegheri but still, if you can provide the base64-encoded firmware and the matching firmware binary, it would be great.

@ghost
Copy link

ghost commented Nov 15, 2016

@marvinroger I was able to duplicate this issue. Now looking into it. Can you please reopen it?

@marvinroger marvinroger reopened this Nov 15, 2016
@ghost ghost mentioned this issue Nov 15, 2016
marvinroger pushed a commit that referenced this issue Nov 15, 2016
@marvinroger marvinroger reopened this Nov 15, 2016
@marvinroger
Copy link
Member

@camilorodegheri can you test again with the latest git rev?

@marvinroger
Copy link
Member

marvinroger commented Feb 7, 2017

@camilorodegheri any news?

@marvinroger
Copy link
Member

Closing as it seems to be resolved. Feel free to reopen if needed.

gorec2005 pushed a commit to gorec2005/homie-esp8266 that referenced this issue Jun 28, 2020
- Added "SAVE-Button
- Upgraded to ACE 1.2.6
- Added additional field, which shows name of the current edited File
- Reset upload path after uploading or creating a File (avoid confusion about which file is shown in editor)
- added the possibility, to run the editor completly from flash. When ace.js.gz or ace.js and the corresponding files are found on SPIFFS, the editor can be used in AP mode also.  Otherwise the files are searched on cloudflare like before.
- added all gzipped js-files in data directory
- added an exclude list, containing wildcards, telling which files should not be listed in the editor (to prevent deletion of needed files)
- minified the embedded HTML/Javascript with https://kangax.github.io/html-minifier/ before gzipping.  With all additions the resulting hex-code is now 700 bytes smaller
- embedded the plain html as documentation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants