[Help!] Why I sending Http data Fail after "esp_light_sleep()" ?

Posts: 1
Joined: Wed Nov 18, 2020 11:39 am

[Help!] Why I sending Http data Fail after "esp_light_sleep()" ?

Postby A_Normal_David » Wed Nov 18, 2020 12:22 pm

Hey guys. I met a problem.
I connectted to wifi and send a request to http server after started the device.
And then , I setting up "esp_sleep_enable_timer_wakeup(3000000);" and "esp_light_sleep_start();" . But after timeout , wake up from sleep, I try "example_connect();"(I knew sleeping time would shut down wifi connect) and sending http request , It didn't work.
Then I try "example_disconnect()" before "example_connect()" again, before sending http data. it cause a Error: "netif already added".
I did not give up , I try simply "esp_wifi_disconnect()" and "esp_wifi_connect();" before sending http data, it would just connect fail of socket , printing ".. socket connect failed errno=118".


Any one knows the answer? thanks

Her Mary
Posts: 494
Joined: Mon Oct 27, 2014 11:09 am

Re: [Help!] Why I sending Http data Fail after "esp_light_sleep()" ?

Postby Her Mary » Wed Nov 25, 2020 11:49 am

Could these examples help?https://github.com/espressif/ESP8266_RTOS_SDK/tree/master/examples/protocols

Who is online

Users browsing this forum: No registered users and 11 guests