feat(bt/bluedroid): Added API to get local device name
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
#include "esp_gatts_api.h"
|
||||
#include "esp_bt_defs.h"
|
||||
#include "esp_bt_main.h"
|
||||
#include "esp_bt_device.h"
|
||||
#include "ble_spp_server_demo.h"
|
||||
|
||||
#define GATTS_TABLE_TAG "GATTS_SPP_DEMO"
|
||||
@@ -498,7 +499,7 @@ static void gatts_profile_event_handler(esp_gatts_cb_event_t event, esp_gatt_if_
|
||||
switch (event) {
|
||||
case ESP_GATTS_REG_EVT:
|
||||
ESP_LOGI(GATTS_TABLE_TAG, "%s %d", __func__, __LINE__);
|
||||
esp_ble_gap_set_device_name(SAMPLE_DEVICE_NAME);
|
||||
esp_bt_dev_set_device_name(SAMPLE_DEVICE_NAME);
|
||||
|
||||
ESP_LOGI(GATTS_TABLE_TAG, "%s %d", __func__, __LINE__);
|
||||
esp_ble_gap_config_adv_data_raw((uint8_t *)spp_adv_data, sizeof(spp_adv_data));
|
||||
|
||||
Reference in New Issue
Block a user