CEC Remote Control

This topic contains 14 replies, has 7 voices, and was last updated by Profile photo of herbfargus herbfargus 1 year, 11 months ago.

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #81697
    Profile photo of muffy
    muffy
    Participant

    Hi,
    is it possible to navigate in RetroPie with your TV Remote Control by using the CEC Service?

    #87645
    Profile photo of supernashwan
    supernashwan
    Participant

    This would be great, but I think it might be a limitation of emulation station rather than RetroPie.

    #87649
    Profile photo of supernashwan
    supernashwan
    Participant

    Actually the CEC wasn’t working with the kodi that I installed with retropie_setup.sh so I used the following commands to install and compile libCEC for raspberry pi

    Install the necessary tools for compiling:

    sudo apt-get install build-essential autoconf liblockdev1-dev libudev-dev git libtool pkg-config

    Clone the git repository:

    git clone git://github.com/Pulse-Eight/libcec.git

    Additional Step

    in later versions you need to add
    AC_CONFIG_AUX_DIR([.]) to the top of configure.ac
    ACLOCAL_AMFLAGS = -I . to the top of Makefile.am

    Compile:

    cd libcec
    ./bootstrap
    ./configure --with-rpi-include-path=/opt/vc/include --with-rpi-lib-path=/opt/vc/lib --enable-rpi
    sudo make
    sudo make install

    Link the libraries so that cec-client can find them:

    sudo ldconfig

    Check that cec-client have found the device by running:

    cec-client -l:

    Found devices: 1

    device: 1
    com port: RPI
    vendor id: 2708
    product id: 1001
    firmware version: 1
    type: Raspberry Pi

    i found the instructions here

    https://nyxi.eu/blog/2013/04/15/raspbian-libcec/

    now my TV remote works in Kodi, but I still need my controller to launch Kodi from emulation station.

    #88300
    Profile photo of happy
    happy
    Participant

    Actually the CEC wasn’t working with the kodi that I installed with retropie_setup.sh so I used the following commands to install and compile libCEC for raspberry pi

    Hi! I have downloaded the 2.6.0 image of Retropie to my RPi2 and installed Kodi using the Retropie setup script -> Experimental packages -> Kodi.

    It works well, but like you I soon noticed that CEC didn’t work. (It works well from Openelec on the same TV/Pi, so nothing hardware-related).

    I tried following the steps you list to install libcec, but I run into trouble when trying to execute the ./configure command.

    Here’s the output I get:
    checking for a BSD-compatible install… /usr/bin/install -c
    checking whether build environment is sane… yes
    checking for a thread-safe mkdir -p… /bin/mkdir -p
    checking for gawk… no
    checking for mawk… mawk
    checking whether make sets $(MAKE)… yes
    checking whether make supports nested variables… yes
    checking build system type… armv7l-unknown-linux-gnueabihf
    checking host system type… armv7l-unknown-linux-gnueabihf
    checking for g++… g++
    checking whether the C++ compiler works… no
    configure: error: in `/home/pi/libcec’:
    configure: error: C++ compiler cannot create executables
    See `config.log’ for more details

    Unfortunately I don’t have the config.log file available right now (not at home), but my faith is strong that the above is enough to tell someone more experienced with this stuff than I am what might be wrong. So, any idea what’s wrong?

    #88962
    Profile photo of supernashwan
    supernashwan
    Participant

    I am thinking that several of the commands i listed above need to be run with sudo.

    and the configure command should be one line, but it wraps in this forum, the forum also seems to have removed the double ‘-‘

    here is the configure line again. i will update the post up further

    ./configure --with-rpi-include-path=/opt/vc/include --with-rpi-lib-path=/opt/vc/lib --enable-rpi

    there is also some changes in the latest version of autoreconf that require modification to some files before you run bootstrap

    AC_CONFIG_AUX_DIR([.]) to the top of configure.ac
    ACLOCAL_AMFLAGS = -I . to the top of Makefile.am

    #89033
    Profile photo of happy
    happy
    Participant

    I am thinking that several of the commands i listed above need to be run with sudo.

    AC_CONFIG_AUX_DIR([.]) to the top of configure.ac
    ACLOCAL_AMFLAGS = -I . to the top of Makefile.am

    Hi,

    Thanks for the reply.

    First of all I believe it’s not really necessary (or even advisable) to run all those commands with sudo. So AFAIK you can/should skip sudo for all commands except:
    sudo make install and
    sudo ldconfig

    I belive I also attempted the two modifications in comfigure.ac and MAkefile.am too, but I will check again this evening just to make sure.

    #89182
    Profile photo of supernashwan
    supernashwan
    Participant

    If you haven’t already, check out this thread

    http://blog.petrockblock.com/forums/topic/a-guide-for-adding-xbmc-with-working-wireless-360-to-retropie/

    to get your Kodi also working with xboxdrv. It works great with Xbox 360 controllers, and can also work with ps3 controllers with some tweaking.

    #94617
    Profile photo of theslx
    theslx
    Participant

    Just a little heads up, if hdmi cec in kodi is the only thing you need right now (emulationstation doesn’t support it (yet)) there seems to me a much easier approach.
    I tried the above steps with compiling but I failed that. Then I just installed “cec-utils” and cec worked perfectly in kodi.

    sudo apt-get install cec-utils

    Hope this helps someone.

    #96943
    Profile photo of supernashwan
    supernashwan
    Participant

    @theslx

    that is way better than the mess I went through. that command would make a nice addition to the retropi_setup.sh script.

    #101307
    Profile photo of whonx
    whonx
    Participant

    Hi. This worked for me in the 3.0 Beta2, but not in the last 3.0 Beta4. Any ideas?

    #103187
    Profile photo of davidraid
    davidraid
    Participant

    A branch of emulationstation was forked in mid June by the github user CeRiAl that has native and working CEC support. Control of the menu through HDMI works perfectly and I assume this would give us the seamless movement from Emulationstation to Kodi and back that people want. Can Retropie use this branch or merge it’s additions? It would require the Retrpie-script to install the cec-utils package by default but little else would be needed to give that integration. As someone who uses a bluetooth gamepad, I would love to be able to boot the pi and begin watching a movie without having to wait for my gamepad to pair when I’m not going to be using it. 🙂

    https://github.com/CeRiAl/EmulationStation

    #103190
    Profile photo of herbfargus
    herbfargus
    Member

    I agree and I think its a great idea but there’s one issue in that the fork listed has support for libcec2 whereas kodi 15 needs libcec3 (which we’ll eventually be upgrading to) and it really just depends on how much petrockblog wants to maintain his fork of emulation station (since it already has the custom settings for controllers) ideally these things should be merged into the master emulationstation but aloshi hasn’t really done much with it since he got a job.

    #103191
    Profile photo of davidraid
    davidraid
    Participant

    That does sound like an issue and I understand that Kodi 15 will eventually be used but there must be a way to have one’s cake and eat it. Is it possible to have libcec2 and libcec3 installed concurrently, so that Emulation Station can use the libcec2 library and then Kodi 15 use libcec3?

    Or could this hdmi-cec compatible fork of Emulation Station be modified to work with the newer libcec3? Do you think it require a great deal of alteration and testing to make the fork compatible with libcec3?

    At the very least, this would be useful to have in the 3.0 stable until Kodi 15 begins to be integrated into the future builds. 🙂

    #103192
    Profile photo of davidraid
    davidraid
    Participant

    Alternatively, I’ve found that a user on the Recalbox forums named Allan Lindqvist has written a daemon that translates CEC inputs into keyboard strokes. Could this be added to the Retropie sd card images? This would mean that the remote would be detected as a keyboard in its own right and could be configured using Retropie’s existing gui and that Kodi would recognise the keyboard inputs automatically. It would sidestep the need for Kodi to use its own CEC implimentation entirely.

    https://github.com/diablodiab/libcec-daemon

    http://blog.recalbox.com/forums/topic/my-setup-and-perhaps-some-inspiration-for-new-recalbox-functionality/

    This is an example video of it functioning on OpenElec

    Perhaps the CEC input could register as a device in the same manner that Retropie saves configuration files for gamepads by name? And the experimental package could just have a keymap file included in it that registers those inputs.

    #103196
    Profile photo of herbfargus
    herbfargus
    Member

    I know libcec3 has been requested on that fork for the same reasons with kodi, but I’m not sure how much changes would need to be made to update it.

    Im also not sure if you can have both or if one will override the other and cause conflicts, I haven’t looked into it all that much to know one way or the other.

    It would be cool though. If I was better at coding I’d do it myself, but I wouldn’t even know where to begin. Perhaps one day when I’m feeling really ambitious I may attempt it.

    That recalbox idea is pretty cool too- its very similar to the joy2key thing we have set up now except it would be like a remote2key.

    Kodi also has support for gamepads, but unfortunately our current build was compiled without joypad support. I’m also hoping that with the kodi 15 build we can enable the joypad support when we compile it so people can use their gamepads as well.

    BTW there’s a ticket on github for these ideas to be implemented:

    https://github.com/RetroPie/RetroPie-Setup/issues/879

Viewing 15 posts - 1 through 15 (of 15 total)

Forums are currently read only - please visit the new RetroPie forums at https://retropie.org.uk/forums/

Skip to toolbar