File tree 6 files changed +16
-10
lines changed
WiFiProv/examples/WiFiProv
6 files changed +16
-10
lines changed Original file line number Diff line number Diff line change @@ -293,7 +293,7 @@ endforeach()
293
293
set (includedirs variants/${CONFIG_ARDUINO_VARIANT} / cores/esp32/ ${ARDUINO_LIBRARIES_INCLUDEDIRS} )
294
294
set (srcs ${CORE_SRCS} ${ARDUINO_LIBRARIES_SRCS} )
295
295
set (priv_includes cores/esp32/libb64)
296
- set (requires spi_flash esp_partition mbedtls wpa_supplicant esp_adc esp_eth http_parser espressif__network_provisioning )
296
+ set (requires spi_flash esp_partition mbedtls wpa_supplicant esp_adc esp_eth http_parser)
297
297
set (priv_requires fatfs nvs_flash app_update spiffs bootloader_support bt esp_hid usb esp_psram ${ARDUINO_LIBRARIES_REQUIRES} )
298
298
299
299
if (NOT CONFIG_ARDUINO_SELECTIVE_COMPILATION OR CONFIG_ARDUINO_SELECTIVE_OpenThread)
@@ -304,6 +304,12 @@ if(NOT CONFIG_ARDUINO_SELECTIVE_COMPILATION OR CONFIG_ARDUINO_SELECTIVE_OpenThre
304
304
endif ()
305
305
endif ()
306
306
307
+ if (NOT CONFIG_ARDUINO_SELECTIVE_COMPILATION OR CONFIG_ARDUINO_SELECTIVE_RainMaker OR CONFIG_ARDUINO_SELECTIVE_WiFiProv)
308
+ if (NOT IDF_TARGET STREQUAL "esp32c2" )
309
+ list (APPEND requires espressif__network_provisioning)
310
+ endif ()
311
+ endif ()
312
+
307
313
idf_component_register(INCLUDE_DIRS ${includedirs} PRIV_INCLUDE_DIRS ${priv_includes} SRCS ${srcs} REQUIRES ${requires} PRIV_REQUIRES ${priv_requires} )
308
314
309
315
if (NOT CONFIG_FREERTOS_HZ EQUAL 1000 AND NOT "$ENV{ARDUINO_SKIP_TICK_CHECK} " )
Original file line number Diff line number Diff line change @@ -36,8 +36,8 @@ void sysProvEvent(arduino_event_t *sys_event) {
36
36
printQR (service_name, pop, " ble" );
37
37
#endif
38
38
break ;
39
- case ARDUINO_EVENT_PROV_INIT: wifi_prov_mgr_disable_auto_stop (10000 ); break ;
40
- case ARDUINO_EVENT_PROV_CRED_SUCCESS: wifi_prov_mgr_stop_provisioning (); break ;
39
+ case ARDUINO_EVENT_PROV_INIT: network_prov_mgr_disable_auto_stop (10000 ); break ;
40
+ case ARDUINO_EVENT_PROV_CRED_SUCCESS: network_prov_mgr_stop_provisioning (); break ;
41
41
default : ;
42
42
}
43
43
}
Original file line number Diff line number Diff line change @@ -52,8 +52,8 @@ void sysProvEvent(arduino_event_t *sys_event) {
52
52
printQR (service_name, pop, " ble" );
53
53
#endif
54
54
break ;
55
- case ARDUINO_EVENT_PROV_INIT: wifi_prov_mgr_disable_auto_stop (10000 ); break ;
56
- case ARDUINO_EVENT_PROV_CRED_SUCCESS: wifi_prov_mgr_stop_provisioning (); break ;
55
+ case ARDUINO_EVENT_PROV_INIT: network_prov_mgr_disable_auto_stop (10000 ); break ;
56
+ case ARDUINO_EVENT_PROV_CRED_SUCCESS: network_prov_mgr_stop_provisioning (); break ;
57
57
default : ;
58
58
}
59
59
}
Original file line number Diff line number Diff line change @@ -50,8 +50,8 @@ void sysProvEvent(arduino_event_t *sys_event) {
50
50
Serial.printf (" \n Connected to Wi-Fi!\n " );
51
51
digitalWrite (gpio_led, true );
52
52
break ;
53
- case ARDUINO_EVENT_PROV_INIT: wifi_prov_mgr_disable_auto_stop (10000 ); break ;
54
- case ARDUINO_EVENT_PROV_CRED_SUCCESS: wifi_prov_mgr_stop_provisioning (); break ;
53
+ case ARDUINO_EVENT_PROV_INIT: network_prov_mgr_disable_auto_stop (10000 ); break ;
54
+ case ARDUINO_EVENT_PROV_CRED_SUCCESS: network_prov_mgr_stop_provisioning (); break ;
55
55
default : ;
56
56
}
57
57
}
Original file line number Diff line number Diff line change @@ -37,8 +37,8 @@ void sysProvEvent(arduino_event_t *sys_event) {
37
37
printQR (service_name, pop, " ble" );
38
38
#endif
39
39
break ;
40
- case ARDUINO_EVENT_PROV_INIT: wifi_prov_mgr_disable_auto_stop (10000 ); break ;
41
- case ARDUINO_EVENT_PROV_CRED_SUCCESS: wifi_prov_mgr_stop_provisioning (); break ;
40
+ case ARDUINO_EVENT_PROV_INIT: network_prov_mgr_disable_auto_stop (10000 ); break ;
41
+ case ARDUINO_EVENT_PROV_CRED_SUCCESS: network_prov_mgr_stop_provisioning (); break ;
42
42
default : ;
43
43
}
44
44
}
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ void SysProvEvent(arduino_event_t *sys_event) {
38
38
case ARDUINO_EVENT_PROV_CRED_FAIL:
39
39
{
40
40
Serial.println (" \n Provisioning failed!\n Please reset to factory and retry provisioning\n " );
41
- if (sys_event->event_info .prov_fail_reason == NETWORK_PROV_STA_AUTH_ERROR ) {
41
+ if (sys_event->event_info .prov_fail_reason == NETWORK_PROV_WIFI_STA_AUTH_ERROR ) {
42
42
Serial.println (" \n Wi-Fi AP password incorrect" );
43
43
} else {
44
44
Serial.println (" \n Wi-Fi AP not found....Add API \" nvs_flash_erase() \" before beginProvision()" );
You can’t perform that action at this time.
0 commit comments