Skip to content

[2.0.0] Unnecessary compile error in WiFiProv.cpp when CONFIG_BLUEDROID_ENABLED is not defined #4828

@william-ferguson-au

Description

@william-ferguson-au

Hardware:

Board: ESP32 Wrover
Core Installation version: ESP-IDF 4.3, Arduino-ESP32 v4.2
Computer OS: Windows 10

Description:

Trying to b Build esp-idf app with arduino-esp32 as a component.
When I do I get a compilation failure

../components/arduino-esp32/libraries/WiFiProv/src/WiFiProv.cpp: In function 'void get_device_service_name(prov_scheme_t, char*, size_t)':
../components/arduino-esp32/libraries/WiFiProv/src/WiFiProv.cpp:59:23: error: 'WIFI_PROV_SCHEME_BLE' was not declared in this scope
     if(prov_scheme == WIFI_PROV_SCHEME_BLE) {
                       ^~~~~~~~~~~~~~~~~~~~
../components/arduino-esp32/libraries/WiFiProv/src/WiFiProv.cpp:59:23: note: suggested alternative: 'WIFI_PROV_SCHEME_MAX'
     if(prov_scheme == WIFI_PROV_SCHEME_BLE) {
                       ^~~~~~~~~~~~~~~~~~~~
                       WIFI_PROV_SCHEME_MAX
.

This is occurring because I have configured BT and BLE off as I only intend to support Soft AP provisioning (and in fact I'm not even using the Arduino-sp32 provisioning because using the esp-idf directly is so easy). Because CONFIG_BLUEDROID_ENABLED is not defined, the WIFI_PROV_SCHEME_BLE is not declared so it cannot be referenced in WifiProv.cpp

But the crazy thing is, WIFI_PROV_SCHEME_BLE doesn't need to be referenced because both paths of the if and #if generate the same code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: StaleIssue is stale stage (outdated/stuck)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions