diff --git a/main/inc/user/ble_app.h b/main/inc/user/ble_app.h index 2c677f8e..19e218b7 100644 --- a/main/inc/user/ble_app.h +++ b/main/inc/user/ble_app.h @@ -12,8 +12,6 @@ extern esp_ble_adv_params_t adv_params; -extern void ble_gap_init_adv_data(const char *name); - extern void ble_app_init(void); #endif /* INC_USER_BLE_APP_H_ */ diff --git a/main/src/user/ble_app.c b/main/src/user/ble_app.c index d04748dd..bafa2529 100644 --- a/main/src/user/ble_app.c +++ b/main/src/user/ble_app.c @@ -19,11 +19,6 @@ #define BLE_APP_TAG "ble_app" #define BLE_GAP_TAG "ble_gap" -static uint8_t adv_config_done = 0; - -#define adv_config_flag (1 << 0) -#define scan_rsp_config_flag (1 << 1) - esp_ble_adv_params_t adv_params = { .adv_int_min = 0x20, .adv_int_max = 0x40, @@ -33,47 +28,11 @@ esp_ble_adv_params_t adv_params = { .adv_filter_policy = ADV_FILTER_ALLOW_SCAN_ANY_CON_ANY, }; -void ble_gap_init_adv_data(const char *name) -{ - int len = strlen(name); - uint8_t raw_adv_data[len+5]; - // flag - raw_adv_data[0] = 2; - raw_adv_data[1] = ESP_BT_EIR_TYPE_FLAGS; - raw_adv_data[2] = (ESP_BLE_ADV_FLAG_GEN_DISC | ESP_BLE_ADV_FLAG_BREDR_NOT_SPT); - // adv name - raw_adv_data[3] = len + 1; - raw_adv_data[4] = ESP_BLE_AD_TYPE_NAME_CMPL; - for (int i=0; i