cec-follower1
An application to emulate cec followers
Usage
cec-follower [-h]
[-d
<dev>]
[other
options]
Overview
The cec-follower tool is used to emulate CEC followers. Based on the configured logical address(es) of the CEC device it will emulate the CEC behavior accordingly.
Configuring the CEC device is done using cec-ctl. Certain CEC functionalities are only emulated if the corresponding Device Features flag is set (these are set when configuring with cec-ctl). These are:
- Audio Return Channel (RX and TX)
- Audio Rate Control
- Deck Control
- Record TV screen
cec-follower is basically a message loop, waiting for messages to arrive and taking the appropriate action for each message (incoming messages can be shown with the --show-msgs option). The follower maintains an internal state with appropriate parameters such as volume, current active source, power state and so on (state changes can be shown with the --show-state option).
It also aims to be a reference implementation on how a follower should behave.
cec-follower will keep track of incoming messages and look for violations of the CEC specification with regards to timings. For example, it will warn if it receives the same message again within 200ms after it replied <Feature Abort> ["Unrecognized Opcode"] to that message, and it will check that press and hold behavior is done properly.
cec-follower will periodically send out polling messages to discover when a remote device is removed or a new one has appeared. When a device is removed, the recorded information about it is cleared. Each logical address is polled about once every 15 seconds. In between polls, removing a remote device or replacing it with a new one is not detected.
When running compliance tests with cec-compliance, cec-follower should be run on the same device to act on incoming messages that are not replies to messages sent by the compliance tool. Before each test-run cec-follower should be restarted if it is running, to initialize the emulated device with a clean and known initial state.
Options
-
-d, --device <dev> -
Use device <dev> as the CEC device. If <dev> is a number, then /dev/cec<dev> is used.
-
-D, --driver <drv> -
Use a cec device that has driver name <drv>, as returned by the CEC_ADAP_G_CAPS ioctl. This option can be combined with
-ato uniquely identify a CEC device without having to rely on the device node number.
-
-a, --adapter <adap-name> -
Use a cec device that has adapter name <adap-name>, as returned by the CEC_ADAP_G_CAPS ioctl. This option can be combined with
-Dto uniquely identify a CEC device without having to rely on the device node number.
-
-v, --verbose -
Turn on verbose reporting.
-
--version -
Show version information.
-
-w, --wall-clock -
Show timestamps as wall-clock time. This also turns on verbose reporting.
-
-T, --trace -
Trace all called ioctls. Useful for debugging.
-
-h, --help -
Prints the help message.
-
-n, --no-warnings -
Turn off warning messages.
-
-e, --exclusive -
If specified, then the follower uses exclusive mode (CEC_MODE_EXCL_FOLLOWER).
-
-m, --show-msgs -
Show received messages.
-
-s, --show-state -
Show state changes from the emulated device.
-
--service-by-dig-id -
Report digital services by digital ID instead of by channel.
-
--standby -
Start the follower in the Standby status.
-
--toggle-power-status <secs> -
Toggle the power status every <secs> seconds. Only supported if the follower is emulating a TV.
-
-i, --ignore <la>,<opcode> -
Ignore messages from logical address <la> and opcode <opcode>. 'all' can be used for <la> or <opcode> to match all logical addresses or opcodes.
-
--ignore-standby <n> -
Ignore every <n>th received Standby message.
-
--ignore-view-on <n> -
Ignore every <n>th received Image/Text View On message.
Exit status
On success, it returns 0. Otherwise, it will return the error code.
Releases
6 releases since Debian 9 (Stretch); the text changed 5 times.
--adapter since Debian 11 (Bullseye);
--driver since Debian 11 (Bullseye);
--exclusive since Debian 13 (Trixie);
--ignore since Debian 11 (Bullseye);
--ignore-standby since Debian 13 (Trixie);
--ignore-view-on since Debian 13 (Trixie);
--service-by-dig-id since Debian 11 (Bullseye);
--standby since Debian 12 (Bookworm);
--toggle-power-status since Debian 12 (Bookworm);
--version since Debian 12 (Bookworm);
--wall-clock since Debian 10 (Buster);
-D since Debian 11 (Bullseye);
-a since Debian 11 (Bullseye);
-e since Debian 13 (Trixie);
-i since Debian 11 (Bullseye);
-w since Debian 10 (Buster).