Set active source to TV with cec-client
On my Samsung:
echo "txn 40 9D 00 00" | cec-client -s
works fine. So, do no Broadcast!
try this: echo "as" | cec-client -s
I like tarapitha's answer because it has an explanation.
The TV switchs back to active source if there is no other device that reports to be active (in response to a [Request Active Source] message, so this is the reason why the [Inactive Source] message works.
The only problem is that [Inactive Source] message has to be directly addressed to the TV, so the correct frame would 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 is forgiving the wrong physical address, it just performs the active source request and finds no active source so sets itself as active.
I recommend this page to understand CEC framing.
Try using :
as delimiters (for those who aren't 2013; it probably have changed since then). Otherwise it sends only the first byte (according to debug messages).
I have a Sony receiver (str-dg710) and the as
command didn't work for me either. Even tx 15:82:11:00
didn't work. It has to be the broadcast address (f) – tx 1f:82:11:00
finally worked. Although my rasp has its physical cec address 1.0.0.0, switching the receiver inputs manually while running cec-client
showed that the first HDMI input has address 11:00
and not 10:00
, thus the address in the working tx command.