Code:
void fpm_wakup_cb_func1(void)
{
wifi_fpm_close();
wifi_set_opmode(STATION_MODE);
wifi_station_connect();
}
void user_func()
{
wifi_station_disconnect();
wifi_set_opmode(NULL_MODE);
wifi_fpm_set_sleep_type(MODEM_SLEEP_T);
wifi_fpm_open();
// wakeup automatically when timeout.
wifi_fpm_set_wakeup_cb(fpm_wakup_cb_func1); // Set wakeup callback
wifi_fpm_do_sleep(50*1000);
#endif
}
Statistics: Posted by Her Mary — Wed Jun 26, 2019 11:24 am
Code:
wifi_station_disconnect();
wifi_set_opmode(NULL_MODE);
wifi_set_sleep_type(MODEM_SLEEP_T);
wifi_fpm_open();
wifi_fpm_do_sleep(5*60*1000); //sleep for 1min
Code:
wifi_set_opmode(STATIONAP_MODE);
wifi_station_connect(); // connect to AP
Statistics: Posted by Guest — Wed Jun 12, 2019 11:57 pm
Statistics: Posted by Guest — Tue Jun 11, 2019 5:14 pm