preview
The little 3.5" and 5" USB screens people put in PC cases (and on desks as stat displays) are fun to hack on, but most of them only ship a Windows app. If you capture what that app sends, 99% of the bytes are picture data, and the handful of real commands (brightness, orientation, “start frame”) are easy to miss in between.
I wrote up what helped me separate them: JPEG frames give themselves away with FF D8 at the start and FF D9 at the end, raw RGB565 frames are exactly width x height x 2 bytes and look like slowly changing 16-bit values, and the commands are the short transfers that sit right before each frame or show up when you move a slider. Once you know the frame size, the short header in front of it (size, coordinates, a counter) usually falls out quickly.
The write-up uses examples from usb-rea, an open-source tool I made that does this split on a capture automatically and drafts a small Python driver, but the checks work just as well by hand in Wireshark.
If you have one of these screens that nothing on Linux supports yet, I am curious which ones, there are a lot of rebadged variants out there.
The little 3.5" and 5" USB screens people put in PC cases (and on desks as stat displays) are fun to hack on, but most of them only ship a Windows app. If you capture what that app sends, 99% of the bytes are picture data, and the handful of real commands (brightness, orientation, “start frame”) are easy to miss in between.
I wrote up what helped me separate them: JPEG frames give themselves away with FF D8 at the start and FF D9 at the end, raw RGB565 frames are exactly width x height x 2 bytes and look like slowly changing 16-bit values, and the commands are the short transfers that sit right before each frame or show up when you move a slider. Once you know the frame size, the short header in front of it (size, coordinates, a counter) usually falls out quickly.
The write-up uses examples from usb-rea, an open-source tool I made that does this split on a capture automatically and drafts a small Python driver, but the checks work just as well by hand in Wireshark.
If you have one of these screens that nothing on Linux supports yet, I am curious which ones, there are a lot of rebadged variants out there.