ESP32 iBeacon Advertising

There’s recent example code for the M5StickC, usable on almost any ESP32 device, that shows how to advertise iBeacon. The nice thing about this example is that it also shows the iBeacon parameters on the OLED display.

While adding iBeacon advertising to an ESP32 project can make sense, it’s often not the best choice if you only want advertising functionality. Stand alone beacons are more physically robust, use much less power and settings are configurable via ready-made apps rather than fixed in code.

Bluetooth, LoRa and ESP32 Boards

The two main ways of detecting beacons are smartphone apps and gateways. If you need a more custom or self-contained solution it’s possible to use single board computers such as the Raspberry Pi or smaller embedded computer boards such as ESP32. ESP32 boards have WiFi and Bluetooth LE and can be programmed using the relatively simple Arduino platform.

ESP32 boards such as the WiFi Kit 32 provide an easy and inexpensive way to process Bluetooth LE signals for local processing or sending to other systems via an Internet connection. Some such as WiFi Lora 32 (V2) also have LoRa wireless that allows relaying information up to 15Km.

Track Bluetooth Low Energy Devices Using ESP32

ESP32 are small, low cost Bluetooth/WiFi boards that can be programmed using Arduino IDE. Shogunxam has a project, ESP32 BLETracker that detects Bluetooth LE devices and sends the information to a MQTT server.

The software provides a web interface that allows setting of the devices to be tracked, the scan period, MQTT parameters and viewing of the logs.

The project is open source on GitHub.

View Bluetooth Gateways

Bluetooth LE Supported on Zerynth

There’s a growing number of operating systems for microcontrollers on single board computers, most of which can scan for Bluetooth LE devices such as beacons and connect to them via GATT for setup and extraction of data. Zerynth is now one such OS that you can program using Python.
Zerynth r2.2.0 update allows use of Bluetooth LE.

There’s a new article on Design Bluetooth BLE Applications in Python on ESP32 using Zerynth. The official documentation provides lots of examples.