BLEAdvertising¶
Perform and manage BLE advertising.
詳細情報¶
メンバー¶
BLEAdvertising()¶
Construct a default advertising object.
BLEAdvertising::BLEAdvertising()
addServiceUUID()¶
Add a service uuid to exposed list of services.
void BLEAdvertising::addServiceUUID(BLEUUID serviceUUID)
引数
- BLEUUID
serviceUUID
The UUID of the service to expose.
addServiceUUID()¶
Add a service uuid to exposed list of services.
void BLEAdvertising::addServiceUUID(const char *serviceUUID)
引数
- constchar *
serviceUUID
The string representation of the service to expose.
start()¶
Start advertising. Start advertising.
void BLEAdvertising::start()
stop()¶
Stop advertising. Stop advertising.
void BLEAdvertising::stop()
setAppearance()¶
Set the device appearance in the advertising data. The appearance attribute is of type 0x19. The codes for distinct appearances can be found here: .
void BLEAdvertising::setAppearance(uint16_t appearance)
引数
- uint16_t
appearance
The appearance of the device in the advertising data.
setMaxInterval()¶
void BLEAdvertising::setMaxInterval(uint16_t maxinterval)
引数
- uint16_t
maxinterval
setMinInterval()¶
void BLEAdvertising::setMinInterval(uint16_t mininterval)
引数
- uint16_t
mininterval
setAdvertisementData()¶
Set the advertisement data that is to be published in a regular advertisement.
void BLEAdvertising::setAdvertisementData(BLEAdvertisementData &advertisementData)
引数
- BLEAdvertisementData&
advertisementData
The data to be advertised.
setScanFilter()¶
Set the filtering for the scan filter.
void BLEAdvertising::setScanFilter(bool scanRequertWhitelistOnly, bool connectWhitelistOnly)
引数
- bool
scanRequertWhitelistOnly
- bool
connectWhitelistOnly
If true, only allow connections from those on the white list.
setScanResponseData()¶
Set the advertisement data that is to be published in a scan response.
void BLEAdvertising::setScanResponseData(BLEAdvertisementData &advertisementData)
引数
- BLEAdvertisementData&
advertisementData
The data to be advertised.
setPrivateAddress()¶
void BLEAdvertising::setPrivateAddress(esp_ble_addr_type_t type=BLE_ADDR_TYPE_RANDOM)
引数
- esp_ble_addr_type_t
type
setDeviceAddress()¶
Set BLE address.
void BLEAdvertising::setDeviceAddress(esp_bd_addr_t addr, esp_ble_addr_type_t type=BLE_ADDR_TYPE_RANDOM)
引数
- esp_bd_addr_t
addr
- esp_ble_addr_type_t
type
handleGAPEvent()¶
void BLEAdvertising::handleGAPEvent(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param_t *param)
引数
- esp_gap_ble_cb_event_t
event
- esp_ble_gap_cb_param_t*
param
setMinPreferred()¶
void BLEAdvertising::setMinPreferred(uint16_t)
引数
- uint16_t ``
setMaxPreferred()¶
void BLEAdvertising::setMaxPreferred(uint16_t)
引数
- uint16_t ``
setScanResponse()¶
void BLEAdvertising::setScanResponse(bool)
引数
- bool ``