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

Add configuration to allow OTA updates #41

Merged
merged 2 commits into from
May 1, 2023

Conversation

sabeechen
Copy link
Contributor

This adds some configuration I've been using for development, OTA uploading of the firmware and filesystem, because I frequently have my E-TKT physically distant from my development computer and also the soldering on my USB connector is not super rock solid. I figured it might be useful for anyone else developing on this project in the future. OTA is accomplished by:

  • Enabling a #define in the optional configuration, which causes AsyncElegentOTA to hook into the webserver
  • Adding mDNS config for the e-tkt
  • Adding a special platformio target "upload-ota" that uploads firmware/filesystem over WiFi

To accomplish seamless upload, I've also configured the E-TKT to advertise itself and its webserver over mDNS along with some unique service text data in case anyone wants to automatically identify with automatic network discovery in the future. The OTA upload script then uses the mDNS address to find the device, but of it can also be specified by IP address by modifying platformio.ini. I've found the mDNS lookup works well on Windows and Linux, which is likely sufficient for development purposes. MacOS is likely to also work but I can't test it.

To try out using OTA, you'd do the following:

  • Uncomment #define OTA_ENABLED in optConfig.cpp
  • Connect the E-TKT over usb, and upload using either the default platformio environment or upload-serial
  • Disconnect USB
  • Change plaformio target to upload-ota
  • Enjoy wireless uploading of firmware and filesystem data.

Once enabled, you can also visit http://e-tkt.local/update to manually upload firmware/filesystem binaries.

@andreisperid andreisperid merged commit 231b471 into andreisperid:main May 1, 2023
@andreisperid
Copy link
Owner

That's cool @sabeechen , thank you very much!

Now I'm thinking of adding a "update" button on setup that might lead to that page.

@andreisperid andreisperid modified the milestones: v1.3.0, v1.2.0 May 4, 2023
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

Successfully merging this pull request may close these issues.

2 participants