File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
libraries/WiFi/examples/WPS Expand file tree Collapse file tree 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)
2525#define ESP_WPS_MODE WPS_TYPE_PBC
2626
2727void 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" );
2937 esp_err_t err = esp_wifi_wps_enable (&config);
3038 if (err != ESP_OK) {
3139 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