Install the active source on the TV using cec-client

I have a cec-client running on my raspberry pi, and I can switch between active HDMI 1 - 4 sources on my Sony TV using:

echo "tx 4F 82 10 00" | cec-client -s echo "tx 4F 82 40 00" | cec-client -s 

What I could not achieve is a return to TV as an active source. Since the TV usually has ID 0.0.0.0, I would expect the following command to do the trick, but there is no response from the TV:

 echo "tx 4F 82 00 00" | cec-client -s 

4 = Recorder 1 (raspi)

F = Broadcast

82 = Active Source

00 00 = ID

Has anyone successfully done this rather basic operation?

+6
source share
4 answers

On my Samsung:

 echo "txn 40 9D 00 00" | cec-client -s 

works great. So, do not broadcast!

+1
source

try the following: echo "as" | cec-client -s echo "as" | cec-client -s

+1
source

What about:
echo 'tx 4f 9d 10 00' | cec-client -s -d 1

4 - source f - broadcast
9d - <Inactive Source> command
10 00 - physical address (ID) of the current active source = 1.0.0.0

replace the identifier with the one for the current active source.

It does NOT work on my Philips TV, but the CEC standard says that "the TV can display its own internal tuner and must send <Active Source> with the address of the TV; ..", so it can work on another system.

+1
source

I like the answer of tarapitha because it has an explanation.

The TV switches back to the active source if there is no other device that reports activity (in response to the [Request active source] message, so this is the reason the [Inactive source] message works.

The only problem is that the [Inactive Source] message must be directly addressed to the TV, so the correct frame will be 40 9d 10 00 if the physical address of the active source is 1.0.0.0

Eman's answer probably worked because the TV forgives the wrong physical address, it just executes an active source request and does not find an active source, so it becomes active.

I recommend this page to understand CEC framing.

+1
source

Source: https://habr.com/ru/post/948861/


All Articles