Specifications
Remote Control and Receiver-Transceiver Specifications and Requirements
for Windows Media Center in Windows Operating Systems
143
CIRClass is most likely to send an IOCTL_IR_SET_WAKE_PATTERN request in two
circumstances:
When the drivers are being initialized, CIRClass tracks the current wake pattern across reboots
and sends the wake pattern to the port driver when the port driver loads.
When the user presses a key that causes CIRClass to decide that a different wake pattern
should be used. This is likely to happen in two specific cases:
Change of protocol. If the wake pattern is currently set to RC6 and the user presses a button on
a Quatro Pulse remote control, CIRClass will reprogram the device to wake on the Quatro Pulse
Sleep toggle button.
Change of button code. If the user presses the discrete off button, CIRClass will assume that
the remote control has a discrete on button and program the hardware to respond to this button.
Notes
Although unlikely, this can happen while the user is putting the PC into a low-power state.
Blocking the IOCTL_IR_SET_WAKE_PATTERN IRP for very long may cause the PC to
delay going into the low-power state.
If the port driver is unable to program the hardware to wake on the specific button code before
the PC goes to sleep, the Sleep button on the remote control will appear to be broken, but
only that one time. The next time the driver loads, CIRClass will again attempt to program the
hardware to wake on the correct pattern.
The port driver is responsible for reporting its wake abilities using the appropriate bits in the
DevCapsFlags and WakeProtocols members of the IR_DEV_CAPS_V2 structure. For more
information, see the documentation for IR_DEV_CAPS_V2.
IR Port Driver and CIRClass Data Exchange
CIRClass and CIR Port drivers communicate and exchange data using IOCTLs and data
structures defined later in this document. Note that the only I/O requests that CIRClass sends to
a CIR Port driver are IOCTLs; read, write, and other I/O function codes are never used.
Data Format
The CIRClass driver exchanges IR data with CIR Port drivers in a standard format. This format is
referred to as "Run Length Coded" (RLC) format.
In run length coding, CIR data is encoded according to duration of high or low signal. These
durations are recording the demodulated signal (the envelope) and not the modulated signal.
Each LONG (32 bits) of the IR represents either a period of time that the signal is on or a period
of time that the signal is off. If the LONG is positive, the signal is on. If the LONG is negative, the
signal is off. The absolute value of the LONG is the duration of time that the signal is either high
or low.
Therefore, if the IR stream is high for 500 microseconds, low for 200 microseconds, and high for
150 microseconds (typically represented as "500 -200 150"), then the IR buffer contains the
following:
0x01F4 (500 microseconds high)
0xFF38 (200 microseconds low)
0x0096 (150 microseconds high)










