Skip to content
pekkanikander edited this page Nov 13, 2012 · 4 revisions

Pulse 8 Serial protocol

The P8Serial protocol is the semi-proprietary protocol that the Pulse-Eight CEC-USB adapter uses to communicate with libcec. The information on this page has been collected by analysing the actual packets, as sent over the serial line, and reading the libcec code.

Framing

Each packet starts with 0xFF and end with 0xFE. Every 0xFF, 0xFE and 0xFD is escaped with 0xFD, followed by byte - 3 . The start byte is followed by the opcode, and then parameters (if any). The opcodes can be found in src/lib/adapter/Pulse-Eight/USBCECAdapterMessage.h and in the table below.

Each frame sent by the host is explicitly acknowledged, either by an ACK frame or by sending back a reply using the same opcode as in the command. The adapter also sends unsolicited frames; the host does not need to acknowledge them.

Commands

Code Name Parametrs Notes
01 PING - Used to ping every 5 seconds
02 TIMEOUT_ERROR
03 HIGH_ERROR
04 LOW_ERROR
05 FRAME_START src:dst Receive CEC src:dst
06 FRAME_DATA b Receive next CEC byte
07 RECEIVE_FAILED
08 COMMAND_ACCEPTED - Normal ack for most commands
09 COMMAND_REJECTED
0A SET_ACK_MASK
0B TX B Send next CEC byte
0C TX_EOM B Send last CEC byte
0D TX_IDLETIME
0E TX_ACK_POLARITY pol src:dst Send CEC src:dst, assure ack
0F TX_LINE_TIMEOUT
10 TX_SUCCEEDED
11 TX_FAILED_LINE
12 TX_FAILED_ACK
13 TX_FAILED_TIMEOUT_DATA
14 TX_FAILED_TIMEOUT_LINE
15 FIRMWARE_VERSION
16 START_BOOTLOADER
17 GET_BUILDDATE
18 SET_CONTROLLED
19 GET_AUTO_ENABLED
1A SET_AUTO_ENABLED
1B GET_DEFAULT_LOGICAL_ADDRESS
1C SET_DEFAULT_LOGICAL_ADDRESS
1D GET_LOGICAL_ADDRESS_MASK
1E SET_LOGICAL_ADDRESS_MASK
1F GET_PHYSICAL_ADDRESS
20 SET_PHYSICAL_ADDRESS
21 GET_DEVICE_TYPE
22 SET_DEVICE_TYPE
23 GET_HDMI_VERSION
24 SET_HDMI_VERSION
25 GET_OSD_NAME
26 SET_OSD_NAME
27 WRITE_EEPROM
28 GET_ADAPTER_TYPE

Command flags

Code Name Notes
40 FRAME_ACK
80 FRAME_EOM
Clone this wiki locally