Open tsctrl opened 2 years ago
exact same issue was reported in the esp forum here
the root cause is the type mentioned above is only available for ble 4.2 and only available on esp32c3 config sdk. i guess the base esp32s1 does support BLE 4.2 and should have the same option available for esp32s1 config.
if current setup was intended as per ble 4.2 only supported by esp32c3 and not esp32s1 than this is a false issue. if esp32s1 also does support ble 4.2 than attention needed to add the support in default esp32 sdk config so 4.2 ble option are available by default. i am not sure if ble 4.2 is not supported by the oem esp32s1 chip but is an addon from 3rd party manufacturer that support it.
saying this because there are 3rd party manufacturer that use ble 4.2 config in their esp32 ESP32-DOWDQ6.
cc: @me-no-dev thanks!
what is esp32s1? Single Core ESP32?
@me-no-dev
i am referring s1 to the old esp32 wroom 32 rev1 to rev3.
to be clear, the advertising ble library above was accessible on the old idf arduino version. but is not accessible on the idf 4.4. to enable this you must have esp32c3 with ble5. build the code with c3 target than you can see the ble4.2 advertising modules referenced properly.
do esp32 wroom does not support ble4.2? why that option was only available for esp32c3?
this eadvertising ble4.2 was accessible on the old idf arduino library and people using it. the same code can be build in arduino ide with old library but throwing error above if build with 4.4 since the menu config blocking from including this libs on device other than esp32c3.
thanks!
the exact config is BLE_42_FEATURE_SUPPORT which only enabled for c3.
Hello, are you able to test this on Arduino core esp32 v2.0.3-rc1? Thanks!
Hi @VojtechBartoska,
I had a similar issue and I have tried using V2.0.3-RC1 tag but the issue remains. I tested using PlatformIO and here is my platformio.ini configuration
[env:ttgo-t-watch]
platform = https://github.com/platformio/platform-espressif32.git#feature/arduino-upstream
platform_packages =
framework-arduinoespressif32@https://github.com/espressif/arduino-esp32.git#2.0.3-RC1
board = ttgo-t-watch
framework = arduino
EDIT:
I might have misconfigured my project, I'll get back to you once my configuration issue has been resolved.
EDIT 2:
I can confirm I am using v2.0.3-RC1 and the issue is still there.
The output of git log
command for the framework package downloaded by PlatformIO:
commit 1e388a24cef1b336990b8f67dbce63cc8a4794a4 (grafted, HEAD, tag: 2.0.3-RC1)
Author: Me No Dev <me-no-dev@users.noreply.github.com>
Date: Tue Mar 29 18:12:16 2022 +0300
Update toolchain to gcc8_4_0-esp-2021r2-patch3 and esptool to 3.3 (#6497)
* Update toolchain to gcc8_4_0-esp-2021r2-patch3
* Update esptool to 3.3
* Remove old files
* Update package_esp32_index.template.json
* use esptool v3.3 (#6498)
could be used for all. Nice would be releasing in Platformio registry.
* Switch toolchain for PIO CI
Co-authored-by: Jason2866 <24528715+Jason2866@users.noreply.github.com>
Here's the build log:
In file included from /Users/x/.platformio/packages/framework-arduinoespressif32/libraries/BLE/src/BLEServer.h:19,
from /Users/x/.platformio/packages/framework-arduinoespressif32/libraries/BLE/src/BLEDevice.h:18,
from src/ble/ble.cpp:4:
/Users/x/.platformio/packages/framework-arduinoespressif32/libraries/BLE/src/BLEAdvertising.h:71:2: error: 'esp_ble_adv_data_t' does not name a type; did you mean 'esp_ble_adv_data_type'?
esp_ble_adv_data_t m_advData;
^~~~~~~~~~~~~~~~~~
esp_ble_adv_data_type
/Users/x/.platformio/packages/framework-arduinoespressif32/libraries/BLE/src/BLEAdvertising.h:72:2: error: 'esp_ble_adv_data_t' does not name a type; did you mean 'esp_ble_adv_data_type'?
esp_ble_adv_data_t m_scanRespData; // Used for configuration of scan response data when m_scanResp is true
^~~~~~~~~~~~~~~~~~
esp_ble_adv_data_type
/Users/x/.platformio/packages/framework-arduinoespressif32/libraries/BLE/src/BLEAdvertising.h:73:2: error: 'esp_ble_adv_params_t' does not name a type; did you mean 'esp_ble_sm_param_t'?
esp_ble_adv_params_t m_advParams;
^~~~~~~~~~~~~~~~~~~~
esp_ble_sm_param_t
In file included from /Users/x/.platformio/packages/framework-arduinoespressif32/libraries/BLE/src/BLEServer.h:19,
from /Users/x/.platformio/packages/framework-arduinoespressif32/libraries/BLE/src/BLEDevice.h:18,
from src/ble/eddystone_tlm.cpp:7:
/Users/x/.platformio/packages/framework-arduinoespressif32/libraries/BLE/src/BLEAdvertising.h:71:2: error: 'esp_ble_adv_data_t' does not name a type; did you mean 'esp_ble_adv_data_type'?
esp_ble_adv_data_t m_advData;
^~~~~~~~~~~~~~~~~~
esp_ble_adv_data_type
/Users/x/.platformio/packages/framework-arduinoespressif32/libraries/BLE/src/BLEAdvertising.h:72:2: error: 'esp_ble_adv_data_t' does not name a type; did you mean 'esp_ble_adv_data_type'?
esp_ble_adv_data_t m_scanRespData; // Used for configuration of scan response data when m_scanResp is true
^~~~~~~~~~~~~~~~~~
esp_ble_adv_data_type
/Users/x/.platformio/packages/framework-arduinoespressif32/libraries/BLE/src/BLEAdvertising.h:73:2: error: 'esp_ble_adv_params_t' does not name a type; did you mean 'esp_ble_sm_param_t'?
esp_ble_adv_params_t m_advParams;
^~~~~~~~~~~~~~~~~~~~
esp_ble_sm_param_t
In file included from /Users/x/.platformio/packages/framework-arduinoespressif32/libraries/BLE/src/BLEDevice.h:18,
from src/ble/ble.cpp:4:
/Users/x/.platformio/packages/framework-arduinoespressif32/libraries/BLE/src/BLEServer.h:94:2: error: 'esp_ble_adv_data_t' does not name a type; did you mean 'esp_ble_adv_data_type'?
esp_ble_adv_data_t m_adv_data;
^~~~~~~~~~~~~~~~~~
esp_ble_adv_data_type
In file included from /Users/x/.platformio/packages/framework-arduinoespressif32/libraries/BLE/src/BLEAdvertisedDevice.h:17,
from /Users/x/.platformio/packages/framework-arduinoespressif32/libraries/BLE/src/BLEClient.h:22,
from /Users/x/.platformio/packages/framework-arduinoespressif32/libraries/BLE/src/BLEDevice.h:19,
from src/ble/ble.cpp:4:
/Users/x/.platformio/packages/framework-arduinoespressif32/libraries/BLE/src/BLEScan.h:33:2: error: 'esp_ble_gap_phy_t' does not name a type; did you mean 'esp_ble_key_t'?
esp_ble_gap_phy_t adv_phy; /*!< periodic advertising phy type */
^~~~~~~~~~~~~~~~~
esp_ble_key_t
In file included from /Users/x/.platformio/packages/framework-arduinoespressif32/libraries/BLE/src/BLEDevice.h:18,
from src/ble/eddystone_tlm.cpp:7:
/Users/x/.platformio/packages/framework-arduinoespressif32/libraries/BLE/src/BLEServer.h:94:2: error: 'esp_ble_adv_data_t' does not name a type; did you mean 'esp_ble_adv_data_type'?
esp_ble_adv_data_t m_adv_data;
^~~~~~~~~~~~~~~~~~
esp_ble_adv_data_type
/Users/x/.platformio/packages/framework-arduinoespressif32/libraries/BLE/src/BLEScan.h:98:2: error: 'esp_ble_scan_params_t' does not name a type; did you mean 'esp_ble_sm_param_t'?
esp_ble_scan_params_t m_scan_params;
^~~~~~~~~~~~~~~~~~~~~
esp_ble_sm_param_t
/Users/x/.platformio/packages/framework-arduinoespressif32/libraries/BLE/src/BLEScan.h:117:24: error: 'esp_ble_gap_periodic_adv_report_t' has not been declared
virtual void onReport(esp_ble_gap_periodic_adv_report_t params) {}
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /Users/x/.platformio/packages/framework-arduinoespressif32/libraries/BLE/src/BLEDevice.h:20,
from src/ble/ble.cpp:4:
/Users/x/.platformio/packages/framework-arduinoespressif32/libraries/BLE/src/BLEUtils.h:59:21: error: expected ';' at end of member declaration
static const char* searchEventTypeToString(esp_gap_search_evt_t searchEvt);
^~~~~~~~~~~~~~~~~~~~~~~
;
/Users/x/.platformio/packages/framework-arduinoespressif32/libraries/BLE/src/BLEUtils.h:59:65: error: expected ')' before 'searchEvt'
static const char* searchEventTypeToString(esp_gap_search_evt_t searchEvt);
~ ^~~~~~~~~~
)
In file included from /Users/x/.platformio/packages/framework-arduinoespressif32/libraries/BLE/src/BLEAdvertisedDevice.h:17,
from /Users/x/.platformio/packages/framework-arduinoespressif32/libraries/BLE/src/BLEClient.h:22,
from /Users/x/.platformio/packages/framework-arduinoespressif32/libraries/BLE/src/BLEDevice.h:19,
from src/ble/eddystone_tlm.cpp:7:
/Users/x/.platformio/packages/framework-arduinoespressif32/libraries/BLE/src/BLEScan.h:33:2: error: 'esp_ble_gap_phy_t' does not name a type; did you mean 'esp_ble_key_t'?
esp_ble_gap_phy_t adv_phy; /*!< periodic advertising phy type */
^~~~~~~~~~~~~~~~~
esp_ble_key_t
/Users/x/.platformio/packages/framework-arduinoespressif32/libraries/BLE/src/BLEScan.h:98:2: error: 'esp_ble_scan_params_t' does not name a type; did you mean 'esp_ble_sm_param_t'?
esp_ble_scan_params_t m_scan_params;
^~~~~~~~~~~~~~~~~~~~~
esp_ble_sm_param_t
/Users/x/.platformio/packages/framework-arduinoespressif32/libraries/BLE/src/BLEScan.h:117:24: error: 'esp_ble_gap_periodic_adv_report_t' has not been declared
virtual void onReport(esp_ble_gap_periodic_adv_report_t params) {}
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /Users/x/.platformio/packages/framework-arduinoespressif32/libraries/BLE/src/BLEDevice.h:20,
from src/ble/eddystone_tlm.cpp:7:
/Users/x/.platformio/packages/framework-arduinoespressif32/libraries/BLE/src/BLEUtils.h:59:21: error: expected ';' at end of member declaration
static const char* searchEventTypeToString(esp_gap_search_evt_t searchEvt);
^~~~~~~~~~~~~~~~~~~~~~~
;
/Users/x/.platformio/packages/framework-arduinoespressif32/libraries/BLE/src/BLEUtils.h:59:65: error: expected ')' before 'searchEvt'
static const char* searchEventTypeToString(esp_gap_search_evt_t searchEvt);
~ ^~~~~~~~~~
)
I managed to remove the compilation errors by adding the following into my build_flags
configuration in platformio.ini
-DBLE_42_FEATURE_SUPPORT=TRUE -DBLE_50_FEATURE_SUPPORT=TRUE
Here's my complete platformio.ini
[env:ttgo-t-watch]
platform = https://github.com/platformio/platform-espressif32.git#feature/arduino-upstream
board = ttgo-t-watch
framework = arduino
platform_packages =
framework-arduinoespressif32@https://github.com/espressif/arduino-esp32.git#2.0.3-RC1
build_flags = -DBLE_42_FEATURE_SUPPORT=TRUE -DBLE_50_FEATURE_SUPPORT=TRUE
@alwint3r Thanks for testing, I'm adding this to our Roadmap and we will take a look on it.
Hey there,
have same issue with TTGO V3... When (approx) will you fix this?
Thanks :-)
Hello, can you please retest this on v2.0.14? Thanks
weird, enabling Bluetooth in menuconf
doesn't enable CONFIG_BT_BLE_42_FEATURES_SUPPORTED
Board
ESP32 Dev Module
Device Description
esp32 devkit
Hardware Configuration
esp32 devkit
Version
latest master
IDE Name
IDF Component
Operating System
Windows 10
Flash frequency
40MHz
PSRAM enabled
yes
Upload speed
115200
Description
I am stuck with this issue where i am not able to find the root cause, i have been enabling and disabling various of BLE option in menuconfig but still build failed with the error type are still undefined as below:
In file included from ../components/arduino/libraries/BLE/src/BLEServer.h:20,
BLEAdvertising.h:72:2: error: 'esp_ble_adv_data_t' does not name a type; did you mean 'esp_ble_adv_data_type'
/components/arduino/libraries/BLE/src/BLEAdvertising.h:73:2: error: 'esp_ble_adv_params_t' does not name a type; did you mean 'esp_ble_sm_param_t'?
/components/arduino/libraries/BLE/src/BLEScan.h:34:2: error: 'esp_ble_gap_phy_t' does not name a type; did you mean 'esp_ble_key_t'?
../components/arduino/libraries/BLE/src/BLEUtils.h:59:21: error: expected ';' at end of member declaration
../components/arduino/libraries/BLE/src/BLEUtils.h:59:65: error: expected ')' before 'searchEvt'
../components/arduino/libraries/BLE/src/BLEScan.h:118:24: error: 'esp_ble_gap_periodic_adv_report_t' has not been declared
is this related to v4.4 are not supporting the ble advertising modules or is there additional combination or pair to be enabled in the menuconfig to load this type? i have check the CMakeList to define all the required library properly. but yet not sure is there is anything i miss.
Anyone have the same issue on 4.4 or any suggestion for me to investigate further?
Thank you
Sketch
Debug Message
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide