Hi Espress if team,
i am new to esp idf framework. I am working BLE using nimble libaray. I am getting the Unresolved inclusion: "esp_gap_ble_api.h" error. I include bt component in cmakelist.txt.
[Codebox]
#include <stdio.h>
#include <stdio.h>
#include "esp_log.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_bt.h"
#include "esp_gap_ble_api.h"
#include "esp_gatts_api.h"
#include "ble_server_client_demo.h"
#define GATTS_TAG "GATTS_DEMO"
void ble_server_demo(void){
}
[/Codebox]
[Codebox]
idf_component_register(SRCS "ble_server_client_demo.c"
INCLUDE_DIRS "include"
REQUIRES bt driver nvs_flash esp_event)
[/Codebox]
Unresolved inclusion: "esp_gap_ble_api.h"
-
- Posts: 125
- Joined: Fri May 24, 2019 2:02 am
Re: Unresolved inclusion: "esp_gap_ble_api.h"
Have you tried a clean and rebuild?
-
- Posts: 1708
- Joined: Mon Oct 17, 2022 7:38 pm
- Location: Europe, Germany
Re: Unresolved inclusion: "esp_gap_ble_api.h"
Check if the NimBLE BT stack is selected (instead of Bluedroid) in menuconfig under "Component config" -> "Bluetooth".
Re: Unresolved inclusion: "esp_gap_ble_api.h"
Seems like you are trying to compile bluedroid example code .The files esp_gap_ble_api.h doesn't exist for nimble and hence the error. you can refer to nimble examples insteadsureace wrote: ↑Sun Aug 13, 2023 2:39 pmHi Espress if team,
i am new to esp idf framework. I am working BLE using nimble libaray. I am getting the Unresolved inclusion: "esp_gap_ble_api.h" error. I include bt component in cmakelist.txt.
[Codebox]
#include <stdio.h>
#include <stdio.h>
#include "esp_log.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_bt.h"
#include "esp_gap_ble_api.h"
#include "esp_gatts_api.h"
#include "ble_server_client_demo.h"
#define GATTS_TAG "GATTS_DEMO"
void ble_server_demo(void){
}
[/Codebox]
[Codebox]
idf_component_register(SRCS "ble_server_client_demo.c"
INCLUDE_DIRS "include"
REQUIRES bt driver nvs_flash esp_event)
[/Codebox]
Who is online
Users browsing this forum: cdollar and 79 guests