File tree 1 file changed +9
-1
lines changed
libraries/WiFi/examples/WPS
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,15 @@ WPS (pin is 00000000)
25
25
#define ESP_WPS_MODE WPS_TYPE_PBC
26
26
27
27
void wpsStart () {
28
- esp_wps_config_t config = WPS_CONFIG_INIT_DEFAULT (ESP_WPS_MODE);
28
+ esp_wps_config_t config;
29
+ memset (&config, 0 , sizeof (esp_wps_config_t ));
30
+ // Same as config = WPS_CONFIG_INIT_DEFAULT(ESP_WPS_MODE);
31
+ config.wps_type = ESP_WPS_MODE;
32
+ strcpy (config.factory_info .manufacturer , " ESPRESSIF" );
33
+ strcpy (config.factory_info .model_number , CONFIG_IDF_TARGET);
34
+ strcpy (config.factory_info .model_name , " ESPRESSIF IOT" );
35
+ strcpy (config.factory_info .device_name , " ESP DEVICE" );
36
+ strcpy (config.pin , " 00000000" );
29
37
esp_err_t err = esp_wifi_wps_enable (&config);
30
38
if (err != ESP_OK) {
31
39
Serial.printf (" WPS Enable Failed: 0x%x: %s\n " , err, esp_err_to_name (err));
You can’t perform that action at this time.
0 commit comments