ESP32 Bit Pirate home
  • Infrared
  • Intermediate
  • 10 min
  • LIRC

Recipe · Intermediate · Infrared

How to use a USB IR Toy / LIRC adapter

The adapter wiki documents a USB IR Toy / LIRC-compatible mode that exposes IR TX/RX through USB CDC for tools such as mode2, xmode2 and irrecord.

Infrared remote file workflow.
Use firmware IR mode for quick captures; use the LIRC adapter when desktop tooling is better.

Wiring View

IR hardware BP adapter IR receiver outputIR RX GPIOIR LED driver i...IR TX GPIOGNDGNDReceiver VCCsupported supply
Generated from the wiring summary: IR hardware to BP adapter.
Step 1

Commands

After the firmware is in the USB IR Toy adapter mode, run LIRC tools against the exposed serial port.

Result

What success looks like

mode2 prints raw pulse/space timings when you press a remote button. irrecord can then build a remote configuration file.

Troubleshooting

  • Receiver carrier frequency does not match the remote protocol.
  • IR receiver wired to TX instead of RX.
  • IR LED driven directly from GPIO and too weak for reliable transmit.
  • Wrong serial port selected after the adapter re-enumerates.

Next steps

  • Use firmware Infrared load for Flipper .ir files.
  • Use firmware receive first when you only need protocol/data decode.
  • Use LIRC when you need raw timing or desktop integration.

USB IR Toy / LIRC adapter FAQ

When should I use the LIRC adapter instead of Infrared mode?

Use Infrared mode for quick receive, send, replay, record and Flipper .ir workflows on the device. Use the LIRC adapter when a desktop tool such as mode2, xmode2 or irrecord is the goal.

What does LIRC expect from the adapter?

LIRC expects a serial-style IR Toy compatible stream that represents received or transmitted IR timing. The adapter exists to bridge Bit Pirate infrared hardware into that host software model.

Why should IR TX use a driver transistor?

Many IR LEDs need more current than an ESP32 GPIO should provide directly. A transistor or MOSFET driver gives stronger, safer transmit pulses for real remote-control tests.

Go deeper