Delay function not called after "WiFi force sleep begin" function

rupak426
Posts: 23
Joined: Fri Apr 15, 2016 2:16 am

Delay function not called after "WiFi force sleep begin" function

Postby rupak426 » Fri Apr 15, 2016 2:24 am

Hi Experts,

I have wi-fi running in AT+STA mode using Arduino 1.6.8. ESP-8266 firmware is based on SDK1.5
I want to put the wifi AP into modem sleep mode for a specific time x.

Serial.println("diconnecting client and wifi");
wifi_set_opmode(NULL_MODE);
wifi_fpm_set_sleep_type(MODEM_SLEEP_T);
wifi_fpm_open();
WiFi.disconnect();
WiFi.mode(WIFI_OFF);
Serial.println("WiFi Off, going for forde sleep");
WiFi.forceSleepBegin();
delay(10000);


Expectation is that after WiFi force sleep starts, AP should wait for WiFi to start till delay timer.
But here delay function is not being called.

Can anyone help with this

thanks,

ESP_Faye
Posts: 1646
Joined: Mon Oct 27, 2014 11:08 am

Re: Delay function not called after "WiFi force sleep begin" function

Postby ESP_Faye » Mon May 09, 2016 7:34 pm

Hi,

How about calling delay before the fpm(force sleep) APIs?

Or use os_timer_arm to set a timer to call fpm APIs.

Thanks for your interest in ESP8266 !

Who is online

Users browsing this forum: No registered users and 1 guest