libcec-daemon

Many months ago I purchased this cool little device from Pulse Eight, called a USB CEC Adapter. Basically it allows your computer to speak to a HDMI device over a protocol called CEC. This is useful for using your PC to control your TV, and for using your TV remote to control your PC. This device now allows me to use my normal TV remote to control XBMC, and to turn my PC on standby if I turn my TV off.

It’s all pretty neat, but each application needed to add libcec support, which means many applications do not support this little adapter. So I decided to write a simple uinput daemon that bridged Linux input events, and this CEC device. My project, libcec-daemon, has been available for many months now, and I’ve been using it successfully on my television. I just had forgotten to write a quick blog post about it :)

So please check it out, and support the great guys at Pulse Eight.

Be Sociable, Share!

13 Comments

  1. Zoolander06

    Hello, I try to use libcec-daemon on a Raspberry Pi, but when i launch it with “./libcec-daemon RPI”, I get this :
    root@XBian:~# ./libcec-daemon/libcec-daemon RPI
    INFO – Opened /dev/uinput
    INFO – Created uinput device
    RPI
    Failed to open adapter

    Do I have make something wrong ?

    • bramp

      what does ./libcec-daemon --list show?

      • Zoolander06

        Hi, it does that :

        root@XBian:~/libcec-daemon# ./libcec-daemon –list
        INFO – Opened /dev/uinput
        INFO – Created uinput device
        [0] port:RPI path:Raspberry Pi
        Failed to open

        Thank you for your help :)

      • Zoolander06

        I’ve tried with -v option, it does that (4 times) :
        DEBUG – Main::onCecLogMessage(1167 [D]unregistering all CEC clients
        )
        DEBUG – Main::onCecLogMessage(1174 [D]Broadcast (F): osd name set to ‘Broadcast’
        )
        DEBUG – Main::onCecLogMessage(1178 [D]InitHostCEC – vchiq_initialise succeeded
        )
        DEBUG – Main::onCecLogMessage(1181 [D]InitHostCEC – vchi_initialise succeeded
        )
        DEBUG – Main::onCecLogMessage(1183 [D]InitHostCEC – vchi_connect succeeded
        )
        DEBUG – Main::onCecLogMessage(4512 [E]failed to release the previous LA
        )
        DEBUG – Main::onCecLogMessage(4516 [E]could not open a connection (try 1)

        I think the line “failed to release the previous GA” is relevant, isn’t it ?

        • bramp

          Hey Zoolander, until last night I was actually unaware that libcec supported the Raspberry Pi. Those error message seem to be coming out of the libcec code (outside of my control). I will try and track down what’s happening, and speak to the libcec guys if needed.

  2. Zoolander06

    Thank you :)

  3. italoc

    hello, i’m traying this deamon and i think that is very powerfoul, i usi this for control VDR via HDMI-CEC.

    there is a way to customize the keymap?

    thank you

    • bramp

      Hey, sorry there isn’t a way to customise the keymap (other than recompiling it yourself). What specifically did you want to be able to change? I might be able to add some kind of keymap support.

      • Italoc

        I’ve tried to recompile after editing of main.cpp but some keys don work, for example colored button or the button electronic_program_guide i’d like to use this button as key_menu but don’t work…

        Can you say me how remap the button?

  4. italoc

    another question, there is a way to don’t turn on the TV when libcec-daemon start? i believe that this option was configured in USB-CEC adapter (bios) and not in software

    thank you

  5. Late-Z

    Hey,

    Is there a way to use your software to send commands to the TV? Let’s say I’m watching TV and I get a Skype call or something, I have devilspie to catch the event and command the libcec-daemon to send as message to the TV and it changes to the correct input. I think this would be a nice feature to have and useful to others as well.

    Thanks for the great software and hope to hear from you soon.

  6. geert

    Hey,

    Could you help me with this? I installed libcec-daemon on a raspberry pi with the raspbian (debian) distro.

    I get the following error:

    pi@raspberrypi ~ $ libcec-daemon
    libcec-daemon: malloc.c:3096: sYSMALLOc: Assertion `(old_top == (((mbinptr) (((char *) &((av)->bins[((1) - 1) * 2])) - __builtin_offsetof (struct malloc_chunk, fd)))) && old_size == 0) || ((unsigned long) (old_size) >= (unsigned long)((((__builtin_offsetof (struct malloc_chunk, fd_nextsize))+((2 * (sizeof(size_t))) - 1)) & ~((2 * (sizeof(size_t))) - 1))) && ((old_top)->size & 0x1) && ((unsigned long)old_end & pagemask) == 0)' failed.
    Afgebroken

    Can you help me with this?

    • srinivas

      Even I am facing the same issue. when i first installed, it worked. Form last few days with the latest libcec-daemon I have the same issue. Any help will be appreciated.
      Thanks.

Leave Your Comment

Your email will not be published or shared. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>