Coder Social home page Coder Social logo

cec-decoder's Introduction

Sigrok HDMI CEC protocol decoder

Sigrok protocol decoder for HDMI CEC (Consumer Electronics Control)

Consumer Electronics Control (CEC) is a feature of HDMI designed to allow users to command and control devices connected through HDMI

CEC Bus can be found in PIN 13 of the HDMI connector:

Hdmi pinout

Pulseview screenshots

Pulseview capture: CEC Ping frames Pulseview screenshot cec_decoder

Pulseview capture: Vendor comand frame Pulseview screenshot cec_decoder

Usage examples

Print all annotations (very verbose)

sigrok-cli -i data.sr -P cec:CEC=CEC

cec-1: ST
cec-1: 0
cec-1: 0
cec-1: 1
cec-1: 1
cec-1: 0
cec-1: 0
cec-1: 0
cec-1: 0
cec-1: 0x30
cec-1: EOM=N
cec-1: ACK
cec-1: 0
cec-1: 0
cec-1: 0
cec-1: 0
cec-1: 0
cec-1: 1
cec-1: 0
cec-1: 0
cec-1: 0x04
cec-1: EOM=Y
cec-1: ACK
cec-1: 30:04
cec-1: HDR: Tuner_1, TV | OPC: IMAGE_VIEW_ON | R: ACK

Print frames only

sigrok-cli -i data.sr -P cec:CEC=CEC -A cec=frames

cec-1: 30:04
cec-1: 35
cec-1: 35
cec-1: 3f:82:10:00
cec-1: 30:8f
cec-1: 03:90:01
cec-1: 30:44:6d
cec-1: 35
cec-1: 35
cec-1: 30:04
cec-1: 35
cec-1: 35
cec-1: 30:0d
cec-1: 35
cec-1: 35
cec-1: 35
cec-1: 35
cec-1: 30:04
cec-1: 35
cec-1: 35
cec-1: 30:8f
cec-1: 03:90:01
cec-1: 35
cec-1: 35
cec-1: 35
cec-1: 35
cec-1: 35
cec-1: 35
cec-1: 30:04

Print sections only

sigrok-cli -i data.sr -P cec:CEC=CEC -A cec=sections

cec-1: HDR: Tuner_1, TV | OPC: IMAGE_VIEW_ON | R: ACK
cec-1: HDR: Tuner_1, AudioSystem | OPC: PING | R: NACK
cec-1: HDR: Tuner_1, AudioSystem | OPC: PING | R: NACK
cec-1: HDR: Tuner_1, Broadcast | OPC: ACTIVE_SOURCE | OPS: 0x10, 0x00 | R: ACK
cec-1: HDR: Tuner_1, TV | OPC: GIVE_DEVICE_POWER_STATUS | R: ACK
cec-1: HDR: TV, Tuner_1 | OPC: REPORT_POWER_STATUS | OPS: 0x01 | R: ACK
cec-1: HDR: Tuner_1, TV | OPC: USER_CONTROL_PRESSED | OPS: 0x6d | R: ACK
cec-1: HDR: Tuner_1, AudioSystem | OPC: PING | R: NACK
cec-1: HDR: Tuner_1, AudioSystem | OPC: PING | R: NACK
cec-1: HDR: Tuner_1, TV | OPC: IMAGE_VIEW_ON | R: ACK
cec-1: HDR: Tuner_1, AudioSystem | OPC: PING | R: NACK
cec-1: HDR: Tuner_1, AudioSystem | OPC: PING | R: NACK
cec-1: HDR: Tuner_1, TV | OPC: TEXT_VIEW_ON | R: ACK
cec-1: HDR: Tuner_1, AudioSystem | OPC: PING | R: NACK
cec-1: HDR: Tuner_1, AudioSystem | OPC: PING | R: NACK
cec-1: HDR: Tuner_1, AudioSystem | OPC: PING | R: NACK
cec-1: HDR: Tuner_1, AudioSystem | OPC: PING | R: NACK
cec-1: HDR: Tuner_1, TV | OPC: IMAGE_VIEW_ON | R: ACK
cec-1: HDR: Tuner_1, AudioSystem | OPC: PING | R: NACK
cec-1: HDR: Tuner_1, AudioSystem | OPC: PING | R: NACK
cec-1: HDR: Tuner_1, TV | OPC: GIVE_DEVICE_POWER_STATUS | R: ACK
cec-1: HDR: TV, Tuner_1 | OPC: REPORT_POWER_STATUS | OPS: 0x01 | R: ACK
cec-1: HDR: Tuner_1, AudioSystem | OPC: PING | R: NACK
cec-1: HDR: Tuner_1, AudioSystem | OPC: PING | R: NACK
cec-1: HDR: Tuner_1, AudioSystem | OPC: PING | R: NACK
cec-1: HDR: Tuner_1, AudioSystem | OPC: PING | R: NACK
cec-1: HDR: Tuner_1, AudioSystem | OPC: PING | R: NACK
cec-1: HDR: Tuner_1, AudioSystem | OPC: PING | R: NACK
cec-1: HDR: Tuner_1, TV | OPC: IMAGE_VIEW_ON | R: ACK
cec-1: HDR: Tuner_1, AudioSystem | OPC: PING | R: NACK
cec-1: HDR: Tuner_1, AudioSystem | OPC: PING | R: NACK
cec-1: HDR: Tuner_1, TV | OPC: GIVE_DEVICE_POWER_STATUS | R: ACK
cec-1: HDR: TV, Tuner_1 | OPC: REPORT_POWER_STATUS | OPS: 0x01 | R: ACK

Current status

The CEC protocol decoder is capable of the following:

  • Decoding all low level parts: START, BITs, EOM, ACK / NACK
  • Resolve names of all logical addresses
  • Resolve names of all opcodes
  • Detect (and warn) timing errors
  • Detect (and warn) misplaced bits, etc

Pending:

  • Operands of the opcodes are not parsed, only printed.

cec-decoder's People

Contributors

jsolla avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.