← How-Tos
flipper-zero May 6, 2026 ◑ 4 views ◯ 9 min read

How to Hack Infrared Protocols with the Flipper Zero: NEC, RC5, Sony, and Raw Analysis

flipper zeroinfraredirnecrc5rc6sonyprotocoluniversal remotebrute forceraw signalhowto

Introduction

The Infrared (IR) module in the Flipper Zero is often underestimated. Unlike Sub-GHz and NFC which get most of the attention, the IR blaster is a powerful tool for analyzing, capturing, and crafting infrared remote control signals. It covers the 38 kHz band used by virtually all consumer electronics remotes and supports major protocols like NEC, RC5, RC6, and Sony SIRC, plus raw signal capture for unknown or proprietary remotes. This guide covers IR protocol internals, complete capture and replay workflows, building universal remotes, brute force attacks, and the analysis techniques that turn IR from a simple remote copier into a protocol debugging tool.

IR Hardware in the Flipper Zero

How IR Remote Protocols Work

IR remotes modulate data onto a 38 kHz carrier. The 38 kHz carrier is not the data — it is a frequency that the IR receiver is tuned to detect. The actual data is encoded in the timing of bursts of 38 kHz light.

Common encoding methods:

Step 1: Capture IR Signals

  1. Navigate to Infrared > Learn New Remote.
  2. Select Read mode.
  3. Point the original remote at the front of the Flipper (the IR receiver window is on the front, near the bottom).
  4. Press a button on the remote.
  5. The Flipper analyzes the signal and displays:
  1. Save the button with a descriptive name: TV_Samsung_Power.
  2. Repeat for each button you want to capture.

Tips for clean captures:

Step 2: Understand Captured Protocol Details

NEC Protocol (Most Common)

NEC is the most widely used IR protocol in consumer electronics:

When the Flipper reads an NEC signal, it shows:

Samsung32 Protocol

Samsung's variant of NEC uses a 32-bit frame:

RC5 Protocol (Philips)

RC6 Protocol (Microsoft/Philips)

Sony SIRC Protocol

Step 3: Emulate Captured IR Signals

  1. Navigate to Infrared > Saved Remotes.
  2. Select your saved remote.
  3. Select the button to transmit.
  4. Point the Flipper at the target device and press OK.

The Flipper transmits the exact signal that was captured. For protocol-based signals, it regenerates the proper timing. For raw captures, it replays the exact microsecond timing.

Universal Remote mode:

  1. Infrared > Universal Remote
  2. Select a device type (TV, AC, Audio, Projector)
  3. The Flipper cycles through common codes for major brands
  4. When the target device responds (powers on, changes volume), stop and save the working code set

Step 4: Build a Custom Universal Remote Database

The Flipper stores IR remotes in a structured folder system on the SD card:

/infrared/ TV/ Samsung_32.ir LG_42.ir AC/ Mitsubishi_HEAVY.ir Audio/ Sony_Receiver.ir

Creating a remote file manually:

IR files use a text format:

Filetype: IR signals file Version: 1 # name: Power type: parsed protocol: NEC address: 04 00 00 00 command: 08 00 00 00 # name: Vol+ type: parsed protocol: NEC address: 04 00 00 00 command: 02 00 00 00

Fields explained:

Raw format for unknown protocols:

name: Custom type: raw frequency: 38000 duty_cycle: 0.33 data: 9000 4500 562 562 562 1687 562 562 ...

The data field contains alternating mark and space durations in microseconds. Positive = IR LED on (mark), negative or implied gap = IR LED off (space).

Step 5: Brute Force IR Attacks

For devices where you do not have the original remote, you can brute force the command space:

NEC brute force:

NEC has 256 possible commands (8 bits) and 256 possible addresses (8 bits). A full brute force is 65,536 combinations — too many to send manually but possible with automation.

  1. Use the IR Blaster app from the App Catalog.
  2. Set the protocol to NEC, fixed address (or cycle through common addresses).
  3. Cycle through all 256 command codes.
  4. Monitor the target device for a response (power LED, screen change, relay click).

Common NEC addresses by device type:

Address sweep attack:

If you know the command (e.g., Power = 0x08 for NEC) but not the address:

  1. Send command 0x08 with address 0x00, then 0x01, 0x02... through 0xFF
  2. One of them will likely trigger the device
  3. This takes about 10 minutes at 5 signals per second

Step 6: IR Signal Analysis for Protocol Debugging

Export raw captures for analysis:

  1. Connect the Flipper via qFlipper.
  2. Navigate to the SD card > infrared folder.
  3. Copy the .ir files to your PC.
  4. Open in a text editor to see the timing data.

Analyze timing with Python:

# Parse a raw IR signal and plot it import matplotlib.pyplot as plt data = [9000, -4500, 562, -562, 562, -1687, 562, -562] # From .ir file times = [0] levels = [0] for i, duration in enumerate(data): times.append(times[-1] + abs(duration)) levels.append(1 if duration > 0 else 0) times.append(times[-1]) levels.append(levels[-1]) plt.figure(figsize=(12, 3)) plt.step(times, levels, where='post') plt.xlabel('Time (us)') plt.ylabel('IR LED') plt.title('IR Signal Timing') plt.show()

Identify unknown protocols:

  1. Capture the signal in raw mode.
  2. Look at the timing pattern:
  1. Measure the bit time:
  1. Look for the leader pulse:

Step 7: Convert Between IR Protocols

Some devices use non-standard protocols that are variants of standard ones. By editing the .ir file, you can create working signals:

NEC with non-standard timing:

If a device uses NEC-like encoding but with different timing:

  1. Capture in raw mode.
  2. Examine the timing. If the pulse is 500 us instead of 562.5 us, the device likely still decodes it correctly.
  3. Edit the raw timing to match, or try the standard NEC parsed format first.

Extended NEC (NEC42):

Some devices use 16-bit addresses instead of 8-bit:

Step 8: Long-Range IR Transmission

The stock Flipper IR LED has limited range. For longer distances:

GPIO IR output pin:

The Flipper can output IR signals on GPIO pin A7 (PA7). Use this to drive external IR hardware.

Step 9: Air Conditioner Specific Tricks

AC remotes are more complex than TV remotes because a single button sends the complete state of the unit:

This means a 32-byte packet is common for AC units. The Flipper handles these large frames in raw mode.

AC universal remote building:

  1. Capture every button on the AC remote in raw mode.
  2. Create a .ir file with all buttons organized by function.
  3. Name buttons descriptively: Cool_22C_Low, Heat_25C_Auto
  4. The Flipper can then fully control the AC without the original remote.

Tips for IR Mastery

Conclusion

The Flipper Zero's infrared module is far more than a TV remote copier. With support for major protocols, raw signal capture, custom .ir file creation, brute force attacks, and protocol analysis, it is a complete IR research tool. Understanding the timing differences between NEC, RC5, Sony, and raw signals lets you build universal remotes, debug unknown protocols, and control virtually any IR device. The 38 kHz carrier, 940 nm wavelength, and microsecond-precise timing make the Flipper's IR output indistinguishable from original remotes. Build your IR database, learn to read timing data by eye, and you will have the most capable universal remote ever made — with the added benefit of understanding exactly how every signal works.