Specifications
Remote Control and Receiver-Transceiver Specifications and Requirements
for Windows Media Center in Windows Operating Systems
86
The 5-bit length field is overloaded as follows:
If the length value is 11111, the following byte is a command (or response byte). The value of the
command byte determines the length of the message. So, if the first byte of the packet is 0x9F
(10011111), then this is a command byte (CMD_PORT_IR). The device then looks at the second
byte. If it is 0x06 (CMD_SETIRCFS), then the device knows this packet is 4 bytes long because
all CMD_SETIRCFS packets are 4 bytes long.
If the length value is not 11111, then it specifies the number of bytes of port data that follow. So,
if the first byte of the packet is 0x90 (10010000), the following 16 bytes of data are for the IR port.
In that case, the total length of the packet, including the lead byte, is 17 bytes.
This same format is used in both directions—from host to device and from device to host. So IR
commands and responses always begin with 0x9F.
If either the lead byte sent by the host or the command byte that follows the lead byte is incorrect,
then the device sends a RSP_CMD_ILLEGAL response to the host. The device then waits for a
CMD_RESUME command before resuming typical operation.
If the host receives an illegal lead byte or an illegal response byte, it can assume the device is in
an error state and send a CMD_RESUME command to the device.
Multiple commands may come from the host in a single packet. The commands will always be
sequential and never interleaved.
Commands That Set Device State
All commands that set device state are sent to the device over the EP1 OUT endpoint.
Responses to these commands are returned to the host over the EP1 IN endpoint.
The following commands set device state:
CMD_RESET – Reset the device.
CMD_RESUME – Resume the device after error.
CMD_SETIRCFS – Set IR carrier.
CMD_SETIRTIMEOUT – Set IR time-out.
CMD_SETIRTXPORTS – Set IR transmit ports.
CMD_SETIRRXPORTEN - Set IR receive ports.
CMD_FLASHLED – Flash the LED
CMD_RESET – Reset the Device
Message ID: CMD_RESET
Message length: 2 bytes
Message direction: Host to device
Offset
Name
Value
Description
0
CMD_PORT_SYS
0xFF
System command
1
CMD_RESET
0xFE
Command ID - reset the device
Description










