It's been great switching to a WiFi module where I actually have a good degree of control over the firmware it runs. I've spent quite a bit of time over the past couple of weeks building the firmware management system for Mirobot and it's now at a point I'm pretty pleased with. I've taken the following approach:
- Check for a new release on GitHub releases
- Update the flash by making a POST request to the relevant HTTP endpoint
- I then read back the flash in that segment and compare it to make sure it's written properly
- I then do another POST request with a GET parameter present which does the actual switch to the new firmware or flashes the Arduino
The nice thing is that most of the logic is running in Javascript in the browser which means I can keep the firmware simpler. I'm running a custom bootloader (rboot) that someone in the community developed which lets me allocate a couple of large slots for the main firmware, one for the UI web pages and one for the Arduino firmware.
The other thing I'm pretty happy with is that it runs a captive portal so when you join the built-in network it routes all DNS requests to itself which makes a modern OS pop up a window with the control UI in it so you can configure the WIFi easily. It also means you can just open any web address in your browser and you'll get the Mirobot control interface. Much easier than trying to explain IP addresses to 7 year olds! I'm also hoping to add in support for Zeroconf to make it even easier to find.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.