1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/pkg/nimble/autoadv
Hendrik van Essen fe4f0a69ee sys/nimble_autoadv: add new module
module for automated bluetooth advertising
2020-11-05 10:53:21 +01:00
..
include sys/nimble_autoadv: add new module 2020-11-05 10:53:21 +01:00
Makefile sys/nimble_autoadv: add new module 2020-11-05 10:53:21 +01:00
nimble_autoadv.c sys/nimble_autoadv: add new module 2020-11-05 10:53:21 +01:00
README.md sys/nimble_autoadv: add new module 2020-11-05 10:53:21 +01:00

NimBLE automated advertisements

Module for automated bluetooth advertising. Advertising is restarted on disconnect events automatically. Defaults to the following characteristics: - General discoverable mode (BLE_GAP_DISC_MODE_GEN) - Undirected connectable mode (BLE_GAP_CONN_MODE_UND) - No expiration (BLE_HS_FOREVER) - No name

It can be enabled by adding

USEMODULE += nimble_autoadv

to your makefile.

If your application is calling functions from nimble, e.g. ble_svc_gap_device_name_set(), NIMBLE_AUTOADV_START_MANUALLY should be set to 1 with the following line in your Makefile:

CFLAGS += -DNIMBLE_AUTOADV_START_MANUALLY=1

Then the application should call nimble_autoadv_adv_start() after all of its nimble calls to prevent errors like BLE_HS_EBUSY.

To specify a device name add the following line to your Makefile:

CFLAGS += -DNIMBLE_AUTOADV_DEVICE_NAME='"Riot OS device"'