Sequence flow for BLE advertising ... must I wait for an ESP_GAP_BLE_ADV_DATA_SET_COMPLETE_EVT?
Posted: Thu Jun 22, 2017 4:39 am
When creating a BLE peripheral which will be advertising its existence, I understand that I must call:
esp_ble_gap_config_adv_data()
to set the content of the advertisement and then call
esp_ble_gap_start_advertising()
to begin the actual advertising procedure.
However, my question is about timing. When we call:
esp_ble_gap_config_adv_data()
at some time later we will receive an ESP_GAP_BLE_ADV_DATA_SET_COMPLETE_EVT that indicates that the advertising data has been set. My core question is as follows:
Do I have to wait for the ESP_GAP_BLE_ADV_DATA_SET_COMPLETE_EVT event before calling esp_ble_gap_start_advertising() or can I call esp_ble_gap_start_advertising() immediately following a call to esp_ble_gap_config_adv_data()?
I could see either being valid and am hoping to hear the sequence rules in effect.
esp_ble_gap_config_adv_data()
to set the content of the advertisement and then call
esp_ble_gap_start_advertising()
to begin the actual advertising procedure.
However, my question is about timing. When we call:
esp_ble_gap_config_adv_data()
at some time later we will receive an ESP_GAP_BLE_ADV_DATA_SET_COMPLETE_EVT that indicates that the advertising data has been set. My core question is as follows:
Do I have to wait for the ESP_GAP_BLE_ADV_DATA_SET_COMPLETE_EVT event before calling esp_ble_gap_start_advertising() or can I call esp_ble_gap_start_advertising() immediately following a call to esp_ble_gap_config_adv_data()?
I could see either being valid and am hoping to hear the sequence rules in effect.