Closed DenkyTuna closed 8 months ago
Thanks for the report. I am going to investigate this issue.
Using the base ESP32, I am unable to replicate this issue exactly. But I am seeing that when the ESP32 receives 512 slots, it reports the packet.size
as 511. It reports this value consistently. I suspect these issue are related.
For temporary solution, if there is a way to "regulate" the input channel count, that will work for the people who work with small shows and don't need full 512ch capability.
I believe I have fixed this issue in v4.0.0. I ran some ad-hoc tests that passed. I'll close this for now; let me know if you have any questions!
Describe the bug
If the number of received DMX channels is certain amount near 512ch,
packet.size
will be unstable.To reproduce
Serial.printf("packet.size is %d and DMX_PACKET_SIZE is %d\n", packet.size, DMX_PACKET_SIZE);
afterSerial.printf("Start code is 0x%02X and slot 1 is 0x%02X\n", data[0], data[1]);
Result
When the number of channel is 512, and slot 1 is fixed 0x97, Start code is 0x00 and slot 1 is 0x97 packet.size is 52 and DMX_PACKET_SIZE is 513 Start code is 0x00 and slot 1 is 0x97 packet.size is 396 and DMX_PACKET_SIZE is 513 Start code is 0x00 and slot 1 is 0x97 packet.size is 142 and DMX_PACKET_SIZE is 513 Start code is 0x00 and slot 1 is 0x97 packet.size is 487 and DMX_PACKET_SIZE is 513 Start code is 0x00 and slot 1 is 0x97 packet.size is 257 and DMX_PACKET_SIZE is 513 Start code is 0x00 and slot 1 is 0x97 packet.size is 27 and DMX_PACKET_SIZE is 513 Start code is 0x00 and slot 1 is 0x97 packet.size is 370 and DMX_PACKET_SIZE is 513 Start code is 0x00 and slot 1 is 0x97 packet.size is 192 and DMX_PACKET_SIZE is 513 ..... (sometimes
Serial.println("DMX was disconnected.");
is called and DMX input stops.)When the number of channel is 511, and slot 1 is fixed 0x97, Start code is 0x00 and slot 1 is 0x00 packet.size is 511 and DMX_PACKET_SIZE is 513 Start code is 0x00 and slot 1 is 0x00 packet.size is 511 and DMX_PACKET_SIZE is 513 Start code is 0x00 and slot 1 is 0x00 packet.size is 511 and DMX_PACKET_SIZE is 513 Start code is 0x00 and slot 1 is 0x00 packet.size is 511 and DMX_PACKET_SIZE is 513 ....
When the number of channel is 510, and slot 1 is fixed 0x97, Start code is 0x00 and slot 1 is 0x97 packet.size is 511 and DMX_PACKET_SIZE is 513 Start code is 0x00 and slot 1 is 0x97 packet.size is 511 and DMX_PACKET_SIZE is 513 Start code is 0x00 and slot 1 is 0x97 packet.size is 511 and DMX_PACKET_SIZE is 513 ...
When the number of channel is 500, and slot 1 is fixed 0x97, Start code is 0x00 and slot 1 is 0x97 packet.size is 501 and DMX_PACKET_SIZE is 513 Start code is 0x00 and slot 1 is 0x97 packet.size is 501 and DMX_PACKET_SIZE is 513 Start code is 0x00 and slot 1 is 0x97 packet.size is 501 and DMX_PACKET_SIZE is 513 Start code is 0x00 and slot 1 is 0x97 packet.size is 501 and DMX_PACKET_SIZE is 513
Analysys
From above result, it can be said
packet.size
, also unstable DMX inputI don't know if this is specific to M5Core or general ESP32-S3 issue.
Environment
OS: Windows 10 IDE &IDE Version: Arduino IDE 2.2.1 Repository Version: 3.1.0 (the newest one)