esp-nimble-cpp 2.0.0
|
Extended advertising allows for much more capability and flexibility.
Extended advertising is supported when enabled with the config option CONFIG_BT_NIMBLE_EXT_ADV
set to a value of 1. This is done in menuconfig under Component config > Bluetooth > NimBLE options > Enable extended advertising
, or set in nimconfig.h
for Arduino, or in build_flags
in PlatformIO.
When enabled the following will occur:
NimBLEScan::start
method will scan on both the 1M PHY and the coded PHY standards automatically.NimBLEClient::connect
will use the primary PHY the device is listening on, unless specified (see below).NimBLEClient::setConnectPhy
becomes available to specify the PHY's to connect with (default is all).NimBLEAdvertising
is no longer available for use and is replaced by NimBLEExtAdvertising
. NimBLEDevice::getAdvertising
will now return an instance of NimBLEExtAdvertising
.NimBLEAdvertisementData
is no longer available for use and is replaced by NimBLEExtAdvertisement
. This new class is where everything about the advertisement is configured, including the advertisement intervals and advertisement ended callback.