Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion libraries/WiFi/examples/WPS/WPS.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
Loading