[RPi] Add HDMI-CEC support for Raspberry Pi #801

Closed
olajep opened this Issue Jun 6, 2012 · 24 comments

Projects

None yet

10 participants

@olajep
Contributor
olajep commented Jun 6, 2012

I have written a small hack which makes it possible to control XBMC with a TV remote control.
It would be good if you could add this to the RPi live build and even better if someone could integrate this into XBMC the proper way. ( The code currently use the HTTP API + curl)
The code is up on github:
https://github.com/olajep/rpi-cecd

@sraue sraue added a commit that closed this issue Jun 7, 2012
@sraue sraue new package: add package 'rpi-cecd', this fixes #801
Signed-off-by: Stephan Raue <stephan@openelec.tv>
ae0fd38
@sraue sraue closed this in ae0fd38 Jun 7, 2012
@olajep
Contributor
olajep commented Jun 7, 2012

I will test it when I get home from work.
On ons, 2012-06-06 at 23:40 -0700, Stephan Raue wrote:

included in http://sources.openelec.tv/tmp/image/openelec-rpi/OpenELEC-RPi.arm-devel-20120607081449-r11263.tar.bz2

can you test if it works for you?


Reply to this email directly or view it on GitHub:
#801 (comment)

@adam111316
Contributor

The fast forward and rewind buttons are the only things that are currently working on my samsung tv. Though this looks rather awesome!

@olajep
Contributor
olajep commented Jun 7, 2012

adam111316:
I've added some basic logging/debugging functionality now.
Test the new code and observe if the keypresses generate any events at all.

@olajep
Contributor
olajep commented Jun 7, 2012

sraue: It works ok for me.
Please use commit b240aec7a for the next live image.
And also redirect the log to /var/log/rpi-cecd.log to make it easy for people to post logs.

@adam111316
Contributor

olajep:
Shall do some time next week when I'm not so busy cramming for exams :P

@olajep
Contributor
olajep commented Jun 7, 2012

sraue:
5c37ac92201efe
is also good.

@guisacouto

This isn't working with LG TV (simplink). Any ideas why?

@popcornmix

@guisacouto
LG uses a particularly non-standard CEC implementation.
You will have to wait for the libCEC port.

@popcornmix

To get the left/right/up/down keys working on Panasonic you need:
vc_cec_send_MenuStatus(CEC_AllDevices_eTV, CEC_MENU_STATE_ACTIVATED, 0);
after the vc_cec_send_ActiveSource.

However I'm finding the buttons are often double-pressing, making it very hard to select things.
I've put some debugging in, and curl is only being called once, but it is triggering xbmc twice...

D'Oh! Just realised there was already a rpi-cecd running from /usr/bin as well as my edited version.
Killing one of those and the double presses disappear.

@olajep
Contributor
olajep commented Jun 9, 2012

On lör, 2012-06-09 at 14:05 -0700, popcornmix wrote:

To get the left/right/up/down keys working on Panasonic you need:
vc_cec_send_MenuStatus(CEC_AllDevices_eTV, CEC_MENU_STATE_ACTIVATED, 0);
after the vc_cec_send_ActiveSource.

However I'm finding the buttons are often double-pressing, making it very hard to select things.
I've put some debugging in, and curl is only being called once, but it is triggering xbmc twice...


Reply to this email directly or view it on GitHub:
#801 (comment)
Have you checked if you have more than one instance of rpi-cecd running?

( rpi-cecd is included in the OpenElec RPi nightly builds as of ~3 days
ago. )

@wumpyr
wumpyr commented Jun 10, 2012

There are no event data for critical keys Play, Pause and Stop on my Samsung. These are the keys that do generate events:
Fast Forward/Rewind
Enter/Up/Down/Left/Right
Coloured generic keys Red/Green/Yellow/Blue
Digits [0-9](no binding)

@lukeforeman

No joy on either of these TVs: (aware of LG/simplink issue) - nothing works at all

LG 32LD450:

root /var/log # cat rpi-cecd.log 
logical_address: 0x4
physical_address: 0x1000
cec_callback: debug: reason=0x0080, len=0x02, retval=0x00, param1=0x00000010, param2=0x00000000, param3=0x00000000, param4=0x00000000
cec_callback: unknown event: reason=0x0080, len=0x02, retval=0x00, param1=0x00000010, param2=0x00000000, param3=0x00000000, param4=0x00000000
cec_callback: debug: reason=0x0001, len=0x04, retval=0x00, param1=0x0010824f, param2=0x00000000, param3=0x00000000, param4=0x00000000
cec_callback: unknown event: reason=0x0001, len=0x04, retval=0x00, param1=0x0010824f, param2=0x00000000, param3=0x00000000, param4=0x00000000c

Sony Bravia 32W5500:

root /var/log # tail rpi-cecd.log 
logical_address: 0x4
physical_address: 0x3000
cec_callback: debug: reason=0x0080, len=0x02, retval=0x00, param1=0x00000011, param2=0x00000000, param3=0x00000000, param4=0x00000000
cec_callback: unknown event: reason=0x0080, len=0x02, retval=0x00, param1=0x00000011, param2=0x00000000, param3=0x00000000, param4=0x00000000
cec_callback: debug: reason=0x0001, len=0x04, retval=0x00, param1=0x0030824f, param2=0x00000000, param3=0x00000000, param4=0x00000000
cec_callback: unknown event: reason=0x0001, len=0x04, retval=0x00, param1=0x0030824f, param2=0x00000000, param3=0x00000000, param4=0x00000000```
@wumpyr
wumpyr commented Jun 10, 2012

I have the Samsung LED Series 9, 46 inch (LA46A950)

On 11 June 2012 00:23, olajep <
reply@reply.github.com

wrote:

wumpyr: which TV do you have?


Reply to this email directly or view it on GitHub:
#801 (comment)

@wumpyr
wumpyr commented Jun 11, 2012

I upgraded the Samsung TV firmware to the latest version but it did not
change the behaviour.

On 11 June 2012 00:23, olajep <
reply@reply.github.com

wrote:

wumpyr: which TV do you have?


Reply to this email directly or view it on GitHub:
#801 (comment)

@adam111316
Contributor

I'm having the same issues as wumpyr. I have a Samsung UA46C6900

There is no event data for:
Play, pause, stop
Keys that generate events:
Fast Forward/Rewind
Enter/Up/Down/Left/Right
Coloured generic keys Red/Green/Yellow/Blue
Digits 0-9

The return key gives an unknown event as below (yay easy fix :P)

cec_callback: debug: reason=0x0010, len=0x03, retval=0x00, param1=0x00918a04, param2=0x00000000, param3=0x00000000, param4=0x00000000
cec_callback: unknown event: reason=0x0010, len=0x03, retval=0x00, param1=0x00918a04, param2=0x00000000, param3=0x00000000, param4=0x00000000
@popcornmix

It needs:
vc_cec_send_MenuStatus(CEC_AllDevices_eTV, CEC_MENU_STATE_ACTIVATED, 0);
to receive all button presses.

@wumpyr
wumpyr commented Jun 11, 2012

Was there a specific reason this line was not included?

@olajep
Contributor
olajep commented Jun 11, 2012

On mån, 2012-06-11 at 05:15 -0700, wumpyr wrote:

Was there a specific reason this line was not included?


Reply to this email directly or view it on GitHub:
#801 (comment)
The right way to do it and not risk breaking something else is:

  1. Register for MenuStatus notifications in main.
  2. Check for it in the callback function.
  3. Send back vc_cec_send_MenuStatus(CEC_AllDevices_eTV,
    CEC_MENU_STATE_ACTIVATED, 0);
@wumpyr
wumpyr commented Jun 15, 2012

Were the latest fixes from daniel meant to make play/pause etc work? Because I tried it on my samsung and it didn't make any difference. There are no events seen in the rpi-cecd.log for play/pause...

@mialeo
mialeo commented Jun 16, 2012

OpenElec with CEC works on my LG 55LW570s. At least moving in XBMC menus, didn't check pause...
Could there be a way to send shutdown to TV when shuting down ?

@opdenkamp
Contributor

we are working with Broadcom to provide full libCEC support for the CEC wire of the RPi. we can't provide any ETA at this time.

@basvdl
basvdl commented Jul 14, 2012

anyone got it working on a Sharp Aquos?

@opdenkamp
Contributor

libCEC support is as good as ready (can't elaborate any further on this, NDA)
this will add support for just about every CEC device.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment