cec

XBMC subforum

cec

Postby kohonen » Mon Mar 03, 2014 7:21 pm

i have hacked my wandboard using the following link:
http://www.project-insanity.org/blog/20 ... -and-xbmc/

problem is, can't get it working with neither cec-client nor xbmc
[root@alarm]# cec-client -l
Found devices: 1

device: 1
com port: i.MX
vendor id: 0471
product id: 1001
firmware version: 0
type: i.MX

[root@alarm]# cec-client
No device type given. Using 'recording device'
CEC Parser created - libCEC version 2.1.4
no serial port given. trying autodetect:
path: /dev/mxc_hdmi_cec
com port: i.MX

opening a connection to the CEC adapter...
DEBUG: [ 45] unregistering all CEC clients
DEBUG: [ 46] Broadcast (F): osd name set to 'Broadcast'
NOTICE: [ 47] connection opened
DEBUG: [ 47] processor thread started
DEBUG: [ 47] << Broadcast (F) -> TV (0): POLL
TRAFFIC: [ 47] << f0
DEBUG: [ 149] >> POLL sent
DEBUG: [ 149] TV (0): device status changed into 'present'
DEBUG: [ 149] << requesting vendor ID of 'TV' (0)
TRAFFIC: [ 149] << f0:8c
DEBUG: [ 1219] expected response not received (87: device vendor id)
TRAFFIC: [ 1219] << f0:8c
DEBUG: [ 2389] expected response not received (87: device vendor id)
NOTICE: [ 2389] registering new CEC client - v2.1.4
DEBUG: [ 2389] detecting logical address for type 'recording device'
DEBUG: [ 2389] trying logical address 'Recorder 1'
DEBUG: [ 2389] << Recorder 1 (1) -> Recorder 1 (1): POLL
TRAFFIC: [ 2389] << 11
ERROR: [ 2449] Write: sent command error !
TRAFFIC: [ 2449] << 11
ERROR: [ 2549] Write: sent command error !
DEBUG: [ 2549] >> POLL not sent
DEBUG: [ 2549] using logical address 'Recorder 1'
DEBUG: [ 2549] Recorder 1 (1): device status changed into 'handled by libCEC'
DEBUG: [ 2549] Recorder 1 (1): power status changed from 'unknown' to 'on'
DEBUG: [ 2549] Recorder 1 (1): vendor = Pulse Eight (001582)
DEBUG: [ 2549] Recorder 1 (1): CEC version 1.4
DEBUG: [ 2549] AllocateLogicalAddresses - device '0', type 'recording device', LA '1'
DEBUG: [ 2550] Recorder 1 (1): osd name set to 'CECTester'
DEBUG: [ 2550] Recorder 1 (1): menu language set to 'eng'
DEBUG: [ 2550] SetDevicePhysicalAddress - not setting invalid physical address 0000
NOTICE: [ 2550] setting HDMI port to 1 on device TV (0)
DEBUG: [ 2550] Recorder 1 (1): physical address changed from ffff to 1000
DEBUG: [ 2550] << Recorder 1 (1) -> broadcast (F): physical adddress 1000
TRAFFIC: [ 2550] << 1f:84:10:00:01
NOTICE: [ 2689] CEC client registered: libCEC version = 2.1.4, client version = 2.1.4, firmware version = 0, logical address(es) = Recorder 1 (1) , base device: TV (0), HDMI port number: 1, physical address: 1.0.0.0, host: armv7l-unknown-linux-gnueabihf, features: 'P8 USB' 'P8 USB detect' 'i.MX6', git revision: ea25675, compiled on: Mon Mar 3 07:39:36 UTC 2014 by alarm@alarm on Linux 3.0.35_4.1.0-5-ARCH+ (armv7l)
DEBUG: [ 2689] << Recorder 1 (1) -> TV (0): OSD name 'CECTester'
TRAFFIC: [ 2689] << 10:47:43:45:43:54:65:73:74:65:72
DEBUG: [ 3109] << requesting power status of 'TV' (0)
TRAFFIC: [ 3109] << 10:8f
DEBUG: [ 4179] expected response not received (90: report power status)
TRAFFIC: [ 4179] << 10:8f
DEBUG: [ 5329] expected response not received (90: report power status)
waiting for input


xbmc.log:
00:00:37 T:1114046464 NOTICE: Register - new cec device registered on cec->i.MX: CEC Adapter (0471:1001)
00:00:37 T:1333785648 NOTICE: Thread CECAdapter start, auto delete: false
00:00:37 T:1344271408 NOTICE: Thread PeripBusCEC start, auto delete: false
00:00:37 T:1333785648 ERROR: CecLogMessage - could not open a connection (try 1)
00:00:37 T:1333785648 ERROR: CecLogMessage - Close: Unable to stop device
00:00:38 T:1333785648 ERROR: CecLogMessage - could not open a connection (try 2)
00:00:38 T:1333785648 ERROR: CecLogMessage - Close: Unable to stop device
00:00:39 T:1333785648 ERROR: CecLogMessage - could not open a connection (try 3)
00:00:39 T:1333785648 ERROR: CecLogMessage - Close: Unable to stop device
00:00:40 T:1333785648 ERROR: CecLogMessage - could not open a connection (try 4)
00:00:40 T:1333785648 ERROR: CecLogMessage - Close: Unable to stop device
00:00:41 T:1333785648 ERROR: CecLogMessage - could not open a connection (try 5)
00:00:41 T:1333785648 ERROR: CecLogMessage - Close: Unable to stop device
00:00:42 T:1333785648 ERROR: CecLogMessage - could not open a connection (try 6)
00:00:42 T:1333785648 ERROR: CecLogMessage - Close: Unable to stop device
00:00:43 T:1333785648 ERROR: CecLogMessage - could not open a connection (try 7)
00:00:43 T:1333785648 ERROR: CecLogMessage - Close: Unable to stop device
00:00:44 T:1333785648 ERROR: CecLogMessage - could not open a connection (try 8)
00:00:44 T:1333785648 ERROR: CecLogMessage - Close: Unable to stop device
00:00:45 T:1333785648 ERROR: CecLogMessage - could not open a connection (try 9)
00:00:45 T:1333785648 ERROR: CecLogMessage - Close: Unable to stop device
00:00:46 T:1333785648 ERROR: CecLogMessage - could not open a connection (try 10)
00:00:46 T:1333785648 ERROR: CecLogMessage - Close: Unable to stop device
18:45:43 T:1333785648 ERROR: CecLogMessage - could not start CEC communications
18:45:43 T:1333785648 ERROR: OpenConnection - could not opening a connection to the CEC adapter
18:45:53 T:1333785648 ERROR: CecLogMessage - SetLogicalAddresses: HDMICEC_IOC_SETLOGICALADDRESS failed !

kohonen
 
Posts: 16
Joined: Sun Feb 02, 2014 11:42 am

Re: cec

Postby setti » Tue Mar 04, 2014 11:30 am

running cec-client and xbmc cec-adapter at the same time is not possible.
As you say, that cec-client is finding your device, it seems you correctly soldered the "cec-pipe-hack".
For me your problems seems software/driver related.
setti
 
Posts: 39
Joined: Fri Jan 10, 2014 6:15 pm

Re: cec

Postby kohonen » Tue Mar 04, 2014 1:18 pm

i know, i am 99% sure it is not a hardware problem, but how do i fix it? :mrgreen:
kohonen
 
Posts: 16
Joined: Sun Feb 02, 2014 11:42 am

Re: cec

Postby setti » Tue Mar 04, 2014 1:43 pm

your cec messages are nearly identical to mine.
So you could remote your tv using cec-client. for instance by sending "standby 0" or "on 0" to turn off/on your tv.
Are you running xbmc via service? It could be you are missing some udev rules, to let the xbmc user write to cec.

Im having some more udev rules on my system.

Code: Select all
root@wandboard:/ # cat /etc/udev/rules.d/99-input.rules
KERNEL=="event*", SUBSYSTEM=="input", GROUP="tty", MODE="0660"
SUBSYSTEM=="tty", KERNEL=="tty[0-9]*", GROUP="tty", MODE="0660"

root@wandboard:/ # cat /etc/udev/rules.d/99-hdmi-cec.rules
KERNEL=="mxc_hdmi", SUBSYSTEM=="mxc_hdmi", GROUP="video", MODE="0666"
KERNEL=="mxc_hdmi_cec", SUBSYSTEM=="mxc_hdmi_cec", GROUP="video", MODE="0666"

root@wandboard:/ # id xbmc
uid=1000(xbmc) gid=1000(xbmc) Gruppen=1000(xbmc),5(tty),6(disk),10(wheel),90(network),91(video),92(audio),93(optical),95(storage),98(power)



you could try to figure out, if it is udev related, by running xbmc via root in foreground.

Could you please tell me if, you have trouble getting cec up and running on after restarting your tv, while xbmc is running. im having an issue, that the cec-adapter is not found anymore after tv restarts.
setti
 
Posts: 39
Joined: Fri Jan 10, 2014 6:15 pm

Re: cec

Postby kohonen » Tue Mar 04, 2014 2:13 pm

problem is, cec-client doesn't react to the remote control, you are supposed to see some messages when pressing buttons on the remote

Code: Select all
[root@alarm /]#  cat /etc/udev/rules.d/99-input.rules
KERNEL=="event*", SUBSYSTEM=="input", GROUP="tty", MODE="0660"
SUBSYSTEM=="tty", KERNEL=="tty[0-9]*", GROUP="tty", MODE="0660"
[root@alarm /]# id xbmc
uid=1001(xbmc) gid=1001(xbmc) groups=1001(xbmc),6(disk),90(network),91(video),92(audio),93(optical),95(storage),98(power)

we have almost the same output, BUT i don't have the 99-hdmi-cec.rules file :geek:
i will try it after i get home, thanks for a hint!
kohonen
 
Posts: 16
Joined: Sun Feb 02, 2014 11:42 am

Re: cec

Postby setti » Tue Mar 04, 2014 2:40 pm

your udev rule doesnt do anything for user xbmc, since your xbmc user isnt in group tty.

try
Code: Select all
usermod -G tty -a xbmc
setti
 
Posts: 39
Joined: Fri Jan 10, 2014 6:15 pm

Re: cec

Postby kohonen » Tue Mar 04, 2014 2:43 pm

yeah, that's clear, but i am running the cec-client under root. anyway, i will try and let you know later today (tonight?)
kohonen
 
Posts: 16
Joined: Sun Feb 02, 2014 11:42 am

Re: cec

Postby kohonen » Tue Mar 04, 2014 7:17 pm

it did help, thanks a lot!
kohonen
 
Posts: 16
Joined: Sun Feb 02, 2014 11:42 am

Re: cec

Postby setti » Tue Mar 04, 2014 7:41 pm

nice to hear that.
could you please try the following:
stop xbmc
start TV
start cec-client
stop tv
start tv
enter the following inside cec-client session: standby 0

in other words, is your cec-client detecting the restart of the TV? Im Not sure if im having a software or hardware Problem....
setti
 
Posts: 39
Joined: Fri Jan 10, 2014 6:15 pm

Re: cec

Postby kohonen » Tue Mar 04, 2014 8:17 pm

cec-client doesn't seem to be working very good for me, i have stopped xbmc, but it is not even reacting to remote key presses. i have a LG TV and when running xbmc, TV shows "HDD recorder" as the simplink source, don't know if it's ok.


Code: Select all
[root@alarm ~]# cec-client
No device type given. Using 'recording device'
CEC Parser created - libCEC version 2.1.4
no serial port given. trying autodetect:
 path:     /dev/mxc_hdmi_cec
 com port: i.MX

opening a connection to the CEC adapter...
DEBUG:   [              45]   unregistering all CEC clients
DEBUG:   [              45]   Broadcast (F): osd name set to 'Broadcast'
NOTICE:  [              46]   connection opened
DEBUG:   [              46]   processor thread started
DEBUG:   [              46]   << Broadcast (F) -> TV (0): POLL
TRAFFIC: [              47]   << f0
DEBUG:   [             103]   >> POLL sent
DEBUG:   [             103]   TV (0): device status changed into 'present'
DEBUG:   [             103]   << requesting vendor ID of 'TV' (0)
TRAFFIC: [             103]   << f0:8c
DEBUG:   [            1173]   expected response not received (87: device vendor id)
TRAFFIC: [            1173]   << f0:8c
DEBUG:   [            2243]   expected response not received (87: device vendor id)
NOTICE:  [            2243]   registering new CEC client - v2.1.4
DEBUG:   [            2243]   detecting logical address for type 'recording device'
DEBUG:   [            2243]   trying logical address 'Recorder 1'
DEBUG:   [            2243]   << Recorder 1 (1) -> Recorder 1 (1): POLL
TRAFFIC: [            2243]   << 11
ERROR:   [            2293]   Write: sent command error !
TRAFFIC: [            2293]   << 11
ERROR:   [            2333]   Write: sent command error !
DEBUG:   [            2333]   >> POLL not sent
DEBUG:   [            2333]   using logical address 'Recorder 1'
DEBUG:   [            2333]   Recorder 1 (1): device status changed into 'handled by libCEC'
DEBUG:   [            2333]   Recorder 1 (1): power status changed from 'unknown' to 'on'
DEBUG:   [            2333]   Recorder 1 (1): vendor = Pulse Eight (001582)
DEBUG:   [            2333]   Recorder 1 (1): CEC version 1.4
DEBUG:   [            2333]   AllocateLogicalAddresses - device '0', type 'recording device', LA '1'
DEBUG:   [            2334]   Recorder 1 (1): osd name set to 'CECTester'
DEBUG:   [            2334]   Recorder 1 (1): menu language set to 'eng'
DEBUG:   [            2334]   SetDevicePhysicalAddress - not setting invalid physical address 0000
NOTICE:  [            2334]   setting HDMI port to 1 on device TV (0)
DEBUG:   [            2334]   Recorder 1 (1): physical address changed from ffff to 1000
DEBUG:   [            2334]   << Recorder 1 (1) -> broadcast (F): physical adddress 1000
TRAFFIC: [            2334]   << 1f:84:10:00:01
NOTICE:  [            2473]   CEC client registered: libCEC version = 2.1.4, client version = 2.1.4, firmware version = 0, logical address(es) = Recorder 1 (1) , base device: TV (0), HDMI port number: 1, physical address: 1.0.0.0, host: armv7l-unknown-linux-gnueabihf, features: 'P8 USB' 'P8 USB detect' 'i.MX6', git revision: ea25675, compiled on: Mon Mar  3 07:39:36 UTC 2014 by alarm@alarm on Linux 3.0.35_4.1.0-5-ARCH+ (armv7l)
DEBUG:   [            2473]   << Recorder 1 (1) -> TV (0): OSD name 'CECTester'
TRAFFIC: [            2473]   << 10:47:43:45:43:54:65:73:74:65:72
DEBUG:   [            2893]   << requesting power status of 'TV' (0)
TRAFFIC: [            2893]   << 10:8f
DEBUG:   [            3963]   expected response not received (90: report power status)
TRAFFIC: [            3963]   << 10:8f
DEBUG:   [            5033]   expected response not received (90: report power status)
waiting for input
scan
requesting CEC bus information ...
DEBUG:   [            8640]   << Recorder 1 (1) -> Recorder 2 (2): POLL
TRAFFIC: [            8640]   << 12
ERROR:   [            8683]   Write: sent command error !
TRAFFIC: [            8683]   << 12
ERROR:   [            8723]   Write: sent command error !
DEBUG:   [            8723]   >> POLL not sent
DEBUG:   [            8723]   Recorder 2 (2): device status changed into 'not present'
DEBUG:   [            8723]   << Recorder 1 (1) -> Tuner 1 (3): POLL
TRAFFIC: [            8723]   << 13
ERROR:   [            8763]   Write: sent command error !
TRAFFIC: [            8763]   << 13
ERROR:   [            8803]   Write: sent command error !
DEBUG:   [            8803]   >> POLL not sent
DEBUG:   [            8803]   Tuner 1 (3): device status changed into 'not present'
DEBUG:   [            8803]   << Recorder 1 (1) -> Playback 1 (4): POLL
TRAFFIC: [            8803]   << 14
ERROR:   [            8843]   Write: sent command error !
TRAFFIC: [            8843]   << 14
ERROR:   [            8883]   Write: sent command error !
DEBUG:   [            8883]   >> POLL not sent
DEBUG:   [            8883]   Playback 1 (4): device status changed into 'not present'
DEBUG:   [            8883]   << Recorder 1 (1) -> Audio (5): POLL
TRAFFIC: [            8883]   << 15
ERROR:   [            8923]   Write: sent command error !
TRAFFIC: [            8923]   << 15
ERROR:   [            8963]   Write: sent command error !
DEBUG:   [            8963]   >> POLL not sent
DEBUG:   [            8963]   Audio (5): device status changed into 'not present'
DEBUG:   [            8963]   << Recorder 1 (1) -> Tuner 2 (6): POLL
TRAFFIC: [            8963]   << 16
ERROR:   [            9003]   Write: sent command error !
TRAFFIC: [            9003]   << 16
ERROR:   [            9043]   Write: sent command error !
DEBUG:   [            9043]   >> POLL not sent
DEBUG:   [            9043]   Tuner 2 (6): device status changed into 'not present'
DEBUG:   [            9043]   << Recorder 1 (1) -> Tuner 3 (7): POLL
TRAFFIC: [            9043]   << 17
ERROR:   [            9083]   Write: sent command error !
TRAFFIC: [            9083]   << 17
ERROR:   [            9123]   Write: sent command error !
DEBUG:   [            9123]   >> POLL not sent
DEBUG:   [            9123]   Tuner 3 (7): device status changed into 'not present'
DEBUG:   [            9123]   << Recorder 1 (1) -> Playback 2 (8): POLL
TRAFFIC: [            9123]   << 18
ERROR:   [            9163]   Write: sent command error !
TRAFFIC: [            9163]   << 18
ERROR:   [            9203]   Write: sent command error !
DEBUG:   [            9203]   >> POLL not sent
DEBUG:   [            9203]   Playback 2 (8): device status changed into 'not present'
DEBUG:   [            9203]   << Recorder 1 (1) -> Recorder 3 (9): POLL
TRAFFIC: [            9203]   << 19
ERROR:   [            9243]   Write: sent command error !
TRAFFIC: [            9243]   << 19
ERROR:   [            9283]   Write: sent command error !
DEBUG:   [            9283]   >> POLL not sent
DEBUG:   [            9283]   Recorder 3 (9): device status changed into 'not present'
DEBUG:   [            9283]   << Recorder 1 (1) -> Tuner 4 (A): POLL
TRAFFIC: [            9283]   << 1a
ERROR:   [            9323]   Write: sent command error !
TRAFFIC: [            9323]   << 1a
ERROR:   [            9363]   Write: sent command error !
DEBUG:   [            9363]   >> POLL not sent
DEBUG:   [            9363]   Tuner 4 (A): device status changed into 'not present'
DEBUG:   [            9363]   << Recorder 1 (1) -> Playback 3 (B): POLL
TRAFFIC: [            9363]   << 1b
ERROR:   [            9403]   Write: sent command error !
TRAFFIC: [            9403]   << 1b
ERROR:   [            9443]   Write: sent command error !
DEBUG:   [            9443]   >> POLL not sent
DEBUG:   [            9443]   Playback 3 (B): device status changed into 'not present'
DEBUG:   [            9443]   << Recorder 1 (1) -> Reserved 1 (C): POLL
TRAFFIC: [            9443]   << 1c
ERROR:   [            9483]   Write: sent command error !
TRAFFIC: [            9483]   << 1c
ERROR:   [            9523]   Write: sent command error !
DEBUG:   [            9523]   >> POLL not sent
DEBUG:   [            9523]   Reserved 1 (C): device status changed into 'not present'
DEBUG:   [            9523]   << Recorder 1 (1) -> Reserved 2 (D): POLL
TRAFFIC: [            9523]   << 1d
ERROR:   [            9563]   Write: sent command error !
TRAFFIC: [            9563]   << 1d
ERROR:   [            9603]   Write: sent command error !
DEBUG:   [            9603]   >> POLL not sent
DEBUG:   [            9603]   Reserved 2 (D): device status changed into 'not present'
DEBUG:   [            9603]   << Recorder 1 (1) -> Free use (E): POLL
TRAFFIC: [            9603]   << 1e
ERROR:   [            9643]   Write: sent command error !
TRAFFIC: [            9643]   << 1e
ERROR:   [            9683]   Write: sent command error !
DEBUG:   [            9683]   >> POLL not sent
DEBUG:   [            9683]   Free use (E): device status changed into 'not present'
DEBUG:   [            9683]   << requesting active source
TRAFFIC: [            9683]   << 1f:85
DEBUG:   [           10753]   expected response not received (82: active source)
TRAFFIC: [           10753]   << 1f:85
DEBUG:   [           11823]   expected response not received (82: active source)
DEBUG:   [           11823]   << requesting vendor ID of 'TV' (0)
TRAFFIC: [           11823]   << 10:8c
DEBUG:   [           12893]   expected response not received (87: device vendor id)
TRAFFIC: [           12893]   << 10:8c
DEBUG:   [           14073]   expected response not received (87: device vendor id)
DEBUG:   [           14073]   << requesting vendor ID of 'TV' (0)
TRAFFIC: [           14073]   << 10:8c
DEBUG:   [           15143]   expected response not received (87: device vendor id)
TRAFFIC: [           15143]   << 10:8c
DEBUG:   [           16313]   expected response not received (87: device vendor id)
DEBUG:   [           16313]   << requesting CEC version of 'TV' (0)
TRAFFIC: [           16313]   << 10:9f
DEBUG:   [           17383]   expected response not received (9E: cec version)
TRAFFIC: [           17383]   << 10:9f
DEBUG:   [           18553]   expected response not received (9E: cec version)
DEBUG:   [           18553]   << requesting power status of 'TV' (0)
TRAFFIC: [           18553]   << 10:8f
DEBUG:   [           19743]   expected response not received (90: report power status)
TRAFFIC: [           19743]   << 10:8f
DEBUG:   [           20943]   expected response not received (90: report power status)
DEBUG:   [           20943]   << requesting menu language of 'TV' (0)
TRAFFIC: [           20943]   << 10:91
DEBUG:   [           22143]   expected response not received (32: set menu language)
TRAFFIC: [           22143]   << 10:91
DEBUG:   [           23313]   expected response not received (32: set menu language)
DEBUG:   [           23313]   << requesting active source
TRAFFIC: [           23313]   << 1f:85
DEBUG:   [           24383]   expected response not received (82: active source)
TRAFFIC: [           24383]   << 1f:85
DEBUG:   [           25453]   expected response not received (82: active source)
CEC bus information
===================
device #0: TV
address:       0.0.0.0
active source: no
vendor:        Unknown
osd string:    TV
CEC version:   unknown
power status:  unknown
language:      ???


device #1: Recorder 1
address:       1.0.0.0
active source: no
vendor:        Pulse Eight
osd string:    CECTester
CEC version:   1.4
power status:  on
language:      eng


currently active source: unknown (-1)
kohonen
 
Posts: 16
Joined: Sun Feb 02, 2014 11:42 am

Next

Return to Software - XBMC

Who is online

Users browsing this forum: No registered users and 6 guests