Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to send HDMI CEC commands from an Android Device.

Tags:

I have an MK809 and would like to send an HDMI CEC command to turn on/off the TV that the device is connected to. Is there a way or library to send CEC command as I can't see anything documented anywhere?

like image 774
nickponline Avatar asked Mar 12 '13 00:03

nickponline


People also ask

What is the difference between HDMI ARC and HDMI-CEC?

CEC will enable control of on/off & volume of compatible AV Receivers or Soundbars via your Televisions remote control. ARC or Audio Return Channel will send sound back down the HDMI cable connected from your AVR or Soundbar.

What is CEC one touch play?

One Touch Play allows a media source device to turn on the TV and switch its input port automatically, so you don't have to search for the TV remote to switch from your Chromecast to Blu-ray player. With Android 12, power control of the HDMI-connected display aligns with power control of the internal display.

How do I access HDMI-CEC?

To enable [HDMI CEC Settings], press the HOME button, then select [Settings] — [Watching TV] — [External inputs] — [HDMI CEC Settings] — [CEC]. Activate HDMI CEC Settings on the connected device.

What is CEC switch on Android box?

CEC (Consumer Electronics Control) allows for HDMI devices to be controlled with one remote control. If you try to cast to a CEC supported TV while on a different source input (local TV channel, Cable, USB), source input will automatically switch to the HDMI port where the Chromecast is connected.


1 Answers

"HDMI-CEC is a one-wire bidirectional serial bus that uses the industry-standard AV.link protocol to perform remote control functions. CEC wiring is mandatory, although implementation of CEC in a product is optional. It was defined in HDMI Specification 1.0 and updated in HDMI 1.2, HDMI 1.2a and HDMI 1.3a (the last added timer and audio commands to the bus). USB to CEC Adapters exist that allow a computer to control CEC-enabled devices." Source

Assuming MK809 follows HDMI specification, it should possible from a hardware point of view. However, the issue lies in the software. I was unable to find a Java library for CEC commands during my cursory search, although I was able to find some for C and even Arduino.

Questions to ask:

  1. Does your device support CEC? Does the OS current support it with its driver?
  2. Does your hardware support it? (It does if it follows HDMI specification)
  3. Does your TV(s) support CEC? Will it actually turn off when it receives the command or just ignore it?

P.S.: Congrats, your question is the first I've answered since joining this website. :D

Update as of 2016: Android Lolipop does support new HDMI controls in the OS as the Android source code shows. The API documentation can be found here. Keep in mind it is still up the device manufacturer to actually support the API in the device drivers. Also, most TVs do now support CEC commands, but they are often not enabled by default.

like image 78
Skylion Avatar answered Oct 21 '22 09:10

Skylion