Repository navigation
Description
What happened?
Hello!
I'm sending real-time controls for a device running https://github.com/intermittech/QuinLED-Firmware
I'm having a flicker issue that I cannot find any satisfying answer for. I have 8 RGB 32-pixel led bars
With WLED's user interface lights control I don't see any flicker.
When I send ArtNet, sACN or DDP to the board over Ethernet, I get an occasional random flicker especially when I'm sending dark or even pure black: some random parts of random segments will vividly turn white.
I tried multiple rates of sending, from 20 to 120 hz to no avail.
But, again, sending the same shade through WLED's internal interface work fine so I don't think it's an electrical or wiring problem.
I tried with a very simple DDP sending code in C++ (attached here) that can reproduce said flickers.
What else can I try? what could be a cause of the flickers?
Here are wireshark recordings of the packets I am sending in artnet and ddp if anyone can see something wrong. I tried both with and without artnet sync, and in DDP all fits in one packet.
artnet.mp4
ddp.mp4
my ddp-sending code:
#include <algorithm>
#include <arpa/inet.h>
#include <cassert>
#include <chrono>
#include <cstring>
#include <netinet/in.h>
#include <stdio.h>
#include <sys/socket.h>
#include <unistd.h>
#pragma pack(push, 1)
struct ddp_packet
{
// v v x T S R Q P
static constexpr auto DDP_PUSH_FLAGS = uint8_t{0b0'1'0'0'0'0'0'1};
uint8_t flags = DDP_PUSH_FLAGS;
// to increment
// x x x x n n n n
uint8_t sequence{0b0'0'0'0'0'0'0'0};
// C R TTT SSS
static constexpr auto DDP_RGB8_TYPE = uint8_t{0b0'0'001'011};
uint8_t data_type = DDP_RGB8_TYPE;
// ID
static constexpr int DDP_ID_DISPLAY = 1;
static constexpr int DDP_ID_CONFIG = 250;
static constexpr int DDP_ID_STATUS = 251;
uint8_t src_dest_id = DDP_ID_DISPLAY;
uint32_t data_offset{};
uint16_t data_length{};
static constexpr int DDP_MAX_DATALEN = (480 * 3);
uint8_t data[4 + DDP_MAX_DATALEN];
};
#pragma pack(pop)
int main()
{
using namespace std::literals;
int sockfd = socket(AF_INET, SOCK_DGRAM, 0);
if (sockfd < 0) {
perror("Failed to create socket");
return 1;
}
sockaddr_in dest_addr;
memset(&dest_addr, 0, sizeof(dest_addr));
dest_addr.sin_family = AF_INET;
dest_addr.sin_port = htons(4048);
inet_pton(AF_INET, "192.168.0.190", &dest_addr.sin_addr);
ddp_packet packet{};
packet.data_length = htons(8 * 32 * 4);
packet.data_offset = 0;
std::fill_n(packet.data, sizeof(packet.data), 0);
static constexpr auto frame_duration = 33ms;
auto next_frame = std::chrono::steady_clock::now();
while (true) {
ssize_t sent = sendto(sockfd, &packet, sizeof(packet), 0,
(struct sockaddr*)&dest_addr, sizeof(dest_addr));
assert(sent == sizeof(packet));
packet.sequence = (packet.sequence + 1) & 0b00001111;
next_frame = std::chrono::steady_clock::now() + frame_duration;
// Busy wait to maximize precision to make sure this is not a problem
// due to incoming packet jitter. With wireshark I measure on average
// less than 5 microseconds of jitter from the 30hz frequency.
while (std::chrono::steady_clock::now() < (next_frame - 2500ns))
;
}
close(sockfd);
return 0;
}
To Reproduce Bug
Send low light intensity over DDP, ArtNet or s/ACN
Expected Behavior
No flickers
Install Method
Self-Compiled
What version of WLED?
0.15
Which microcontroller/board are you seeing the problem on?
Other
Relevant log/trace output
Anything else?
No response
Code of Conduct
- I agree to follow this project's Code of Conduct
Activity
blazoncek commentedon Jul 17, 2025
Most likely duplicate of #4389 if you are using level shifters. If not, add them.
jcelerier commentedon Jul 19, 2025
Hmm, in the post #4389 the flickers happen with the built-in presets of WLED.
In my case it only happens when sending external messages through Art-Net / sACN / DDP, but the built-in presets and controls never exhibit the flickers so I'm not sure it could be a hardware issue :/
DedeHai commentedon Jul 19, 2025
@jcelerier it is a very complex issue and has to do with hardware timing and buffer handling. The higher the load, the more likely it is to happen.
jcelerier commentedon Jul 19, 2025
I see. In my case the flickers happened starting from 20hz (I didnt't see any at lower frequencies but maybe it's just luck) and did not seem to be meaningfully different from when I was sending at 120hz.
I also tried running the presets and just sending an ICMP ping at high rate (1khz) to see if this would cause disturbance but did not see any flickers there when using the builtin presets. But maybe the ethernet chip is processing ping without forwarding that to the ESP so idk.
willmmiles commentedon Jul 23, 2025
To speak to your specfic test with ICMP: if you're using a dual-core device like a baseline ESP32 or an ESP32-S3, ICMP traffic should be handled entirely on the first core without interrupting the LED output from the second. TCP or UDP traffic that interacts with WLED, though, may trigger #4389.
If you can, please try either the current 0.16 nightly or the latest build from the 0.15.x branch (https://github.com/wled/WLED/actions/runs/16430469794), and select 'Use parallel I2S' from the LED settings screen. If this solves your problem, you've got #4389. (And if you're up for helping test the fix, try this build: https://github.com/willmmiles/WLED/actions/runs/16158643608)
github-actions commentedon Nov 20, 2025
Hey! This issue has been open for quite some time without any new comments now. It will be closed automatically in a week if no further activity occurs.
Thank you for using WLED! ✨