Forum

Full Version: How to connect two Raspberry's to one TV and control them via CEC
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

is it possible to connect two Raspberry Pi's to one TV via HDMI and control them alternatively via CEC?

For test purposes i want to connect a second Raspberry to my TV in living room. However, if both are connected, I can not control either the first nor the second one.

Btw, if only one of my Raspberry's is connected, control via CEC works very well.

Thanks for your help
@Nachteule

of course, CEC allows 15+1 devices on one BUS (attached to one master(TV) device).

what you describe looks like very old (like 1y) bug which was making specifically RPI on CEC taking address of the other so effectively making CEC not working, but again, very long ago fixed.

before I had my 2x RPIs, I had connected to TV 2xRPI and 3ximx6 devices - 3 of them to HDMI in TV, into 4th hdmi was AVR attached and 2 more devices via AVR.
agreed with @mk01
I have 2 RPis connected via ONKYO AVR
Hmm, so what can I do? I'm using XBian RC3 with all currently available updates - on the 1st on runs XBMC 13.2 conected to TV's HDMI3 Port, on the second one KODI 14.0 RC3 connected to TV's HDMI4 Port (both selfcompiled based on this tutorial https://github.com/xbianonpi/xbian/wiki/Building-XBian-packages). The TV is a one year old Grundig 42 VLE 922 BL
@Nachteule

and you also use libcec from XBian repos ?
yes, of course

Code:
root@kmxbilr ~ # dpkg -l  | grep cec
ii  xbian-package-cec                 1.1-1a                        armhf        cec for XBian.
root@kmxbilr /usr # dpkg -L xbian-package-cec
/.
/usr
/usr/local
/usr/local/include
/usr/local/include/libcec
/usr/local/include/libcec/cecc.h
/usr/local/include/libcec/cectypes.h
/usr/local/include/libcec/cecloader.h
/usr/local/include/libcec/cec.h
/usr/local/bin
/usr/local/bin/cec-client
/usr/local/lib
/usr/local/lib/libcec.so.2.0.1
/usr/local/lib/libcec.a
/usr/local/lib/libcec.la
/usr/local/lib/pkgconfig
/usr/local/lib/pkgconfig/libcec.pc
/usr/local/lib/libcec.so
/usr/local/lib/libcec.so.2
root@kmxbilr /usr # find -name libcec*
./local/include/libcec
./local/lib/pkgconfig/libcec.pc
./local/lib/libcec.so
./local/lib/libcec.so.2
./local/lib/libcec.a
./local/lib/libcec.la
./local/lib/libcec.so.2.0.1
@Nachteule

this is from May-2013.

all that kind of bugs have been solved for RPI early-2014.

Code:
root@rpi ~ # apt-cache policy xbian-package-cec
xbian-package-cec:
  Installed: 9.2.2.0-1-1416753800
  Candidate: 9.2.2.0-1-1416753800
  Version table:
*** 9.2.2.0-1-1416753800 0
        500 mirror://apt.xbian.org/mirror.txt/ stable/rpi-wheezy armhf Packages
        100 /var/lib/dpkg/status
Ah, I'm really confused which apt repository I have to use.

I always used "http://apt.xbian.org stable main", but this seems outdated.
Now I changed to "http://apt.xbian.org wheezy rpi-wheezy", and I can get new versions of xbian-package-cec and xbian-package-firmware.

But I get an key error
Code:
W: GPG-Fehler: http://apt.xbian.org wheezy Release: Die folgenden Signaturen waren ungültig: BADSIG 5D3294C2529968ED CurlyMo <development@xbian.org>
How can I fix this?
Code:
wget -O - http://apt.xbian.org/xbian.gpg.key | sudo apt-key add -
does'nt solve this.

But, I can see a tiny light at the end of the tunnel Rolleyes

Thany you for your help
there is no confusion. http://www.xbian.org/faq

apt.xbian.org stable main is needed minimum for xbian-package-repo update and that will handle correct sources automatically
Sorry for my late response.

I've modified both apt folders and made all available updates on both Raspberry's and then -
It works perfect now

Thanks for your help
Reference URL's