Press "Enter" to skip to content

BitFlash_Client – Open Source FOTA for Everyone

Last week Prakriti & I created BitFlash_Client which is now officially a part of the Arduino Library Registry. You can try out the library and let us know if you liked it and if you have any feedback we’d love to hear you out. Also if you’re interested in contributing to the project we’re up for that too (we are planning on continuing this project past the hackathon stage).

So what is BitFlash_Client?

BitFlash_Client allows embedded devices to check for firmware updates in the background and update and reboot themselves once a new firmware is detected. All this is done by checking a hosted .json file for new updates.

Flashing code again and again onto an embedded device is a pain and fellow IoT developers will agree that not only is it tiresome but when you’re working with a network of these devices and you have to change the firmware running on multiple devices it really just gets very very annoying.

What is FOTA?

FOTA – Firmware Over The Air is a technology is the underlying concept of BitFlash_Client which allows IoT devices to download new firmware and reflash the new firmware onto themselves wirelessly without human intervension. Mostly WiFi is used for downloading firmware updates as radio communication doesn’t have enough bandwidth to support firmware transfers in a realistic scenario.

What are the features of BitFlash_Client?

  1. All firmwares can be updated by a single git push as the binaries are hosted on the user’s github itself.
  2. You can deploy multiple firmwares at once.
  3. You can set the delay between 2 consecutive checks for new firmware.

BitFlash_Client started out as a hackathon project and for testing and deployment we needed to see if the embedded device (in our case an ESP32) was able to check for updates on a hosted .json file, if yes then the .json file would point towards the url from where the device could download the binary for the firmware.

Now this means 2 things need to be hosted here:

  1. .json file – where you will check for the version of the firmware
  2. .bin file – from where you will download the firmware

Since this is a solution targets at making things simpler we decided to offer a combined solution – An electronjs app for managing and monitoring the devices, a webserver hosting the .json file, and BitFlash_Client.

We were struck with one question – where to host the compiled binaries?

Because if we we’re to host them on the same server as the .json file it would mean we would first have to bring the binaries from the user’s github repository after every git push. This seemed too complicated of a solution which we wouldn’t have time to complete so we opted for a cheeky solution – let the binaries be hosted on the user’s github itself and simply point to the repo from the .json file.

Not only did this save us a lot of time but also made sure that binaries would be instantly available as soon as a git push was performed.

So what’s left?

Unfortunately we were unable to finish all the features we had planned out but we are going to finish them soon.

  1. Perform shell scripting in the electronjs app to compile all binaries from code automatically.
  2. Minor bug fixes in BitFlash_Client
  3. Configure github auth to allow private repo access.

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *