Skip to content

Commit d362e1e

Browse files
authored
[BLE] Allows you to specify which channels are used to advertise. (espressif#4954)
In some use cases getting rssi signal from one channel is more stable (less variance) than rssi from the three advertising channels. This change allows you to specify which channels are used to advertise.
1 parent 33d9f4a commit d362e1e

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

‎libraries/BLE/src/BLEAdvertising.cpp‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ void BLEAdvertising::setAdvertisementType(esp_ble_adv_type_t adv_type){
9191
m_advParams.adv_type = adv_type;
9292
} // setAdvertisementType
9393

94+
voidBLEAdvertising::setAdvertisementChannelMap(esp_ble_adv_channel_t channel_map){
95+
m_advParams.channel_map = channel_map;
96+
} // setAdvertisementChannelMap
97+
9498
voidBLEAdvertising::setMinInterval(uint16_t mininterval){
9599
m_advParams.adv_int_min = mininterval;
96100
} // setMinInterval

‎libraries/BLE/src/BLEAdvertising.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ class BLEAdvertising{
5353
voidstop();
5454
voidsetAppearance(uint16_t appearance);
5555
voidsetAdvertisementType(esp_ble_adv_type_t adv_type);
56+
voidsetAdvertisementChannelMap(esp_ble_adv_channel_t channel_map);
5657
voidsetMaxInterval(uint16_t maxinterval);
5758
voidsetMinInterval(uint16_t mininterval);
5859
voidsetAdvertisementData(BLEAdvertisementData& advertisementData);

0 commit comments

Comments
(0)