Repository navigation
CyberUnicorn console: Flipper Zero mode - #3794
Merged
Merged
Conversation
The console's USB picker now lists a Flipper Zero (STMicro VID 0x0483) as well as the CyberUnicorn's CH340. A Flipper running the Frequency app answers the same protocol on its second port, so the console tries each allowed Flipper port, skips the boot wait and the screen feed, hides the scanner and OS update, and says where to hold the tag. The updater keeps its CH340-only picker. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
hellofrequencylab
marked this pull request as ready for review
October 21, 2026 15:27
hellofrequencylab
enabled auto-merge (squash)
October 21, 2026 17:30
Keeps both: Flipper tries and the board's boot-scene line. The abandoned-connect guard returns false here, since connect now reports whether it reached a device. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015Aw32AU4vVqCSEoNA5aP3U
Owner
Author
|
The On this exact head (59b3808), Generated by Claude Code |
2 tasks done
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Daniel
What
The CyberUnicorn console can now use a Flipper Zero as its tag writer. It recognizes whether the board on the cable is the Unicorn or the Flipper and switches modes. In Flipper mode there is no screen feed and no boot wait, the Scanner and Update tabs are hidden, and the copy says to hold the tag on the back of the Flipper.
Why
Daniel wants to write placards from the console with the Flipper. The Flipper side is the Frequency app (hellofrequencylab/projects#17). While that app is open, the Flipper exposes a second USB serial port that answers this console's protocol:
system.status,system.caps,hat.probe,frequency.write_tagandfrequency.read_tag. The console's picker only listed the CH340, so the Flipper never showed up.How to review (owner)
How / files
lib/device/web-serial.tsFLIPPER_VENDOR_ID,usbDeviceOf(port),rememberedConsolePorts()(CyberUnicorn first, then Flipper ports) andpickConsolePort()(CH340 + Flipper filters). The updater keepspickPort/rememberedPort, which are CH340 only, so a Flipper is never offered for an OS flash. Open errors and the transport label name the Flipper.components/spaces/loyalty/cyberunicorn-console.tsxconnect()now picks the candidate ports andattach()opens one. A Flipper port gets 3 shortsystem.statusasks instead of the 40 s boot wait. Remembered Flipper ports are tried in turn, because the first one is the Flipper CLI and never answers. Adevicestate drives the copy, theFLIPPERheader, no mirror, and hiding the Scanner and Update tabs.Verification
pnpm exec tsc --noEmit: exit 0. It needsNODE_OPTIONS=--max-old-space-size=8192locally, because the default heap ran out of memory.pnpm linton the two files (eslint --max-warnings=0): clean.pnpm exec vitest run lib/device: 9 files, 80 tests passed. The protocol, relay, cable-scan and screen-mirror suites are unaffected./dev/cu.usbmodemflip_I5had0ha3: status, caps, hat.probe,unknown_command,bad_args, and a clean "No card" timeout. That is noted in the Flipper PR.Notes / follow-ups
tagProblem()keeps its CyberUnicorn wording forbusy,no_readerand a plaintimeout. The Flipper app never sends the first two. The console demo thread's in-flight PR also editstagProblem(), so I left that text alone to avoid a conflict.🤖 Generated with Claude Code