CEC on Android (It is working in Kodi :-D)

Moderators: odroid, mdrjr

CEC on Android (It is working in Kodi :-D)

Unread postby fleixi » Fri Jun 26, 2015 5:46 am

I have ask already if is CEC working on Android and you say no, but not why?

So i have tried a little for my self and have compiled libcec for android. I could start the cec-client and if i say "scan" this is my output:

CEC bus information
===================
device #0: TV
address: 0.0.0.0
active source: yes
vendor: LG
osd string: TV
CEC version: 1.3a
power status: on
language: eng


device #1: Recorder 1
address: 1.0.0.0
active source: no
vendor: LG
osd string: CECTester
CEC version: 1.3a
power status: on
language: eng


so the client is finding my TV.

Than i have use "as" and thats the output:

RAFFIC: [ 737065] >> 01:00
DEBUG: [ 737065] >> TV (0) -> Recorder 1 (1): feature abort ( 0)
TRAFFIC: [ 741296] >> 01:44:44
DEBUG: [ 741296] key pressed: play (44)
DEBUG: [ 741296] >> TV (0) -> Recorder 1 (1): user control pressed (44)
TRAFFIC: [ 741365] >> 01:45
DEBUG: [ 741365] key released: play (44)
DEBUG: [ 741365] >> TV (0) -> Recorder 1 (1): user control release (45)
TRAFFIC: [ 741891] >> 01:44:44
DEBUG: [ 741891] key pressed: play (44)
DEBUG: [ 741891] >> TV (0) -> Recorder 1 (1): user control pressed (44)
TRAFFIC: [ 741960] >> 01:45
DEBUG: [ 741960] key released: play (44)
DEBUG: [ 741960] >> TV (0) -> Recorder 1 (1): user control release (45)
TRAFFIC: [ 743112] >> 01:44:45
DEBUG: [ 743112] >> TV (0) -> Recorder 1 (1): user control pressed (44)
TRAFFIC: [ 743181] >> 01:45
DEBUG: [ 743182] >> TV (0) -> Recorder 1 (1): user control release (45)
DEBUG: [ 744182] key auto-released: stop (45)
TRAFFIC: [ 744209] >> 01:44:45
DEBUG: [ 744209] >> TV (0) -> Recorder 1 (1): user control pressed (44)
TRAFFIC: [ 744278] >> 01:45
DEBUG: [ 744278] >> TV (0) -> Recorder 1 (1): user control release (45)
DEBUG: [ 745278] key auto-released: stop (45)
TRAFFIC: [ 745874] >> 01:44:4c
DEBUG: [ 745874] key pressed: backward (4c)
DEBUG: [ 745875] >> TV (0) -> Recorder 1 (1): user control pressed (44)
TRAFFIC: [ 745944] >> 01:45
DEBUG: [ 745944] key released: backward (4c)
DEBUG: [ 745944] >> TV (0) -> Recorder 1 (1): user control release (45)
TRAFFIC: [ 751890] >> 0f:87:00:e0:91
DEBUG: [ 751890] << Recorder 1 (1) -> Broadcast (F): vendor id LG (e091)
TRAFFIC: [ 751890] << 1f:87:00:e0:91


so the cec-client is working :-D

Now my questions are: where need i to install it in android so kodi is finding the libcec or if there some other problems why it isnt working?
Last edited by fleixi on Sat Jun 27, 2015 2:39 am, edited 1 time in total.
fleixi
 
Posts: 126
Joined: Sun Apr 27, 2014 3:48 am
languages_spoken: english, german
ODROIDs: XU

Re: CEC on Android

Unread postby fleixi » Sat Jun 27, 2015 2:39 am

Ok i have made it working in Kodi:

1. Cross compile libcec 2.0.1 from the original git repo from https://github.com/Pulse-Eight/libcec (! libcec 3.0.0 isnt working with kodi)

2. push the libcec.so to /system/lib/

3. change the user and groupe from /dev/CEC to the kodi_user (use ps to find it)

4. start kodi and enjoy CEC on Android

Tested on Android 5.1 CM12.1

point 3 need to be worked out a little bit because it will be reset on reboot. (Any idee?)

Here is my compiled version for you to test:

https://owncloud.klaftenegger.de/public.php?service=files&t=45741dc2640e185158cfe881bd70edfa
fleixi
 
Posts: 126
Joined: Sun Apr 27, 2014 3:48 am
languages_spoken: english, german
ODROIDs: XU

Re: CEC on Android (It is working in Kodi :-D)

Unread postby voodik » Sat Jun 27, 2015 7:53 pm

point 3, are you tried change /dev/CEC permissions to 0666 in /system/ueventd.odroidxu.rc ?
Code: Select all
# CEC
/dev/CEC                  0666   system     system
Buy me a beer Here ;)
BTC: 3Lx83Vh9HL7UbsD9oDBcMR9pQMRSPEfRmg
User avatar
voodik
 
Posts: 1345
Joined: Sat Dec 07, 2013 2:36 am
languages_spoken: english,russian

Re: CEC on Android (It is working in Kodi :-D)

Unread postby fleixi » Sun Jun 28, 2015 8:51 pm

thanks so it is working after reboot too.
fleixi
 
Posts: 126
Joined: Sun Apr 27, 2014 3:48 am
languages_spoken: english, german
ODROIDs: XU

Re: CEC on Android (It is working in Kodi :-D)

Unread postby voodik » Sun Jun 28, 2015 9:03 pm

Good :) is it work with hdmi-1 source only ?
Buy me a beer Here ;)
BTC: 3Lx83Vh9HL7UbsD9oDBcMR9pQMRSPEfRmg
User avatar
voodik
 
Posts: 1345
Joined: Sat Dec 07, 2013 2:36 am
languages_spoken: english,russian

Re: CEC on Android (It is working in Kodi :-D)

Unread postby voodik » Mon Jun 29, 2015 12:01 am

Finally i ported libcec, tested and it working with any hdmi input (i set physical address 4000 for HDMI-4 in libcec settings).
I add it to next build. Thank you for suggestion.
Buy me a beer Here ;)
BTC: 3Lx83Vh9HL7UbsD9oDBcMR9pQMRSPEfRmg
User avatar
voodik
 
Posts: 1345
Joined: Sat Dec 07, 2013 2:36 am
languages_spoken: english,russian

Re: CEC on Android (It is working in Kodi :-D)

Unread postby fleixi » Mon Jun 29, 2015 12:08 am

perfect. i think it is working for a long time but no one has tried it since a long time.

what do the settings u have changed? sould i switch to your build or doesnt matter?
fleixi
 
Posts: 126
Joined: Sun Apr 27, 2014 3:48 am
languages_spoken: english, german
ODROIDs: XU

Re: CEC on Android (It is working in Kodi :-D)

Unread postby voodik » Mon Jun 29, 2015 12:40 am

fleixi wrote:perfect. i think it is working for a long time but no one has tried it since a long time.

what do the settings u have changed? sould i switch to your build or doesnt matter?

If your odroid connected to not HDMI-1 you need to change physical address in plugin settings otherwise after starting kodi it switches HDMI source on your TV to HDMI-1.
My lib size is only 594Kb :)
Buy me a beer Here ;)
BTC: 3Lx83Vh9HL7UbsD9oDBcMR9pQMRSPEfRmg
User avatar
voodik
 
Posts: 1345
Joined: Sat Dec 07, 2013 2:36 am
languages_spoken: english,russian

Re: CEC on Android (It is working in Kodi :-D)

Unread postby jgirven » Wed Jan 24, 2018 4:32 am

Hey voodik!

I know this was a long time ago, but I wondered if you could share how you built libcec for Android? I would love to be able to compile a newer version for myself. I would also be happy to donate to your fund to buy a new PC if that helps ... ;)
jgirven
 
Posts: 1
Joined: Wed Jan 24, 2018 4:27 am
languages_spoken: english


Return to Android

Who is online

Users browsing this forum: No registered users and 1 guest