ESP8266 Developer Zone The Official ESP8266 Forum 2016-01-28T12:13:58+08:00 https://bbs.espressif.com:443/feed.php?f=7&t=1617 2016-01-28T12:13:58+08:00 2016-01-28T12:13:58+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1617&p=5552#p5552 <![CDATA[Re: Wi-Fi drops after 20-40 seconds]]> Statistics: Posted by noumes — Thu Jan 28, 2016 12:13 pm


]]>
2016-01-20T16:49:53+08:00 2016-01-20T16:49:53+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1617&p=5457#p5457 <![CDATA[Re: Wi-Fi drops after 20-40 seconds]]>
Here is an example of UDP : http://bbs.espressif.com/viewtopic.php?f=31&t=230

Please notice that your "esp_udp udp;" is a local variable, it will be released when "setupUDP()" finish.

Statistics: Posted by ESP_Faye — Wed Jan 20, 2016 4:49 pm


]]>
2016-01-14T11:55:08+08:00 2016-01-14T11:55:08+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1617&p=5373#p5373 <![CDATA[Re: Wi-Fi drops after 20-40 seconds]]>
Thanks for your reply.

I have changed:

Code:

wifi_set_opmode_current(STATION_MODE);

to

Code:

wifi_set_opmode_current(STATIONAP_MODE);


However, I have the same result.


Received data!
is a UDP request callback registered with

espconn_regist_recvcb


In addition, I am also writing the Wifi events

Code:

LOCAL void wifiEventHandler(System_Event_t *event) {
  switch (event->event) {
    case EVENT_STAMODE_GOT_IP:
      os_printf("IP: %d.%d.%d.%d\n", IP2STR(&event->event_info.got_ip.ip));
      setupUDP();
    break;
    default:
      os_printf("WiFi Event: %d\n", event->event);
  }
}
...
wifi_set_event_handler_cb(wifiEventHandler);


I see

Code:

WiFi Event: 7
outputted constantly. My "Received Data" stops after the same duration, around 20 seconds, but the Wifi Event output continues.

The user_main.c can be viewed here: https://github.com/NoumanSaleem/esp8266 ... ser_main.c

Thanks

Statistics: Posted by noumes — Thu Jan 14, 2016 11:55 am


]]>
2016-01-13T14:20:38+08:00 2016-01-13T14:20:38+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1617&p=5355#p5355 <![CDATA[Re: Wi-Fi drops after 20-40 seconds]]>
What is the "Received data!" ? A TCP packet ?

Does the ESP8266 in station-only mode ?

Please set ESP8266 in station+softAP mode, and try it again.

Thanks for your interest in ESP8266 !

Statistics: Posted by ESP_Faye — Wed Jan 13, 2016 2:20 pm


]]>
2016-01-13T12:29:34+08:00 2016-01-13T12:29:34+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1617&p=5352#p5352 <![CDATA[Re: Wi-Fi drops after 20-40 seconds]]>

connected with iFi, channel 6
dhcp client start...
WiFi Event: 0
ip:192.168.1.67,mask:255.255.255.0,gw:192.168.1.254
IP: 192.168.1.67
Listening for data
Received data!
Received data!
Received data!
Received data!
pm open,type:2 0
Received data!
Received data!
Received data!
Received data!
chg_B1:-40


20 seconds and it stops receiving anything

Statistics: Posted by noumes — Wed Jan 13, 2016 12:29 pm


]]>
2016-01-13T10:56:39+08:00 2016-01-13T10:56:39+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1617&p=5350#p5350 <![CDATA[[Solved] Wi-Fi drops after 20-40 seconds]]>
Trying to run a simple application on the ESP8266, specifically the Adafruit HUZZAH ESP8266 breakout.

https://github.com/NoumanSaleem/esp8266-hello-world

The application is compiled using https://github.com/pfalcon/esp-open-sdk, under sdk 1.5, and flashed using esptool.py.

After the app starts, I am able to see my request debug output on my serial monitor, however it stops responding between 20-40 seconds on average. After it stops responding, I can then see the device as inactive under my router.

Here is the command I am running:

Code:

while true; do echo -n “fewb” | nc -4u -w1 192.168.1.67 25867; sleep 2; done


To add to the weirdness, if I run a ping in parallel to my command above, everything works fine. Have tested this as working for 5+ minutes.

Any help is greatly appreciated.

Statistics: Posted by noumes — Wed Jan 13, 2016 10:56 am


]]>