3

I have Samsung TV (UE46B8000XW) and Raspberry PI with OpenELEC install (cec-client is there). I found how to switch it off and how to change sources:

echo "standby 0" | cec-client -s' # switch off
echo "tx 2F:82:10:00" | cec-client -s' # hdmi1
echo "tx 2F:82:20:00" | cec-client -s' # hdmi2

But I can not find commands to change channels, increase/decrease volume. cec-o-matic.com doesn't help - it looks like many commands are not supported (see sample log at https://pastebin.com/VYFu0zYk).

Is there any way to get a full list of supported commands?

Update 1:
I think about the following approach - what if I try to send all possible commands one-by-one and then parse the result somehow. Looks like I can send all possible commands with bash. What is about checking result? What is the correct approach to understanding if the command is supported or not? Should I look for the reply TRAFFIC message?

Update 2: I am experimenting now with the following (value equal to 36 is switching off my TV, so I skip it):

for z in 10 e0 2f
do
    for i in $(seq 16 1 256)
    do
       i=$(printf "%0x\n" $i)
       if [[ $i != "36" ]]
       then
            echo "$z:$i"
            echo "tx $z:$i" | cec-client -s >> cectest-$z.txt
        fi
    done
done

Then I use the following regex to find non-standard replies:

TRAFFIC: \[.{16}\]  >> (?!01:90)(?!0f:87)
LA_
  • 141
  • 1
  • 6

2 Answers2

2

Maybe you need to change the command's structure to:

echo "txn 2F:82:10:00" | cec-client -s
echo "txn 2F:82:20:00" | cec-client -s  

Or:

echo "txn 2F 82 10 00" | cec-client -s
echo "txn 2F 82 20 00" | cec-client -s  

However, I've found that someone has had your problem. At the first, deactivate the AnyNet. Next, turn off the Samsung TV and unplug it from the grid. Finally, plug it again and restart the AnyNet.

I've searched but there is no reason for this problem, I didn't, at least.


If it's possible and you have an active source, try it:

echo "as" | cec-client -s -d 0  

Some timely wait...

echo "standby 0" | cec-client -s -d 0  

1, 2, 3

Mohi Rostami
  • 4,434
  • 1
  • 20
  • 39
2

I am not aware of a way to get a list of all supported commands (and I have read through most of the specs).

I would test to see if your TV supports User Control Pressed (e.g. echo tx "10:44:34" | cec-client to try Input Select). If it sends back a feature abort (e.g. 01:00:8e:04), you should check the following:

  1. Is the feature abort that is returned even for the same command (as you see from the example feature abort, my TV says that it doesn't support Menu Status when I try to send a User Control Pressed command...). The 3rd number (8e in my example) should be 44.
  2. Why is the feature abort returned (the 4th number, 04 in my example)?
    • 00 - command not supported
    • 01 - TV not in correct mode to respond
    • 02 - cannot provide source (obviously this one is unlikely)
    • 03 - invalid operand (presumably this would be returned if User Control Pressed is supported, but the specific control (e.g. Input Select) isn't.
    • 04 - refused (TV recognized the command and the control, but something else prevented it from working)
    • 05 - Unable to determine (TV is in a state where it can't determine if the command is supported)

If your TV doesn't support User Control Pressed, then you can hope that it has Vendor Specific commands or RC codes, but I don't know how you would go about figuring that out.

Notes

  • My examples assume that your Raspberry Pi is device 1 (default for mine), but you may want to read my answer here to make sure you understand CEC addressing and find your device numbers.
  • Make sure you run cec-client without to -s flag to make sure it's still running to see the response.
UrsineRaven
  • 126
  • 8