Compile error on esp32 on version 0.7 and 0.8

Arduino: 1.8.5 (Mac OS X), Board: “NodeMCU-32S, 80MHz, 921600”

/data/IOT/Arduino/libraries/ESP32_BLE_Arduino/src/BLEServer.cpp:21:22: fatal error: gatt_api.h: No such file or directory
compilation terminated.
Multiple libraries were found for “WiFi.h”
Used: /data/IOT/Arduino/hardware/espressif/esp32/libraries/WiFi
Not used: /private/var/folders/tz/v2mgt03d24v_3lbjn79cwgr00000gn/T/AppTranslocation/D0D2E04F-44EA-4318-9C24-E9CE8F41D160/d/Arduino.app/Contents/Java/libraries/WiFi
Multiple libraries were found for “BLEDevice.h”
Used: /data/IOT/Arduino/libraries/ESP32_BLE_Arduino
Not used: /data/IOT/Arduino/hardware/espressif/esp32/libraries/BLE
Not used: /data/IOT/Arduino/hardware/espressif/esp32/libraries/BLE
Not used: /data/IOT/Arduino/hardware/espressif/esp32/libraries/BLE
Not used: /data/IOT/Arduino/hardware/espressif/esp32/libraries/BLE
exit status 1
Error compiling for board NodeMCU-32S.

This report would have more information with
“Show verbose output during compilation”
option enabled in File -> Preferences.

Did you take the libraries provided in lib folder of OpenMQTTGateway github and deposited them into your arduino ide libraries folder ?

Issue reproduced, if needed take this version of esp32 env
https://github.com/espressif/arduino-esp32/archive/7abd5862ed6abf1804a24dc466bdf3564328a4b6.zip

using the esp32 env you gave. get other error.
Arduino version 1.8.5. OpenMQTTGateway 0.7.

Arduino: 1.8.5 (Mac OS X), Board: “NodeMCU-32S, 80MHz, 921600”

/data/IOT/Arduino/libraries/ESP32_BLE_Arduino/src/BLEClient.cpp: In member function ‘bool BLEClient::connect(BLEAddress)’:
/data/IOT/Arduino/libraries/ESP32_BLE_Arduino/src/BLEClient.cpp:97:2: error: invalid conversion from ‘int’ to ‘esp_ble_addr_type_t’ [-fpermissive]
);
^
/data/IOT/Arduino/libraries/ESP32_BLE_Arduino/src/BLEClient.cpp:97:2: error: too few arguments to function ‘esp_err_t esp_ble_gattc_open(esp_gatt_if_t, uint8_t*, esp_ble_addr_type_t, bool)’
In file included from /data/IOT/Arduino/libraries/ESP32_BLE_Arduino/src/BLEClient.cpp:13:0:
/data/IOT/Arduino/hardware/espressif/esp32/tools/sdk/include/bluedroid/esp_gattc_api.h:294:11: note: declared here
esp_err_t esp_ble_gattc_open(esp_gatt_if_t gattc_if, esp_bd_addr_t remote_bda, esp_ble_addr_type_t remote_addr_type, bool is_direct);
^
Multiple libraries were found for “WiFi.h”
Used: /data/IOT/Arduino/hardware/espressif/esp32/libraries/WiFi
Not used: /private/var/folders/tz/v2mgt03d24v_3lbjn79cwgr00000gn/T/AppTranslocation/AEFC0023-6EF9-46BD-AE14-D3156B2D0015/d/Arduino.app/Contents/Java/libraries/WiFi
exit status 1
Error compiling for board NodeMCU-32S.

This report would have more information with
“Show verbose output during compilation”
option enabled in File -> Preferences.

ok we need to go back in time more, could you try with this one:
https://github.com/espressif/arduino-esp32/archive/a153f6ad280e5932be9c80341556348ff505d586.zip

Here is the working process with the last version of arduino ESP32:
→ download the last version of ESP32 arduino and install it following the provided instructions on hte github readme
→ remove BLE library from libraries folder of ESP32 arduino folder
→ install nkolban library from here https://github.com/nkolban/ESP32_BLE_Arduino/archive/master.zip into libraries folder of ESP32 arduino folder.
→ open OpenMQTTGateway.ino
→ choose board ESP32 dev module
→ change partition scheme to minimal SPIFFS
→ compile

UPDATE
Note the instructions has been updated in the wiki below, follow these ones and not the ones above:

failed agin with error message:

Arduino: 1.8.5 (Mac OS X), Board: “ESP32 Dev Module, Minimal SPIFFS (Large APPS with OTA), QIO, 80MHz, 4MB (32Mb), 921600, None”

Build options changed, rebuilding all
/data/IOT/Arduino/libraries/ESP32_BLE_Arduino/src/BLEClient.cpp: In member function ‘bool BLEClient::connect(BLEAddress)’:
/data/IOT/Arduino/libraries/ESP32_BLE_Arduino/src/BLEClient.cpp:97:2: error: invalid conversion from ‘int’ to ‘esp_ble_addr_type_t’ [-fpermissive]
);
^
/data/IOT/Arduino/libraries/ESP32_BLE_Arduino/src/BLEClient.cpp:97:2: error: too few arguments to function ‘esp_err_t esp_ble_gattc_open(esp_gatt_if_t, uint8_t*, esp_ble_addr_type_t, bool)’
In file included from /data/IOT/Arduino/libraries/ESP32_BLE_Arduino/src/BLEClient.cpp:13:0:
/data/IOT/Arduino/hardware/espressif/esp32/tools/sdk/include/bluedroid/esp_gattc_api.h:294:11: note: declared here
esp_err_t esp_ble_gattc_open(esp_gatt_if_t gattc_if, esp_bd_addr_t remote_bda, esp_ble_addr_type_t remote_addr_type, bool is_direct);
^
Multiple libraries were found for “WiFi.h”
Used: /data/IOT/Arduino/hardware/espressif/esp32/libraries/WiFi
Not used: /Applications/Arduino.app/Contents/Java/libraries/WiFi
Multiple libraries were found for “BLEDevice.h”
Used: /data/IOT/Arduino/libraries/ESP32_BLE_Arduino
Not used: /data/IOT/Arduino/hardware/espressif/esp32/libraries/ESP32_BLE_Arduino
Not used: /data/IOT/Arduino/hardware/espressif/esp32/libraries/ESP32_BLE_Arduino
Not used: /data/IOT/Arduino/hardware/espressif/esp32/libraries/ESP32_BLE_Arduino
Not used: /data/IOT/Arduino/hardware/espressif/esp32/libraries/ESP32_BLE_Arduino
exit status 1
Error compiling for board ESP32 Dev Module.

This report would have more information with
“Show verbose output during compilation”
option enabled in File -> Preferences.

Looks like need to remove the lib in your code’s direcotry: lib/ESP32_BLE_Arduino too.
It search Arduino’s lib and then esp32’s lib.
compline success after delete your ESP32_BLE_Arduino lib.

Indeed thanks for the info, i will update the lib in the repo

Facing similar issues here

Arduino: 1.8.5 (Windows 10), Board: “ESP32 Dev Module, QIO, 80MHz, 4MB (32Mb), 921600, None”

Build options changed, rebuilding all
WARNING: library rc-switch-2.6.2 claims to run on (avr, esp8266) architecture(s) and may be incompatible with your current board which runs on (esp32) architecture(s).

C:\Program Files (x86)\Arduino\hardware\expressif\esp32\libraries\ESP32_BLE_Arduino\src\BLEClient.cpp: In member function ‘bool BLEClient::connect(BLEAddress)’:

C:\Program Files (x86)\Arduino\hardware\expressif\esp32\libraries\ESP32_BLE_Arduino\src\BLEClient.cpp:116:2: error: too many arguments to function ‘esp_err_t esp_ble_gattc_open(esp_gatt_if_t, uint8_t*, bool)’

);

^

In file included from C:\Program Files (x86)\Arduino\hardware\expressif\esp32\libraries\ESP32_BLE_Arduino\src\BLEClient.cpp:13:0:

C:\Program Files (x86)\Arduino\hardware\expressif\esp32/tools/sdk/include/bluedroid/esp_gattc_api.h:293:11: note: declared here

esp_err_t esp_ble_gattc_open(esp_gatt_if_t gattc_if, esp_bd_addr_t remote_bda, bool is_direct);

       ^

Multiple libraries were found for “WiFi.h”
Used: C:\Program Files (x86)\Arduino\hardware\expressif\esp32\libraries\WiFi
Not used: C:\Program Files (x86)\Arduino\libraries\WiFi
exit status 1
Error compiling for board ESP32 Dev Module.

If you follow the wiki you should not have compilation errors.
You have to take the ESP32 env pointed into the wiki and the esp32 BLE arduino library in the lib folder.

After a head hurting and not working instructions, finally what did work was:

  1. Use the Env Given by you
  2. Copy libraries of OMG to esp32

Compiles successfully but gives me only this result
"
Connecting to

.
.
"
After hitting reset—

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:956
load:0x40078000,len:0
load:0x40078000,len:13076
entry 0x40078a58
Connecting to

.
.
.
.
.
.
.

Any Pointers?

Did you set the wifi and mqtt parameters in user_config.h ?
Maybe open another topic as your issue is not related to compilation anymore.

Holy… The wifi was incorrect its working fine now… just to be clear, WifiManager doesn’t work?

Not yet with esp32 only for esp8266

1 Like