You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When building an Arduino based BLE application, if you find that you fail at compilation with errors similar to:
ESP_GATTC_CONNECT_EVT was not declared in this scope
or similar issues relating to constants not found we can explain this and the solution is relatively simple.
First, let us review the Arduino ESP32 support story. The goal is to write an Arduino sketch, compile it and then flash it to an ESP32.
A native ESP32 has its own development environment called the ESP-IDF (Espressif IoT Development Framework). The ESP-IDF is what a C or C++ programmer would use to write applications to natively run on an ESP32. It is a "lower" level API than the Arduino framework and is designed specifically for ESP32 programming. This means that an ESP32 application can't be recompiled for other platforms.
Arduino on the other hand is a development tool (IDE) plus a set of libraries that have common implementations across a number of physical devices. A program (a sketch) written to use the Arduino APIs can be compiled for at ATMel processor, an ESP32, and a whole host of other platforms.
The Arduino environment for ESP32 augments the Arduino IDE to provide support for compilation for ESP32s. Specifically, this means three primary things:
A compiler that compiler source code to ESP32 native code
Arduino libraries that map source code calls to Arduino API to ESP32 code
A copy of the ESP-IDF that implements the foundation of ESP32 access
All of this is summary ... let us now get back to the described problem.
The puzzle is to caused by release maintenance for the Arduino ESP32 package. Every few months, Espressif release a new version of the ESP-IDF. Some time after this, the Arduino ESP32 package is then refreshed to include the new ESP-IDF level. At that time, there is now a later version of the Arduino support for ESP32 available beyond what you currently have installed.
The Arduino BLE library (this project) is built to use the latest Arduino ESP32 framework. The latest framework provided extra functions that the Arduino BLE library implementation utilized. The error you are seeing is caused because you are building an Arduino BLE library application on a version of the Arduino ESP32 support that is back level.
What you must do is upgrade/re-install your Arduino ESP32 environment into your Arduino IDE. Once done, you will find that the compilations proceed smoothly.
See the following for Arduino ESP32 installation instructions:
@nkolban Thanks for your work and support. I am also facing type of the same issues.I already have done everything mentioned in the link. I tried this with BLE lib versions 0.4.1 and 0.4.2 and latest ESP32 Dev board version
Attached is a snap of part of the errors.
When building an Arduino based BLE application, if you find that you fail at compilation with errors similar to:
or similar issues relating to constants not found we can explain this and the solution is relatively simple.
First, let us review the Arduino ESP32 support story. The goal is to write an Arduino sketch, compile it and then flash it to an ESP32.
A native ESP32 has its own development environment called the ESP-IDF (Espressif IoT Development Framework). The ESP-IDF is what a C or C++ programmer would use to write applications to natively run on an ESP32. It is a "lower" level API than the Arduino framework and is designed specifically for ESP32 programming. This means that an ESP32 application can't be recompiled for other platforms.
Arduino on the other hand is a development tool (IDE) plus a set of libraries that have common implementations across a number of physical devices. A program (a sketch) written to use the Arduino APIs can be compiled for at ATMel processor, an ESP32, and a whole host of other platforms.
The Arduino environment for ESP32 augments the Arduino IDE to provide support for compilation for ESP32s. Specifically, this means three primary things:
All of this is summary ... let us now get back to the described problem.
The puzzle is to caused by release maintenance for the Arduino ESP32 package. Every few months, Espressif release a new version of the ESP-IDF. Some time after this, the Arduino ESP32 package is then refreshed to include the new ESP-IDF level. At that time, there is now a later version of the Arduino support for ESP32 available beyond what you currently have installed.
The Arduino BLE library (this project) is built to use the latest Arduino ESP32 framework. The latest framework provided extra functions that the Arduino BLE library implementation utilized. The error you are seeing is caused because you are building an Arduino BLE library application on a version of the Arduino ESP32 support that is back level.
What you must do is upgrade/re-install your Arduino ESP32 environment into your Arduino IDE. Once done, you will find that the compilations proceed smoothly.
See the following for Arduino ESP32 installation instructions:
https://github.com/espressif/arduino-esp32#installation-instructions
The text was updated successfully, but these errors were encountered: