https://toitlang.org/ logo
Fundamentally, we have two issues:
# general
f
Fundamentally, we have two issues: - how to get the data to update the device, and - how to manage what firmware runs on the devices. (continuing in a thread).
The OTA tutorial should show that Toit is very flexible on how to get data.
We even had a version of Artemis that was pulling the OTA bytes through MQTT, but I removed it, as MQTT servers are really bad at handling these big blobs of data.
Personally, I prefer HTTP over MQTT. MQTT always claims to be simple, but once you have to actually deal with lost packets, etc. it becomes a nightmare.
HTTP relies on TCP/IP for reliability, and MQTT mixes these things up.
Fwiw, fetching firmware over HTTP and not HTTPS is definitely possible. I would then run a checksum to ensure that the data was tempered with, but there is no requirement to get OTA data over https.
The tutorial even uses http IIRC.
The second question is then how to manage firmware for lots of devices.
Artemis is basically our answer to that.
It is based on Supabase, but the core ideas are not service specific.
In fact, I have a TODO item that allows Artemis to use GitHub pages or Cloudflare as backend.
At the moment Artemis devices report back on what their current status is, but that feature isn't a requirement and static pages (GitHub pages) would work as well.
I'm of the opinion that an OTA management system should be independent of a health system. If I want to know how devices are doing, then that should be done independently of the firmware. This keeps the firmware update mechanism simpler and more resilient.
Having a system that just fetches http(s) data for updates makes the servers very simple.
Artemis currently uses an edge-function, but, again, that's not a requirement, and is something I would like to play with.
3 Views