gatts bluetooth example includes not found

pushtoopen
Posts: 16
Joined: Sun Feb 25, 2018 4:11 pm

gatts bluetooth example includes not found

Postby pushtoopen » Tue Mar 27, 2018 2:58 am

Hi all, i'm trying to get the gatts low power Bt example started. I have multiple portions of code including just fine, but for some reason, everything in the bt/bluedroid/api/include folder is not being found. I am able to get freertos/FREERTOS.h working so i know contextually eclipse is able to include things withinthe IDF_PATH

i did a make list components and below are the subfolders currently included:

I have tried multiple methods of including, direct paths, subfolders only, no folder path at all... it only seems to happen on the bt subfolders that eclipse cant find it. all other includes work just fine. Ive also cleaned and remade my project and tired refreshing links in eclipse. any guidance would be much appreciated!!

Thank you for your time.

COMPONENT_PATHS (paths to all components):
/home/esp/esp-idf/components/app_trace
/home/esp/esp-idf/components/app_update
/home/esp/esp-idf/components/aws_iot
/home/esp/esp-idf/components/bootloader
/home/esp/esp-idf/components/bootloader_support
/home/esp/esp-idf/components/bt
/home/esp/esp-idf/components/coap
/home/esp/esp-idf/components/console
/home/esp/esp-idf/components/cxx
/home/esp/esp-idf/components/driver
/home/esp/esp-idf/components/esp32
/home/esp/esp-idf/components/esp_adc_cal
/home/esp/esp-idf/components/esptool_py
/home/esp/esp-idf/components/ethernet
/home/esp/esp-idf/components/expat
/home/esp/esp-idf/components/fatfs
/home/esp/esp-idf/components/freertos
/home/esp/esp-idf/components/heap
/home/esp/esp-idf/components/idf_test
/home/esp/esp-idf/components/jsmn
/home/esp/esp-idf/components/json
/home/esp/esp-idf/components/libsodium
/home/esp/esp-idf/components/log
/home/esp/esp-idf/components/lwip
/home/esp/WORK/ESP32_Base/main
/home/esp/esp-idf/components/mbedtls
/home/esp/esp-idf/components/mdns
/home/esp/esp-idf/components/micro-ecc
/home/esp/WORK/ESP32_Base/components/mkspiffs
/home/esp/esp-idf/components/newlib
/home/esp/esp-idf/components/nghttp
/home/esp/esp-idf/components/nvs_flash
/home/esp/esp-idf/components/openssl
/home/esp/esp-idf/components/partition_table
/home/esp/esp-idf/components/pthread
/home/esp/esp-idf/components/sdmmc
/home/esp/esp-idf/components/soc
/home/esp/esp-idf/components/spi_flash
/home/esp/WORK/ESP32_Base/components/spiffs
/home/esp/WORK/ESP32_Base/components/spiffs_image
/home/esp/esp-idf/components/tcpip_adapter
/home/esp/esp-idf/components/ulp
/home/esp/esp-idf/components/vfs
/home/esp/esp-idf/components/wear_levelling
/home/esp/esp-idf/components/wpa_supplicant
/home/esp/esp-idf/components/xtensa-debug-module

includes used

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/event_groups.h"
#include "esp_system.h"
#include "esp_log.h"
#include "nvs_flash.h"
#include "esp_bt.h"

//below are the includes that fail
#include "bt/bluedroid/api/esp_gap_ble_api.h"
#include "bt/bluedroid/api/include/esp_gatts_api.h"
#include "bt/bluedroid/api/include/esp_bt_defs.h"
#include "bt/bluedroid/api/include/esp_bt_main.h"
#include "bt/bluedroid/api/include/esp_bt_main.h"
#include "bt/bluedroid/api/include/esp_gatt_common_api.h"

chegewara
Posts: 2361
Joined: Wed Jun 14, 2017 9:00 pm

Re: gatts bluetooth example includes not found

Postby chegewara » Tue Mar 27, 2018 1:38 pm

This is how looks like my .profile file:
includes.JPG
includes.JPG (101.67 KiB) Viewed 5892 times
Now only thing i have to do in eclipse is to add ${INCLUDES} to my project paths and it works with every bluetooth project i am doing, and as you can see from my posts im mostly working with bluetooth le.

PS do you have problem with compiling in eclipse or just with indexing files and yu see that annoying red underlying line?

User avatar
kolban
Posts: 1683
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

Re: gatts bluetooth example includes not found

Postby kolban » Tue Mar 27, 2018 2:45 pm

A quick question ... have you enabled Bluetooth in "make menuconfig" under component config -> bluetooth?
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

pushtoopen
Posts: 16
Joined: Sun Feb 25, 2018 4:11 pm

Re: gatts bluetooth example includes not found

Postby pushtoopen » Wed Mar 28, 2018 12:53 am

This was it, i actually found it manually looking through the component.mk and seeing the: "ifdef CONFIG_BLUEDROID_ENABLED". Sorry for the long response, i was watching this thread but i guess my broweser wasn't refreshing so i hadn't caught your comment. Thanks!

issue resolution:msys32 or linux & browse to your project folder | make menuconfig and select "Component Config" | "Bluetooth" and press "y" to enable bluetooth configureation, thus allowing includes to include bluedroid subfolders within the bt component. (this is required for anything specifically listed within the "Component Config"

Thanks for the responses guys!

Who is online

Users browsing this forum: No registered users and 82 guests