Sony Remote - Inside SIRC protocol

Sony SIRC Protocol: How Sony Remotes Work

Sony developed their own IR remote protocol rather than adopting NEC. Called SIRC - Sony Infrared Remote Control - it uses a fundamentally different encoding approach. Where NEC encodes data using the space (silence) between pulses, SIRC encodes data in the width of the pulses themselves. This distinction has practical consequences for how you capture and replay Sony IR signals.

SIRC comes in three variants: 12-bit, 15-bit, and 20-bit. The same physical remote might use different variants for different functions. Understanding which variant a signal uses requires knowing how many bits appear in the frame - something the BLEShark's capture function records accurately.

Table of Contents

40kHz Carrier: Why Sony Is Different

NEC uses a 38kHz carrier frequency. Sony chose 40kHz. This is close enough that many 38kHz receivers will still detect a 40kHz signal - they're not sharp bandpass filters - but Sony's receivers are optimized for 40kHz, and transmitting at 38kHz to a Sony device may result in reduced range or occasional missed codes.

The BLEShark Nano captures IR by demodulating the signal, recording the timing regardless of carrier frequency. When replaying, it transmits at 38kHz by default. This works for most Sony devices because consumer IR receivers have tolerant bandpass characteristics. If a specific device proves unreliable with 38kHz replay, the carrier frequency can be adjusted in the BLEShark settings.

The 40kHz choice from Sony is an engineering decision about receiver selectivity - a 40kHz receiver has slightly better rejection of the 38kHz noise generated by fluorescent lighting (which emits at 50-60Hz fundamentals plus harmonics). In practice this makes limited difference in typical use, but it explains why Sony standardized on a slightly different frequency from the rest of the industry.

Pulse-Width Encoding: The Core Difference

SIRC uses pulse-width encoding (also called pulse-length encoding). The information is carried in how long each pulse (burst of 40kHz carrier) lasts, not in the space between pulses.

In SIRC:

  • All spaces (silence between pulses) are the same length: 600 microseconds
  • A logical 0 is represented by a 600 microsecond burst
  • A logical 1 is represented by a 1,200 microsecond burst

This is the inverse of how NEC works. In NEC, the pulses are constant and the spaces vary. In SIRC, the spaces are constant and the pulses vary. This means that when looking at a decoded IR capture, you can immediately distinguish NEC from SIRC: in NEC, the marks (bursts) are all the same length; in SIRC, the spaces are all the same length.

The ratio is always 2:1 for SIRC - a 1 bit's pulse is exactly twice as long as a 0 bit's pulse. This makes the encoding relatively robust; a receiver just needs to measure whether the burst is around 600 or 1,200 microseconds and threshold accordingly.

graph LR
    subgraph SIRC12["12-bit SIRC Frame"]
        direction LR
        START12["Start Bit
2.4ms pulse
0.6ms space"] CMD12["Command
7 bits
(LSB first)"] ADDR12["Address
5 bits
(device ID)"] START12 --> CMD12 --> ADDR12 end subgraph SIRC15["15-bit SIRC Frame"] direction LR START15["Start Bit
2.4ms pulse
0.6ms space"] CMD15["Command
7 bits"] ADDR15["Address
8 bits
(extended devices)"] START15 --> CMD15 --> ADDR15 end subgraph SIRC20["20-bit SIRC Frame"] direction LR START20["Start Bit
2.4ms pulse
0.6ms space"] CMD20["Command
7 bits"] ADDR20["Address
5 bits"] EXT20["Extended
8 bits
(sub-device)"] START20 --> CMD20 --> ADDR20 --> EXT20 end subgraph ENCODING["Pulse-Width Encoding (vs NEC pulse-distance)"] ZERO_S["Logical 0
0.6ms pulse
0.6ms space"] ONE_S["Logical 1
1.2ms pulse
0.6ms space"] NOTE_S["Key difference:
Pulse width varies
Space is constant"] end subgraph REPEAT_S["Repeat Behavior"] R1["Frame repeats 3x minimum"] R2["45ms frame-to-frame gap"] R3["Receiver requires 2+ matches
for noise rejection"] end SIRC12 -.->|"Most Sony TVs"| ENCODING SIRC15 -.->|"DVD, Blu-ray"| ENCODING SIRC20 -.->|"Complex devices"| ENCODING

Sony SIRC frame variants - 12, 15, and 20-bit formats use pulse-width encoding (unlike NEC's pulse-distance), with mandatory 3x repetition for noise rejection.

SIRC Frame Structure

A SIRC frame starts with a start bit: a 2,400 microsecond burst followed by a 600 microsecond space. This distinctive 2.4ms burst acts as the preamble - nothing in the subsequent data bits has a pulse this long, so the start is unambiguous.

After the start bit, the data bits follow LSB first, each as a mark (variable width) followed by a 600 microsecond space. After the final data bit, there's a final 600 microsecond mark (the stop bit is implicitly the last data bit's mark) and then silence until the next frame.

SIRC transmits the same message three times consecutively (with a frame gap between them) when a button is pressed. The minimum period between the start of frame 1 and the start of frame 2 is 45ms. This three-frame repetition is used for error correction - if any one frame has an error, the receiver can use the other two copies.

This is different from NEC, which sends the full frame once and then uses compact repeat codes if the button is held. SIRC always sends three full frames per button press, making it slightly slower but more redundant.

graph TD
    subgraph NEC_PROTO["NEC Protocol"]
        NEC_CARRIER["Carrier: 38kHz"]
        NEC_ENC["Encoding: Pulse-Distance
Pulse constant (562.5us)
Space varies (562.5/1687.5us)"] NEC_START["Start: 9ms pulse + 4.5ms space"] NEC_DATA["Data: 32 bits
(8 addr + 8 inv + 8 cmd + 8 inv)"] NEC_REPEAT["Repeat: Special code
(9ms + 2.25ms + stop)"] NEC_FRAME["Frame time: ~67.5ms"] NEC_DEVICES["Used by: Samsung, LG,
Panasonic, most brands"] end subgraph SIRC_PROTO["Sony SIRC Protocol"] SIRC_CARRIER["Carrier: 40kHz"] SIRC_ENC["Encoding: Pulse-Width
Space constant (0.6ms)
Pulse varies (0.6/1.2ms)"] SIRC_START["Start: 2.4ms pulse + 0.6ms space"] SIRC_DATA["Data: 12/15/20 bits
(7 cmd + 5/8/13 addr)"] SIRC_REPEAT["Repeat: Full frame 3x
(45ms gap between)"] SIRC_FRAME["Frame time: ~25-45ms"] SIRC_DEVICES["Used by: Sony TVs,
PlayStation, Blu-ray"] end subgraph BLESHARK["BLEShark Nano IR"] IR_RX["IR Receiver
Captures both protocols"] IR_DECODE["Auto-detect
NEC vs SIRC
by start bit timing"] IR_CLONE["Clone and replay
any captured signal"] IR_TX["IR Transmitter
Supports both carriers"] IR_RX --> IR_DECODE --> IR_CLONE --> IR_TX end NEC_PROTO --> BLESHARK SIRC_PROTO --> BLESHARK

NEC vs Sony SIRC protocol comparison - different carrier frequencies, encoding methods, and repeat behaviors, both supported by BLEShark Nano's IR capture and replay engine.

12-bit SIRC: The Basic Format

The original and most common SIRC variant has 12 data bits:

  • 7-bit command (bits 0-6)
  • 5-bit address (bits 7-11)

Total frame structure: start bit + 12 data bits + inter-frame gap. The 7-bit command gives 128 possible commands (0-127). The 5-bit address gives 32 possible device addresses (0-31).

Common Sony device addresses for 12-bit SIRC include:

  • Address 1: TV
  • Address 4: DVD player
  • Address 17: Soundbar / AV receiver
  • Address 26: CD player

With 32 addresses and 128 commands per address, 12-bit SIRC provides 4,096 unique codes. That's enough for early Sony product lines but became limiting as product ranges expanded, which led to the extended variants.

15-bit SIRC

15-bit SIRC extends the address from 5 bits to 8 bits:

  • 7-bit command (bits 0-6)
  • 8-bit address (bits 7-14)

The 8-bit address increases device addressing from 32 to 256. The command count stays the same at 128. Total unique codes: 32,768.

15-bit SIRC is common on Sony projectors, some Trinitron TV models, and Blu-ray players. The protocol is physically identical to 12-bit SIRC except for the frame length - you can only distinguish the two by counting the bits in a capture.

20-bit SIRC

20-bit SIRC is the extended format for Sony's more complex devices:

  • 7-bit command (bits 0-6)
  • 5-bit address (bits 7-11)
  • 8-bit extended address (bits 12-19)

The extended address byte provides additional device-type discrimination. 20-bit SIRC is used on some Sony televisions, PlayStation accessories, and Bravia TV line remotes. The total frame is noticeably longer than 12-bit SIRC, which is one way to identify it from a capture before counting individual bits.

Some Sony remotes transmit different variants depending on which button is pressed. A single remote might use 12-bit SIRC for basic transport controls and 20-bit SIRC for menu navigation. This is documented in Sony's IR code databases and is worth knowing when building a full clone of a Sony remote's functionality.

NEC vs SIRC: Side-by-Side Comparison

The most important differences at a glance:

Feature NEC Sony SIRC
Carrier frequency 38kHz 40kHz
Encoding Pulse-distance (space width) Pulse-width (mark width)
Start burst 9ms 2.4ms
Start space 4.5ms 0.6ms
0 bit 562us mark + 562us space 600us mark + 600us space
1 bit 562us mark + 1687us space 1200us mark + 600us space
Error checking Inverted address and command bytes 3-frame repetition
Repeat when held Compact repeat code (9ms + 2.25ms + stop) Full frame repeated every 45ms
Data bits 32 (8+8+8+8 with complements) 12, 15, or 20 (varies by variant)
Bit order LSB first LSB first

Identifying SIRC From Captured Data

If you've captured an IR signal and want to determine if it's SIRC rather than NEC or another protocol, check these characteristics:

  1. Start burst duration around 2.4ms? (NEC's start burst is 9ms - much longer)
  2. Are all the spaces between marks the same length (~600us)? (In NEC, spaces vary)
  3. Are the marks either ~600us or ~1,200us? (Pulse-width encoding)
  4. Does the frame contain 12, 15, or 20 bits after the start bit?

If all four are true, you're looking at SIRC. The SIRC start burst (2.4ms) is distinctive - it's exactly 4x the length of a 1 bit's mark, which means you're looking for a burst that's clearly longer than the data bits but much shorter than NEC's 9ms preamble.

When the BLEShark captures a signal, it stores the raw pulse and space durations in microseconds. You can read these out through the file portal and check them manually if you need to determine the protocol. The total frame duration is also a quick discriminator: a 12-bit SIRC frame is around 45ms, while an NEC frame is around 67ms maximum.

SIRC and the BLEShark Nano

The BLEShark's IR receive and transmit pipeline works protocol-agnostically. When it captures an IR signal, it records the timing sequence - marks and spaces in microseconds. When it replays, it reproduces those timings through the IR LED at 38kHz. For Sony devices, this works reliably in most cases because the 38kHz carrier falls within the typical IR receiver's acceptance band even though Sony optimizes for 40kHz.

The TV-B-Gone feature includes both NEC and SIRC-encoded Sony power codes. The Sony codes in the TV-B-Gone library cover the major SIRC address codes for Sony TV power off across different product generations. When TV-B-Gone cycles through its database, it includes the appropriate Sony SIRC frames with correct 40kHz carrier timing for those specific codes.

For capturing Sony remotes: hold the button and point the remote at the BLEShark's IR receiver from 20-30cm away. Sony remotes are good about transmitting three complete frames, so even a brief button press gives the BLEShark enough signal to capture a complete SIRC frame. The Clone function captures the raw timing and stores it for replay. The Transmit app can then send the stored code to any Sony device within IR range.

Using the Shiver mesh, you can build a distributed IR control system. Deploy BLEShark nodes in different rooms, store Sony codes on each node, and trigger them remotely over the mesh. Each node covers roughly a 10-15 foot IR range in a typical room - enough to control AV equipment from the mesh coordinator without line-of-sight from the coordinator to every device.

IR protocol documentation is for educational purposes. The protocols described here are published standards used in commercial consumer electronics.

Get the BLEShark Nano - $36.99+

Back to blog

Leave a comment