Bluetooth: Peripheral_general
Overview
Application demonstrating the BLE Peripheral role. It has several vendor-specific GATT services that it exposes, which can send data to remote device via notification or indication . It also shows how to exchange mtu function as peripheral role.
#define BT_UUID_SERVICE 0xFFF0
#define BT_UUID_CHAR_READ_WRITE 0xFFF1
#define BT_UUID_CHAR_INDCIATE 0xFFF2
#define BT_UUID_CHAR_NOTIFY 0xFFF3
Requirements
A board with Bluetooth Low Energy support
Building and Running
examples/bluetooth/peripheral_general
compile, burn, and more, see get-started chapter 。
Running result
I/bt_smp [0.078] LE SC enabled
I/bt_hci_core [0.212] No ID address. App must call settings_load()
I/peripheral [0.218] Bluetooth initialized
I/bt_hci_core [0.284] Identity: 28:6D:CE:01:02:03 (public)
I/bt_hci_core [0.290] HCI: version 4.2 (0x08) revision 0x0709, manufacturer 0x070c
I/bt_hci_core [0.298] LMP: version 4.2 (0x08) subver 0x0709
I/peripheral [0.538] peripheral service ready