IR Transfer (Flipper Zero)
October 16, 2025 Β· View on GitHub
File transfer over infrared between two Flipper Zero devices using the NEC protocol for both control and data.
[WARNING] This repo is public for testing purpose only atm, It is not working properly as intented
β¨ Features
- Send / Receive any file from the SD card.
- Robust, simple flow:
- Filename sent first (null-terminated, no length field).
- File size sent as 4 bytes big-endian.
- File data sent byte-by-byte via NEC frames.
- Final XOR checksum (over all data bytes) confirms success.
- UI:
- Landing: choose Send or Receive.
- Send: file picker, status + progress bar, Send/Cancel.
- Receive: target path, status + progress bar, Reset when idle, Cancel during activity.
- Output folder:
/ext/downloads(created automatically). - Name collision handling (suffix appended if needed).
π¦ Requirements
- Flipper Zero firmware repo (Momentum or official) with FBT toolchain.
- This project lives under your firmwareβs
applications_user/directory.
π Install
cd <firmware-root> # e.g. ~/flipper/Momentum-Firmware
mkdir -p applications_user
cd applications_user
git clone https://github.com/WBP20/ir_transfer.git
π οΈ Build & Run
From the firmware root:
./fbt launch APPSRC=applications_user/ir_transfer
If you changed code and the build seems stale:
./fbt distclean
./fbt launch APPSRC=applications_user/ir_transfer
You might see an unrelated warning (e.g. an external app with a bad
appid); it does not affect IR Transfer.
π§ Usage
Sender
- Open the app β Send.
- Pick a file under
/ext/.... - Press Send to start (press OK again to Cancel).
- On completion: status shows File sent.
Receiver
- Open the app β Receive (status: awaiting signal).
- During transfer: progress bar and Cancel (center button).
- After success: the file is saved to
/ext/downloads/<filename>(suffix added if the name already exists).
π‘ Protocol (NEC)
-
Filename: sent as bytes terminated by
'\0'(no length). -
Size: 4 bytes big-endian total size.
-
Data: 1 byte per NEC frame (simple and reliable).
-
Checksum: single-byte XOR of all data bytes, sent at the end.
-
Receiver workflow:
-
Write incoming bytes to temporary file
/ext/tmpfile. -
On checksum match:
- Move to
/ext/downloads/<original_name>(add suffix if needed).
- Move to
-
On checksum mismatch:
- Remove the temporary file and show error.
-
π Project Structure
ir_transfer/
ββ application.fam
ββ ir_main.c
ββ ir_main.h
ββ views/
β ββ landing_view.c/.h
β ββ sending_view.c/.h
β ββ receiving_view.c/.h
ββ infrared/
β ββ infrared_transfer.c
β ββ infrared_transfer.h
ββ utils/
ββ draw_utils.h
π§° Troubleshooting
-
Missing imports / unresolved symbols Ensure all
.cfiles are matched by thesourcesglobs inapplication.fam. Folder names are lowercase:views/,infrared/,utils/. -
Include path / case sensitivity Use
../infrared/...and../utils/...(not../Infrared/or../Utils/). -
Build noise from other apps External app warnings in your firmware tree donβt affect this app.
πΊοΈ Roadmap
- Optional batching/optimizations while staying NEC.
- (Future branch) Higher throughput mode (RAW/Manchester) with CRC/ACK.
π License
MIT 2.0