Go Down

Topic: ESP8266 UDP first send packet (Read 1 time) previous topic - next topic

jgrina

Why does udp sendPacket wait for a received packet before sending? It is only the first send command that waits. If I force a transmit from host, a burst of "sent" packets appears and everything works great from there. Sends and receives go. I'm using Arduino IDE version 1.6.8 on a Win 7 machine for this listing, but the same happened with version 1.6.5 on my Win 10 machine. The ESP is an Adafruit Huzzah breakout board, but I also tried the ESP feather 8266 and the NodeMCU boards with the same result

The attached zipfiles are the program, monitor activity from the host and Arduino com port monitor

The arduino side file shows the ESP messages which have the sends, but no response until the host sends "!Start" message. The host side shows no messages until after the !Start message, then a burst of messages with responses to each message.

I've tried several WiFi.modes, plus udp.flush(), udp.stop(), commands, but nothing changes.

Jim

mrburnette

I do not recall that issue, but it has been 6+ months since I played with UDP on the ESP8266.

http://www.hackster.io/rayburne/tardis-time-esp8266-ap-webserver-gps


Ray

akifoktar

i experinced same and solved like this. When parsepacket command arduino memorize remote ip and can send there. but after 0 response from parsepacket command arduino forgets remoteip and cannot send. so i created a variable equal to remote ip and use this variable as remote ip when send package. By this i could send package any time i want even if i dont get package.

Go Up