ble hostname
This commit is contained in:
parent
a4f3619a2b
commit
f095b48f89
@ -171,8 +171,6 @@ static const esp_gatts_attr_db_t gatt_db[ENV_IDX_NB] =
|
||||
};
|
||||
|
||||
|
||||
static char device_name[] = "prout";
|
||||
|
||||
void gap_event_handler(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param_t* param){
|
||||
switch(event){
|
||||
case ESP_GAP_BLE_ADV_DATA_SET_COMPLETE_EVT:
|
||||
@ -238,7 +236,7 @@ void gatts_event_handler(esp_gatts_cb_event_t event, esp_gatt_if_t gatts_if, esp
|
||||
void gatts_profile_event_handler(esp_gatts_cb_event_t event, esp_gatt_if_t gatts_if, esp_ble_gatts_cb_param_t* param){
|
||||
switch(event){
|
||||
case ESP_GATTS_REG_EVT:
|
||||
ESP_ERROR_CHECK(esp_ble_gap_set_device_name(device_name));
|
||||
ESP_ERROR_CHECK(esp_ble_gap_set_device_name(main_app_conf->hostname));
|
||||
ESP_ERROR_CHECK(esp_ble_gap_config_adv_data(&env_sense_adv_data));
|
||||
adv_config_done |= ADV_CONFIG_FLAG;
|
||||
ESP_ERROR_CHECK(esp_ble_gap_config_adv_data(&scan_rsp_data));
|
||||
|
Loading…
x
Reference in New Issue
Block a user