Raghav Garg's Arduino Library Offers a BLE Twist on Updating Espressif's ESP32 Chips Over the Air

Library provides for wireless, short-range updates — or can serve as a channel for remote control, if you'd prefer.

Gareth Halfacree
2 months agoHW101 / Internet of Things

Developer Raghav Garg has released an Arduino library for over-the-air (OTA) firmware updates on Espressif ESP32-based devices, which comes with a twist: the updates take place over short-range Bluetooth Low Energy (BLE) links.

"Updating firmware on [Espressif] ESP32 devices can often be tricky — especially when your boards are deployed in the field or don't have easy USB access," Garg writes of the library's focus. "Traditionally, most developers rely on Wi-Fi-based OTA updates, but what if your project doesn't always have Wi-Fi? This Arduino-compatible library allows you to upload new firmware wirelessly via Bluetooth, making updates simple, reliable, and flexible."

The classic way to flash new firmware onto a microcontroller is, of course, to plug it into something — either over USB or via a programming device linked to a dedicated header on the board, or for the oldest-school of circuits by popping the microcontroller or its discrete flash storage chip out and putting it in a dedicated writer.

Over-the-air updates are different, occurring as they do over a wireless link. For devices with wide-area connectivity, like smartphones and Internet of Things (IoT) projects, that can mean the ability to update firmware from across the continent — or world. Garg's vision is a little shorter-range than that, making use of the Bluetooth Low Energy (BLE) connection on many Espressif ESP32 devices.

"Besides firmware updates," Garg notes, "you can also use the Command Characteristic to send simple instructions from your client to the ESP32. For example, you might send commands like turn on or turn off the motor [or] toggle LED."

The library is available on GitHub under the permissive MIT license.

Gareth Halfacree
Freelance journalist, technical author, hacker, tinkerer, erstwhile sysadmin. For hire: freelance@halfacree.co.uk.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles