Android - Send Hdmi Cec Commands To Tv - Minix - Libcec
Solution 1:
First of all, very impressive reverse engineering work!
Secondly, I'm facing a similar issue (but with a non Minix product). Have you tried upgrading to a newer firmware, such as this one:
http://minixforum.com/threads/x8-x8-plus-x8-h-official-firmware-004a-not-for-x8-h-plus.5567/
I am suggesting this as a possible solution, because one of the issues it fixes is this:
Fixed HDMI-CEC multi devices issues
This means the device is not only a "slave", but also a "master" (i.e. can send commands to other hdmi devices).
Please note that as stated in the link, it is not intended for the plus version.
Good luck!
Solution 2:
My two cents on the issue:
Chapter I: Compassion
I went through all the trouble you went, too, especially with libCEC, so I'd like to describe the only way I got any interaction going between an Android TV box and the TV connected to it with HDMI cable.
Chapter II: Cooking low and slow
Send a request for connected device's power status
echo 0x40 0x8F > /sys/class/cec/cmd
To get the response, you can:
read the "registry"
cat /sys/class/cec/dump_reg
wait and look for the response in logcat
//Example:02-06 16:33:10.568 4012 4105 D CEC : [cec_rx_loop]msg:04900002-06 16:33:10.570 4012 4105 D HdmiCecExtend:onCecMessageRx02-06 16:33:10.657 4012 4012 W HDMI : [1]:Unhandledceccommand:<ReportPowerStatus>src:0,dst:4,params:0002-06 16:33:10.762 4012 4104 D CEC : [cec_send_message][4->0]len:3,body:009000,result:success
Magic numbers (codes) explanation:
40 - Playback device #104 - TV device #1
On - 9000
Off - 0000// in registry or no response at all in logcat
Other available codes can be constructed or read on Cec-O-Matic or amlogic.
Chapter III: New hope
I still have to try and get to Android's HdmiControlService but I still don't know how, probably through Java reflection. You can see HdmiCecExtend: onCecMessageRx
so the API is available on the device, but you cannot use it in Android Studio, as far as I know, it's only available to Android TV vendors.
Will update if anything comes along.
Post a Comment for "Android - Send Hdmi Cec Commands To Tv - Minix - Libcec"