From cbd72445c0c8f82bde529895256f676794ee07cb Mon Sep 17 00:00:00 2001 From: Xiretza Date: Mon, 20 Jun 2022 13:59:01 +0200 Subject: [PATCH] doc: add packet structure to README --- README.md | 88 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) diff --git a/README.md b/README.md index 8f298f0..4ff53f7 100644 --- a/README.md +++ b/README.md @@ -13,3 +13,91 @@ Because blinkenwall v3 has `64 * 96 = 6144` pixels, driving it at 100 FPS requir (typically SPI), so this would require coordinating several microcontrollers in parallel. A much more integrated solution is to instantiate as many WS2812 drivers as desired in an FPGA, then point the entire video firehose at the FPGA. + +## Ethernet communication + +The controller accepts UDP packets containing image data on port 61437 ("PIXEL"). Each packet +contains color data for one strand of LEDs. + +The packet structure is as follows: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
000102030405060708090a0b0c0d0e0f
00magic (0x5049_584c)strand numberframe number0px1 Rpx1 Gpx1 B
100px2 Rpx2 Gpx2 B0px3 Rpx3 Gpx3 B0px4 Rpx4 Gpx4 B...
+ +Every packet begins with a magic number `0x5049584c` (ASCII for "PIXL"), followed by the strand +number and the frame number. All numbers are big endian. After the header follows the pixel data, +separated into one 4-byte word per LED. + +Once all strands for a given frame number have been received and the video page has been flipped, +the controller answers with a confirmation packet: + + + + + + + + + + + + + + + + + + + + + + + + + +
000102030405060708090a0b0c0d0e0f
00frame number