joonazan / nina-fast-bluetooth

Bluetooth on the ESP32 coprocessor of your Arduino MKR Wifi 1010!
MIT License
6 stars 0 forks source link

Fast Bluetooth on Arduino MKR Wifi 1010

The stock ArduinoBLE library does all the bluetooth logic on the main processor and makes the ESP32 of the NINA-W102 just forward all communication to the bluetooth unit.

BLE.poll() may wait as long as the connection interval. This wastes all the processing power the ARM core has to offer.

One could make the existing implementation asynchronous. Instead, this project aims to do as much of the bluetooth logic on the ESP32 as possible. The main processor shall only tell the coprocessor when some characteristic should change.

This is an Arduino library, but to use it, you need to first flash the NINA coprocessor with my software, as most of the bluetooth code runs on the NINA.

Flashing on Linux

Now code using the library should work on your board. If you later decide to use the stock Wifi or bluetooth libraries, you need to flash the stock firmware via the WiFiNINA Firmware Updater.

Developing the library

You can open a serial monitor into the NINA with make monitor. It even shows stack traces!