IR remote capture and replay app for M5Stack CardputerZero.
- Capture raw IR signals from the CardputerZero receiver
- Confirm, rename, or discard a captured signal before saving
- Browse and delete saved
.irsignal files - Inspect saved signals with waveform, timing metadata, and protocol decoding
- Replay saved signals through the CardputerZero transmitter
- Use generated dummy signals in SDL desktop builds for UI testing
Run the bootstrap script once after cloning this repository:
./bootstrap.shIt creates .venv/, installs the Python build tools, fetches dependencies from
repos.json, and keeps all third-party source under dependencies/.
System packages and runtime pieces expected by the app:
- CMake and a C/C++ compiler
- SDL2 development files for
IR_REMOTE_USE_SDL=ON - Linux LIRC UAPI headers for device builds (
linux/lirc.h, usually fromlinux-libc-dev) - Working rc-core/LIRC device nodes for capture and replay, such as
/dev/lirc0and/dev/lirc1 python3-venvsobootstrap.shcan create.venv/aarch64-linux-gnu-gcc/g++for cross-building the CardputerZero package
The device implementation uses the Linux kernel LIRC character-device API
directly with read, write, and ioctl; it does not link against the
liblirc userspace client library.
On macOS, install the desktop build tools with Homebrew:
brew install cmake pkg-config sdl2macOS supports the SDL desktop build only. Device framebuffer, LIRC hardware access, and Debian packaging are Linux/CardputerZero targets.
Project dependencies pulled from repos.json:
lvglspdlogsmooth_ui_toolkit
Image asset conversion runs during build and uses LVGL's Python converter. If the converter dependencies are missing, install them in your Python environment:
./.venv/bin/python -m pip install pypng lz4 PillowFont conversion is not part of the normal build. If fonts are regenerated with
src/assets/convert_fonts.py, install lv_font_conv separately and keep it
available in PATH.
For Linux SDL testing:
cmake -S . -B build/sdl -DIR_REMOTE_USE_SDL=ON
cmake --build build/sdl -j8For macOS SDL testing:
cmake -S . -B build/macos-sdl -DIR_REMOTE_USE_SDL=ON
cmake --build build/macos-sdl -j8For CardputerZero framebuffer/LIRC build:
cmake -S . -B build/cp0 -DIR_REMOTE_USE_SDL=OFF
cmake --build build/cp0 -j8For cross build from x86 Linux with the GNU aarch64 toolchain:
cmake -S . -B build/cp0 \
-DIR_REMOTE_USE_SDL=OFF \
-DCMAKE_TOOLCHAIN_FILE=cmake/aarch64-linux-gnu.cmake
cmake --build build/cp0 -j8The output binary is dist/M5CardputerZero-IR-Remote.
Run the SDL build:
./dist/M5CardputerZero-IR-RemoteUse a custom recordings directory:
IR_REMOTE_RECORDINGS_DIR=./ir-recordings ./dist/M5CardputerZero-IR-RemotePackaged CardputerZero launches use $HOME/.config/IR-Remote/signals by default.
Useful environment variables:
IR_REMOTE_RECORDINGS_DIR: exact directory for saved.irfilesIR_REMOTE_CONFIG_DIR: app config root; recordings default to$IR_REMOTE_CONFIG_DIR/signalsIR_REMOTE_LIRC_RX_RC: restrict receiver discovery to one rc sysfs pathIR_REMOTE_LIRC_TX_RC: restrict transmitter discovery to one rc sysfs pathIR_REMOTE_LIRC_RX_DEVICE: require one explicit receiver device pathIR_REMOTE_LIRC_TX_DEVICE: require one explicit transmitter device pathIR_REMOTE_KEYBOARD_DEVICE: Linux input device for hardware key eventsIR_REMOTE_KEYBOARD_GRAB: set to1to grab the keyboard input deviceIR_REMOTE_SDL_ZOOM: SDL window scale for desktop testing
By default, the device build scans all rc-core/LIRC nodes and selects them by capability rather than node number:
receiver LIRC_CAN_REC_MODE2
transmitter LIRC_CAN_SEND_PULSE
Explicit device and rc overrides are strict: discovery fails when the selected node does not advertise the required capability.
Key controls:
- List page:
4record,5/6or Up/Down select,7or Enter detail,8delete,Escexit - Detail page:
7or Enter replay,4or Esc back
Build the cp0/CardputerZero Debian package:
./packaging/deb/package_deb.shThe package script is device-targeted only. It always configures the
framebuffer/LIRC build and produces an arm64 APPLaunch package.
The generated package is written to dist/:
dist/m5cardputerzero-ir-remote_0.1.1_m5stack1_arm64.deb