测试工程:使用官方例程 ble_ibeacon。
编译环境:VS CODE 1.5.6
case ESP_GAP_BLE_SCAN_RESULT_EVT: {
esp_ble_gap_cb_param_t *scan_result = (esp_ble_gap_cb_param_t *)param;
switch (scan_result->scan_rst.search_evt) {
case ESP_GAP_SEARCH_INQ_RES_EVT:
/* Search for BLE iBeacon Packet */
if (esp_ble_is_ibeacon_packet(scan_result->scan_rst.ble_adv, scan_result->scan_rst.adv_data_len)){
esp_ble_ibeacon_t *ibeacon_data = (esp_ble_ibeacon_t*)(scan_result->scan_rst.ble_adv);
ESP_LOGI(DEMO_TAG, "----------iBeacon Found----------");
esp_log_buffer_hex("IBEACON_DEMO: Device address:", scan_result->scan_rst.bda, ESP_BD_ADDR_LEN );
esp_log_buffer_hex("IBEACON_DEMO: Proximity UUID:", ibeacon_data->ibeacon_vendor.proximity_uuid, ESP_UUID_LEN_128);
uint16_t major = ENDIAN_CHANGE_U16(ibeacon_data->ibeacon_vendor.major);
uint16_t minor = ENDIAN_CHANGE_U16(ibeacon_data->ibeacon_vendor.minor);
ESP_LOGI(DEMO_TAG, "Major: 0x%04x (%d)", major, major);
ESP_LOGI(DEMO_TAG, "Minor: 0x%04x (%d)", minor, minor);
ESP_LOGI(DEMO_TAG, "Measured power (RSSI at a 1m distance):%d dbm", ibeacon_data->ibeacon_vendor.measured_power);
ESP_LOGI(DEMO_TAG, "RSSI of packet:%d dbm", scan_result->scan_rst.rssi);
if ((10167 == major ) && (61958 == minor) )
{
// esp_ble_gap_stop_scanning();
/********************************************************************************************************************
如果注释掉下面的函数,编译是正常的;但是如果保留下面函数语句,build 过程中会提示File project_description.json cannot be found.
**********************************************************************************************************************/
ESP_LOGI(DEMO_TAG, "SCAN STOP");
}
}
break;
default:
break;
}
VS cod报错 File project_description.json cannot be found.
-
- Posts: 786
- Joined: Wed Nov 14, 2018 8:45 am
Re: VS cod报错 File project_description.json cannot be found.
Windows 下?哪个版本的 IDF?是把 esp_ble_gap_stop_scanning(); 这句打开会有问题?
Re: VS cod报错 File project_description.json cannot be found.
win10环境,使用的是VS code 中的ESPRESSIF 插件 版本是ESP-IDF 4.2.1
Re: VS cod报错 File project_description.json cannot be found.
是把下面打印问题的语句,注释前后有问题
-
- Posts: 786
- Joined: Wed Nov 14, 2018 8:45 am
Re: VS cod报错 File project_description.json cannot be found.
不可复现,请提供完整的编译 log。
Who is online
Users browsing this forum: No registered users and 59 guests