UDP Broadcast packet reception is jittery
- Vorherrschende Sprache
- C++
- Sterne
- 16.7k
- Forks
- 13.1k
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
### 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?
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Beginne damit, ErrorReport.zip zu entpacken und das angehängte Python-Testskript sowie den ESP-Code zu überprüfen. Reproduziere anschließend das unterschiedliche Verhalten von Unicast und UDP-Broadcast. Vergleiche den Zeitpunkt des Paketempfangs und die gemeldeten Unterschiede bei den Frame-Indizes; abgeschlossen ist die Aufgabe, wenn der Broadcast-Jitter erklärt und eine verifizierte Änderung oder eine reproduzierbare Projektanleitung dokumentiert ist.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- cpp, python
- Bereich
- embedded-iot, networking
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100