Flipper Zero
Control a Flipper Zero over its USB serial CLI from swamp.
Model:
@magistr/flipper-zero— one instance per Flipper (identified by its serial port, or auto-detected). Methods drive the device's text CLI (the>:prompt) and RPC protocol, persisting structured results as swamp data:detect— find the serial port without talking to the device.info— read device/firmware/power info (info device, with adevice_infofallback) parsed into attributes.exec— run any single CLI command and capture its output.storage-list— list an SD-card directory (storage list <path>).storage-read— read a file's contents (storage read <path>).apps— list the built-in loader apps (loader list).installed-apps— list SD-card apps/scripts under /ext/apps grouped by category, each with a launchable path (storage tree).launch— launch an app by path/name (loader open), refusing to open over a running app unless force is set.close— close the running app: softloader close, escalating to a simulated long Back press for apps (games) that ignore it.running— report the currently-running app (loader info).screenshot— capture the 128x64 screen over RPC (start_rpc_session + Gui screen stream) and render it as ASCII and braille.listen— receive-only capture on sub-GHz, infrared, 125kHz RFID or NFC (which runs through the device's[nfc]sub-shell).transmit— owner-operated emit on IR (protocol or universal remote), sub-GHz (replay a saved capture or a raw key), or RFID emulate. Sub-GHz TX is region-restricted by the firmware. RX and TX only; no jamming or brute-force tooling.reboot— reboot the device (power reboot).
Cross-platform serial handling: macOS cu.usbmodemflip* and Linux ttyACM*
nodes are auto-detected; the line is put into raw, no-echo mode via stty and
each exchange syncs to a fresh prompt before sending a single, newline-free
command. All device I/O goes through subprocesses (macOS requires --allow-all
for /dev, which swamp models are not granted). Captured output is bounded to
guard against huge reads.
Merge pull request #55 from umag/feat/flipper-zero-extension
feat(flipper-zero): owner-operated transmit (IR / sub-GHz / RFID)
Global Arguments
| Argument | Type | Description |
|---|---|---|
| port? | string | Serial device path, e.g. /dev/cu.usbmodemflip_Zilxi1 (macOS) or |
| baud | string | Baud rate for stty. The Flipper is USB-CDC so this is cosmetic, but must |
| timeoutMs | number | Per-command read timeout in milliseconds. |
| Argument | Type | Description |
|---|---|---|
| command | string | A single CLI command line. Run "help" to list commands. |
| Argument | Type | Description |
|---|---|---|
| app | string | App path (e.g. /ext/apps/Games/snake_game.fap) or built-in name. |
| force? | boolean | Close any already-running app first (default false). |
| Argument | Type | Description |
|---|---|---|
| source | enum | Which receiver to listen on. |
| seconds | number | How long to listen (default 15). |
| frequency | number | Sub-GHz frequency in Hz (default 433920000 = 433.92MHz). |
| raw? | boolean | Capture raw timings instead of decoded packets (subghz/ir). |
| external? | boolean | Use an external CC1101 module (device 1) instead of the internal. |
| Argument | Type | Description |
|---|---|---|
| source | enum | Which radio to emit on. |
| protocol? | string | IR protocol, e.g. NEC, Samsung32, RC5 (with address+command). |
| address? | string | IR address, hex. |
| command? | string | IR command, hex. |
| universalRemote? | string | Bundled universal remote: tv, audio, ac, or projector (with signal). |
| signal? | string | Universal-remote signal name, e.g. Power, Mute, Vol_up. |
| file? | string | Path to a saved capture to replay, e.g. /ext/subghz/gate.sub. |
| key? | string | Raw sub-GHz key, hex (with frequency+te). |
| frequency? | number | Sub-GHz frequency in Hz (for a raw key). |
| te? | number | Sub-GHz timing element in microseconds (for a raw key). |
| keyType? | string | RFID key type to emulate, e.g. EM4100, H10301, Indala26. |
| keyData? | string | RFID key data, hex. |
| repeat? | number | Repeat count for sub-GHz transmits (default 1). |
| seconds | number | How long to emulate, for RFID (default 10). |
| external? | boolean | Use an external CC1101 module (sub-GHz). |
Resources
Merge pull request #53 from umag/feat/flipper-zero-extension
feat(flipper-zero): receive-only listen (sub-GHz / IR / RFID / NFC)
Modified 1 models
Merge pull request #52 from umag/feat/flipper-zero-extension
feat(flipper-zero): new @magistr/flipper-zero extension
- Has README or module doc2/2earned
- README has a code example1/1earned
- README is substantive1/1earned
- Most symbols documented1/1earned
- No slow types (deprecated)1/1earned
- Dependencies pass trust audit2/2earned
- Has description1/1earned
- Platform support declared (or universal)2/2earned
- License declared1/1earned
- Verified public repository2/2earned