SD-card upload, boot video working #1074
jeffreyjacques
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Undocumented rev C filesystem / media protocol (SD-card upload, boot video) — interest in upstreaming?
Summary
While getting a Turing 5" rev C (
chs_5inch.dev1_rom1.88) working on Linux, Ireverse-engineered the vendor Windows app (
TURZX.exe) and found that the rev Cserial/COM device class (the one that parses
chs_5inch.dev1) implements afilesystem + media protocol layered over the ordinary rev C packet format —
none of which is documented here today. I've verified the commands below on real
hardware, and I have working Python tooling for them.
Before proposing any code, I'd like to gauge whether you want this upstream, and
in what form. Big caveat up front: everything below is verified on one
unit (5", ROM 88). The rev C family (2.1"/2.8"/8.8") shares unreliable USB IDs,
so I can't promise the command set or mount paths are identical on other sizes.
That uncertainty is exactly why I'm opening a discussion rather than a PR.
What the protocol looks like
Same rev C framing as everything else —
[cmd][0xEF69 BE][param u32 BE][flag][00 00][payload], padded to 250 B. For the file commands,param= ASCII pathlength and the payload is the path.
0x64flashTotal-flashUsed-flashValid-sdTotal-sdUsed-sdValid0x6Eparam= path length, payload = path0x65nodir-createdone)0x6Fascii(path) + uint32_le(size), waitcreate_success, stream body as 250-byte frames carrying 249 B each; firmware truncates to declared size, answersfile_rev_done0x780x8C0x66Other things confirmed on hardware:
/mnt/SDCARD/withimg/andvideo/subfolders; internal flash is
/mnt/UDISK/(Allwinner SoC).0x78— that choicesurvives power cycles. Combined with the display's power-on start mode, this
lets a rev C unit with an SD card play a video at power-on before any host
connects.
Why it might be worth having
attached to a running host.
STARTMODEoption for rev C (replay lastimage/video at power-on) that I've also been looking at.
What I already have
Working, hardware-tested Python: an SD-card/query probe, an uploader (dry-run by
default,
0x66intentionally not constructible), and animageio-ffmpegconverter that produces the h264/yuv420p MP4 the firmware actually accepts (its
help text claims GIF support, but the panel doesn't play GIF).
Questions for you
verified on a single unit?
tools/scripts (lowest commitment, honest "tested on these units" framing), orLcdCommRevCmethods (UploadFile/DisplayVideo), whichimplies broader rev C support I can't currently guarantee, or
simple-program.py-style example.0x66handled — omit entirely, ordocument-but-never-construct (what I do now)?
command set generalizes before anything ships?
Happy to open focused PRs (read-only queries first, then upload/play, never
delete) once you've signalled a direction. Thanks!
All reactions