alexanderlavrushko / BLEProof-collection

Example of complete BLE application: Central and Peripheral for Android, iOS, ESP32, Arduino Nano 33
124 stars 39 forks source link
android ble bluetooth-low-energy central esp32-arduino ios peripheral sample-application

BLEProof-collection

Collection of sample Bluetooth Low Energy applications for iOS, Android, ESP32 and Arduino Nano 33 IoT.

What they do

The apps implement basic BLE communication:

Each BLE Central is compatible with each BLE Peripheral, because they use the same service and characteristics UUIDs.

Screenshots

Android BLE Central iOS BLE Peripheral
Screenshot Android Central Screenshot iOS Peripheral

ESP32 BLE Peripheral (Arduino Serial Monitor)

Screenshot of ESP32 BLEProofPeripheral

How to run

To run and see it working, you need 2 physical devices supporting Bluetooth Low Energy:

...and some development tools:

Supported devices

Platform Peripheral Central Notes
Android YES YES Android 5.0 and newer, including Android 12
iOS YES YES iOS 11.0 and newer
ESP32 YES YES
Arduino Nano 33 YES YES Tested on Arduino Nano 33 IoT, but should work on any board compatible with ArduinoBLE library

Table of UUIDs

Name UUID
Service 25AE1441-05D3-4C5B-8281-93D4E07420CF
Characteristic for read 25AE1442-05D3-4C5B-8281-93D4E07420CF
Characteristic for write 25AE1443-05D3-4C5B-8281-93D4E07420CF
Characteristic for indicate 25AE1444-05D3-4C5B-8281-93D4E07420CF

BLE Peripheral (all platforms)

Peripheral (also called Slave or Server) works similarly on all platforms:

Note 1: technically characteristics can have any amount of permissions (read, write default, write without response, notify, indicate), but in this project each characteristic has only one permission for simplicity.

Note 2: indication is a notification with response - Peripheral notifies, Central confirms that notification received.

BLE Central (all platforms)

Central (also called Master or Client) works similarly on all platforms:

Recommended resources

Android BLE (usually articles cover only BLE Central role):

Android BLE Peripheral role (less popular topic):

iOS:

BLE utility apps

LightBlue: for iOS, for Android

BLE Scanner: for iOS, for Android