Chat freely about anything...

User avatar
By noumes
#38450 Previous issue aside, my device seems to stop taking UDP requests after ~20seconds

The code is a mirror of the
Sample – Light an LED based on the arrival of a UDP datagram
from Kolban's book on ESP8266, and can be seen here: https://github.com/NoumanSaleem/esp8266 ... ser_main.c

running a bash command of:
Code: Select allwhile true; do echo -n “foo” | nc -4u -w1 192.168.1.67 25867; sleep 2; done


I get the following output:

Listening for data
Received data!
Received data!
Received data!
Received data!
pm open phy_2,type:2 0 0
Received data!
Received data!


However, it stops after about ~20 seconds.
User avatar
By noumes
#38457 To add to the weirdness, if I run a ping alongside my udp test, it works smoothly, well beyond 20 seconds. (tested 5+mins)

As soon as I stop the ping, leaving the udp test loop, it dies after ~45 seconds.

The device also disappears from the router clients list when it stops responding.