Skip to content

Commit fe28cd7

Browse files
danicamporadpgeorge
authored andcommitted
zephyr/modbluetooth_zephyr: Allow BLE to create services at runtime.
This commit adds the required functionality for a peripheral to create services at runtime, using `BLE.register_services()`. The feature is enabled on the nrf52840dk_nrf52840 board. Note that the `CONFIG_BT_GATT_ENFORCE_SUBSCRIPTION=n` option must be used so that BLE notifications/indications can be sent even if not subscribed. Signed-off-by: danicampora <[email protected]>
1 parent 1b12357 commit fe28cd7

File tree

2 files changed

+604
-12
lines changed

2 files changed

+604
-12
lines changed

ports/zephyr/boards/nrf52840dk_nrf52840.conf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
CONFIG_NETWORKING=n
22
CONFIG_BT=y
33
CONFIG_BT_DEVICE_NAME_DYNAMIC=y
4+
CONFIG_BT_GATT_DYNAMIC_DB=y
45
CONFIG_BT_PERIPHERAL=y
56
CONFIG_BT_CENTRAL=y
7+
CONFIG_BT_GATT_CLIENT=y
8+
CONFIG_BT_L2CAP_TX_MTU=252
9+
CONFIG_BT_BUF_ACL_RX_SIZE=256
10+
CONFIG_BT_GATT_ENFORCE_SUBSCRIPTION=n
611

712
CONFIG_MICROPY_HEAP_SIZE=98304
813
CONFIG_MAIN_STACK_SIZE=8192

0 commit comments

Comments
 (0)