Description
Basic Infos
Hardware
Hardware: Adafruit Huzzah, NodeMCU, Adafruit Feather
Core Version: 2.1
Description
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. I have updated the libraries to the latest code while installing IDE version 1.6.8.
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.
With a looping program, this is not a major problem, I can use the monitor send function to start the ESP8266 noodes, but I want to use battery power and deep sleep function for some nodes. Deep sleep erases any knowledge of previous packet receives, so it must receive a packet every time it wakes up.
Host side is Win 7, MegunoLink Pro
I am using the Timer function in MegunoLink to broadcast a "!Start" message every 1/2 second
Jim
Settings in IDE
Module: Huzzah, generic ESP, NodeMCU 1.0
Flash Size: 4Mb
CPU Frequency: 80mhz
Flash Mode: DIO
Flash Frequency: 40Mhz
Upload Using: serial
Reset Method: ck