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.
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.
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:
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.
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
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.