UDP Broadcast packet reception is jittery
- Dominant language
- C++
- Stars
- 16.7k
- Forks
- 13.1k
- PR merge metrics
- No merged PRs in 30d
Description
### Basic Infos
#### Hardware
Hardware: ESP8266-12E
Core Version: latest from the repository on 5/25/2017 (not using release, using latest git repo)
### Description
I have an application where a master device keeps slave ESP devices in sync using UDP broadcast packets. The packets include a time stamp, in ms, of where the remote ESP device should be in a playback routine. The ESP slave uses a ticker callback to increment an index value (a frame position) and when a UDP packet is received it is converted to another frame index and compared to the on board one. In a perfect world they should always be the same.
Debug output shows the local index value, and the index value received by the sync packet.
I've found the ESP is reporting heavy jitter when these sync packets are sent broadcast:
752
749
Speeding up
768
768
Synced
784
787
Slowing down
800
798
Speeding up
816
818
Slowing down
832
829
Speeding up
848
848
Synced
864
867
Slowing down
But is working ideally when sent unicast:
96
96
Synced
112
112
Synced
128
128
Synced
144
144
Synced
160
160
Synced
176
176
Synced
Both the python test script and ESP code are attached so you should be able to reproduce. I am using AsyncUDP, however see the same jitter when using Arduino native API calls for UDP.
[ErrorReport.zip](https://github.com/esp8266/Arduino/files/1033204/ErrorReport.zip)
### Settings in IDE
Module: ?Generic ESP8266 Module?
Flash Size: ?1MB?
CPU Frequency: ?160Mhz?
Flash Mode: ?dio?
Flash Frequency: ?40Mhz?
Upload Using: ?SERIAL?
Reset Method: ?ck / nodemcu?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.