Skip to content

Commit 9d3fa6b

Browse files
authored
fixes preprocessor test (#8485)
* fixes preprocessor test When using `#define USE_SOFT_AP` Change `&& not USE_SOFT_AP` ==> `&& !defined(USE_SOFT_AP)` * Adds any BLE capable device in WiFiProv.ino Removing ESP32 restriction for BLE Provisioning.
1 parent e9f4572 commit 9d3fa6b

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

Diff for: libraries/WiFiProv/examples/WiFiProv/WiFiProv.ino

+5-8
Original file line numberDiff line numberDiff line change
@@ -62,24 +62,21 @@ void setup() {
6262
Serial.begin(115200);
6363
WiFi.onEvent(SysProvEvent);
6464

65-
#if CONFIG_IDF_TARGET_ESP32 && CONFIG_BLUEDROID_ENABLED && not USE_SOFT_AP
65+
// BLE Provisioning using the ESP SoftAP Prov works fine for any BLE SoC, incuding ESP32, ESP32S3 and ESP32C3.
66+
#if CONFIG_BLUEDROID_ENABLED && !defined(USE_SOFT_AP)
6667
Serial.println("Begin Provisioning using BLE");
6768
// Sample uuid that user can pass during provisioning using BLE
6869
uint8_t uuid[16] = {0xb4, 0xdf, 0x5a, 0x1c, 0x3f, 0x6b, 0xf4, 0xbf,
6970
0xea, 0x4a, 0x82, 0x03, 0x04, 0x90, 0x1a, 0x02 };
7071
WiFiProv.beginProvision(WIFI_PROV_SCHEME_BLE, WIFI_PROV_SCHEME_HANDLER_FREE_BTDM, WIFI_PROV_SECURITY_1, pop, service_name, service_key, uuid, reset_provisioned);
72+
log_d("ble qr");
73+
WiFiProv.printQR(service_name, pop, "ble");
7174
#else
7275
Serial.println("Begin Provisioning using Soft AP");
7376
WiFiProv.beginProvision(WIFI_PROV_SCHEME_SOFTAP, WIFI_PROV_SCHEME_HANDLER_NONE, WIFI_PROV_SECURITY_1, pop, service_name, service_key);
74-
#endif
75-
76-
#if CONFIG_BLUEDROID_ENABLED && not USE_SOFT_AP
77-
log_d("ble qr");
78-
WiFiProv.printQR(service_name, pop, "ble");
79-
#else
8077
log_d("wifi qr");
8178
WiFiProv.printQR(service_name, pop, "softap");
82-
#endif
79+
#endif
8380
}
8481

8582
void loop() {

0 commit comments

Comments
 (0)