diff --git a/libraries/WiFi/examples/WPS/WPS.ino b/libraries/WiFi/examples/WPS/WPS.ino index 1a6cc6114ee..fc353dcbfb8 100644 --- a/libraries/WiFi/examples/WPS/WPS.ino +++ b/libraries/WiFi/examples/WPS/WPS.ino @@ -25,7 +25,15 @@ WPS (pin is 00000000) #define ESP_WPS_MODE WPS_TYPE_PBC void wpsStart() { - esp_wps_config_t config = WPS_CONFIG_INIT_DEFAULT(ESP_WPS_MODE); + esp_wps_config_t config; + memset(&config, 0, sizeof(esp_wps_config_t)); + //Same as config = WPS_CONFIG_INIT_DEFAULT(ESP_WPS_MODE); + config.wps_type = ESP_WPS_MODE; + strcpy(config.factory_info.manufacturer, "ESPRESSIF"); + strcpy(config.factory_info.model_number, CONFIG_IDF_TARGET); + strcpy(config.factory_info.model_name, "ESPRESSIF IOT"); + strcpy(config.factory_info.device_name, "ESP DEVICE"); + strcpy(config.pin, "00000000"); esp_err_t err = esp_wifi_wps_enable(&config); if (err != ESP_OK) { Serial.printf("WPS Enable Failed: 0x%x: %s\n", err, esp_err_to_name(err));