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

Improvements for Arduino code #40

Open
xibriz opened this issue Apr 7, 2018 · 3 comments
Open

Improvements for Arduino code #40

xibriz opened this issue Apr 7, 2018 · 3 comments

Comments

@xibriz
Copy link
Contributor

xibriz commented Apr 7, 2018

I suggest the following improvements on your "boot as AP first" code.

  • Set the MQTT port to 1883 by default
  • In addition to the "Boot as AP on GPIO 0, add a "Clear EEPROM" function on another GPIO

And of course, FOTA :)

@roarfred
Copy link
Owner

roarfred commented Apr 8, 2018

(F)OTA is requested in #27, by using a specific MQTT message with a URL from where the device can download a new firmware. Are there better ways? like directly uploading a file from a browser, or are we then just making a mess having to parse multipart form-encoded content?

@xibriz
Copy link
Contributor Author

xibriz commented Apr 9, 2018

I have only been experimenting with FOTA a little while, but my preferred method is something like mosquitto_pub -t 'my/topic/update' -m 'http://my.local.webserver/firmware.bin'

This way the ESP only need to subscribe to one topic and download the .bin when asked to.

Your other proposal means that the ESP need to run as a WebServer, and I guess the code would need to be a bit more complicated.

@roarfred
Copy link
Owner

There is an implementation that is very close to your suggestion in a project I did a while ago here: https://github.com/xnsense/xns-client/blob/master/xnsclient.cpp#L350

roarfred added a commit that referenced this issue Apr 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants