Curl commands stop working after a few minutes

ScottR
Posts: 14
Joined: Wed Dec 03, 2014 10:29 pm

Curl commands stop working after a few minutes

Postby ScottR » Fri Feb 20, 2015 10:18 pm

I have compiled the IoT_Demo configured as a light. I have sent curl commands in both SoftAP mode and client mode (through my router) to turn the light on/off and change colours. However I have observed that in both SoftAP and client modes the chip stops responding to curl commands after a few minutes, but the wifi link seems to be maintained (still shows up on my network). i have to disconnect and re-connect to the ESP (not cycle ESP power - just cut the wifi link temporarily) and then the curl commands start working again.

I'm wondering if anyone else has experienced or noticed this. Any suggestions?

Also, is there a way to change the default SSID in the SDK? i can do it with curl after power on but can it be changed to flash a different SSID?

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

Re: Curl commands stop working after a few minutes

Postby ESP_Faye » Wed Feb 25, 2015 3:33 pm

Hi,

Thanks for your interest in ESP8266 !

Could you offer us you test code about this curl problem ?

you can call wifi_softap_set_config in user_init to set ssid

Code: Select all

        struct softap_config config;

        wifi_softap_get_config(&config);

        os_memset(config.ssid, 0, sizeof(config.ssid));
        os_memcpy(config.ssid, "abc", 3);

        config.ssid_len = 3; // or 0

        wifi_softap_set_config(&config);

ScottR
Posts: 14
Joined: Wed Dec 03, 2014 10:29 pm

Re: Curl commands stop working after a few minutes

Postby ScottR » Mon Mar 02, 2015 12:25 pm

It seems that the router was disconnecting the ESP module after a period of inactivity. I actually had to reset the router when this happened as resetting the ESP did not fix it. I have not been able to cause it to happen again since making some changes to the code with the new SDK. If I see it happen again I will try to get you some feedback.

Who is online

Users browsing this forum: No registered users and 185 guests