This is the simplest example demonstrating NimBLEStreamServer. It echoes back any data received from BLE clients.
- Minimal code showing essential NimBLE Stream usage
- Echoes all received data back to the client
- Uses default service and characteristic UUIDs
- Perfect starting point for learning the Stream interface
- Initializes BLE with minimal configuration
- Creates a stream server with default UUIDs
- Waits for client connection and data
- Echoes received data back to the client
- Displays received data on Serial monitor
- Service:
0xc0de - Characteristic:
0xfeed
- Upload this sketch to your ESP32
- Connect with a BLE client app (nRF Connect, Serial Bluetooth Terminal, etc.)
- Find the service
0xc0deand characteristic0xfeed - Subscribe to notifications
- Write data to the characteristic
- The data will be echoed back and displayed in Serial monitor
- Learning the basic NimBLE Stream API
- Testing BLE connectivity
- Starting point for custom applications
- Understanding Stream read/write operations