The SDK documentation does't provide a lot of information about how WPS works and the example included does't seems to work as well.
Here's the code I'm runnig:
LOCAL void ICACHE_FLASH_ATTR
user_wps_status_cb(int status)
{
switch (status) {
case WPS_CB_ST_SUCCESS:
console_printf(">>WPS OK!!<<");
wifi_wps_disable();
wifi_station_connect();
wifi_station_dhcpc_start();
wifi_station_set_auto_connect(1);
break;
case WPS_CB_ST_FAILED:
case WPS_CB_ST_TIMEOUT:
console_printf(">>WPS NOK!!<<");
break;
}
}
void user_init(void)
{
struct station_config stationConf;
wifi_set_opmode(STATION_MODE);
UARTInit(BIT_RATE_115200);
console_printf("Hello world!\r\n");
os_printf("SDK version: %s \n", system_get_sdk_version());
system_set_os_print(1);
wifi_station_set_auto_connect(0);
wifi_wps_disable();
wifi_wps_enable(WPS_TYPE_PBC);
wifi_set_wps_cb(user_wps_status_cb);
wifi_wps_start();
}
The terminal output is this:
Hello world!
SDK version: 1.5.0
wifi_wps_enable
mode : sta(18:fe:34:d2:df:a2)
add if0
And that's it, I don't get anything more. The callback function isn't called as well.
Anyone got the WPS feature to work?
Regards,