How to force XBMC to use Pulse Eight HDMI-CEC adapter
#1
Sorry for cross posting but I thought developing forum would be more suitable for this issue.

Recently I have managed to cross compile libcec for android, unfortunately I can't make it work with XBMC.
Here are some logs:
dmesg
Code:
[424676.945791] usb 2-1.3: new full speed USB device number 39 using usb20_host
[424677.070388] usb 2-1.3: New USB device found, idVendor=2548, idProduct=1002
[424677.070445] usb 2-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[424677.070530] usb 2-1.3: Product: USB-CEC Adapter
[424677.070565] usb 2-1.3: Manufacturer: Pulse-Eight
[424677.070605] usb 2-1.3: SerialNumber: v2 r8
[424677.072529] cdc_acm 2-1.3:1.0: ttyACM0: USB ACM device
[424677.077775] input: Pulse-Eight USB-CEC Adapter as /devices/platform/usb20_host/usb2/2-1/2-1.3/2-1.3:1.2/input/input35
[424677.078154] generic-usb 0003:2548:1002.002A: input: USB HID v1.10 Mouse [Pulse-Eight USB-CEC Adapter] on usb-usb20_host-1.3/input2

In cec-client I need to specify device, because libcec.so was build without autodetecion (no udev in android).

cec-client /dev/ttyACM0
Code:
No device type given. Using 'recording device'
CEC Parser created - libCEC version 2.1.3
opening a connection to the CEC adapter...
DEBUG:   [               1]    unregistering all CEC clients
DEBUG:   [               1]    Broadcast (F): osd name set to 'Broadcast'
DEBUG:   [               1]    connection opened, clearing any previous input and waiting for active transmissions to end before starting
DEBUG:   [               1]    communication thread started
DEBUG:   [              14]    turning controlled mode on
NOTICE:  [              35]    connection opened
DEBUG:   [              35]    processor thread started
DEBUG:   [              35]    << Broadcast (F) -> TV (0): POLL
TRAFFIC: [              36]    << f0
DEBUG:   [              36]    setting the line timeout to 3
DEBUG:   [              72]    CEC transmission - received response - TRANSMIT_FAILED_ACK
TRAFFIC: [              72]    << f0
DEBUG:   [             108]    CEC transmission - received response - TRANSMIT_FAILED_ACK
DEBUG:   [             109]    >> POLL not sent
DEBUG:   [             109]    TV (0): device status changed into 'not present'
NOTICE:  [             109]    registering new CEC client - v2.1.3
DEBUG:   [             109]    detecting logical address for type 'recording device'
DEBUG:   [             109]    trying logical address 'Recorder 1'
DEBUG:   [             109]    << Recorder 1 (1) -> Recorder 1 (1): POLL
TRAFFIC: [             109]    << 11
DEBUG:   [             140]    CEC transmission - received response - TRANSMIT_FAILED_ACK
TRAFFIC: [             140]    << 11
DEBUG:   [             176]    CEC transmission - received response - TRANSMIT_FAILED_ACK
DEBUG:   [             176]    >> POLL not sent
DEBUG:   [             176]    using logical address 'Recorder 1'
DEBUG:   [             176]    Recorder 1 (1): device status changed into 'handled by libCEC'
DEBUG:   [             176]    Recorder 1 (1): power status changed from 'unknown' to 'on'
DEBUG:   [             176]    Recorder 1 (1): CEC version 1.4
DEBUG:   [             176]    AllocateLogicalAddresses - device '0', type 'recording device', LA '1'
DEBUG:   [             176]    setting ackmask to  2
DEBUG:   [             181]    Recorder 1 (1): osd name set to 'CECTester'
DEBUG:   [             181]    Recorder 1 (1): menu language set to 'eng'
DEBUG:   [             181]    GetPhysicalAddress - trying to get the physical address via ADL
DEBUG:   [             182]    GetPhysicalAddress - ADL returned physical address 0000
DEBUG:   [             182]    GetPhysicalAddress - trying to get the physical address via nvidia driver
DEBUG:   [             182]    GetPhysicalAddress - nvidia driver returned physical address 0000
DEBUG:   [             182]    GetPhysicalAddress - trying to get the physical address from the OS
DEBUG:   [             182]    GetPhysicalAddress - OS returned physical address 0000
DEBUG:   [             182]    SetDevicePhysicalAddress - not setting invalid physical address 0000
NOTICE:  [             182]    setting HDMI port to 1 on device TV (0)
DEBUG:   [             182]    << Recorder 1 (1) -> TV (0): POLL
TRAFFIC: [             182]    << 10
DEBUG:   [             213]    CEC transmission - received response - TRANSMIT_FAILED_ACK
TRAFFIC: [             213]    << 10
DEBUG:   [             249]    CEC transmission - received response - TRANSMIT_FAILED_ACK
DEBUG:   [             249]    >> POLL not sent
DEBUG:   [             249]    Recorder 1 (1): physical address changed from ffff to 1000
DEBUG:   [             249]    << Recorder 1 (1) -> broadcast (F): physical adddress 1000
TRAFFIC: [             249]    << 1f:84:10:00:01
DEBUG:   [             384]    using persisted autonomous mode setting: 'enabled'
DEBUG:   [             389]    using persisted CEC version setting: '1.4'
DEBUG:   [             394]    using persisted logical address setting: 'Recorder 1'
DEBUG:   [             400]    using persisted device type setting: 'recording device'
DEBUG:   [             405]    using persisted logical address mask setting: '206'
DEBUG:   [             420]    using persisted device name setting: 'CECTester'
DEBUG:   [             425]    using persisted physical address setting: '1000'
NOTICE:  [             427]    CEC client registered: libCEC version = 2.1.3, client version = 2.1.3, firmware version = 4, firmware build date: Thu Dec  6 11:15:20 2012 +0000, logical address(es) = Recorder 1 (1) , base device: TV (0), HDMI port number: 1, physical address: 1.0.0.0, host: arm-unknown-linux-androideabi, features: 'P8 USB', git revision: f679125, compiled on: Sun Oct 20 14:32:58 UTC 2013 by root@mariano-VirtualBox on Linux 3.2.0-54-generic-pae (i686)
DEBUG:   [             427]    << Recorder 1 (1) -> TV (0): OSD name 'CECTester'
DEBUG:   [             427]    << Recorder 1 (1) -> TV (0): POLL
TRAFFIC: [             427]    << 10
DEBUG:   [             461]    CEC transmission - received response - TRANSMIT_FAILED_ACK
TRAFFIC: [             461]    << 10
DEBUG:   [             493]    CEC transmission - received response - TRANSMIT_FAILED_ACK
DEBUG:   [             493]    >> POLL not sent
DEBUG:   [             493]    not sending command 'set osd name': destination device 'TV' marked as not present
DEBUG:   [             493]    << requesting power status of 'TV' (0)
DEBUG:   [             493]    << Recorder 1 (1) -> TV (0): POLL
TRAFFIC: [             493]    << 10
DEBUG:   [             529]    CEC transmission - received response - TRANSMIT_FAILED_ACK
TRAFFIC: [             529]    << 10
DEBUG:   [             560]    CEC transmission - received response - TRANSMIT_FAILED_ACK
DEBUG:   [             560]    >> POLL not sent
DEBUG:   [             560]    not sending command 'give device power status': destination device 'TV' marked as not present
waiting for input
signal caught: 2 - exiting
DEBUG:   [            3365]    unregistering all CEC clients
NOTICE:  [            3365]    unregistering client: libCEC version = 2.1.3, client version = 2.1.3, firmware version = 4, firmware build date: Thu Dec  6 11:15:20 2012 +0000, logical address(es) = Recorder 1 (1) , base device: TV (0), HDMI port number: 1, physical address: 1.0.0.0, host: arm-unknown-linux-androideabi, features: 'P8 USB', git revision: f679125, compiled on: Sun Oct 20 14:32:58 UTC 2013 by root@mariano-VirtualBox on Linux 3.2.0-54-generic-pae (i686)
DEBUG:   [            3365]    Recorder 1 (1): power status changed from 'on' to 'unknown'
DEBUG:   [            3365]    Recorder 1 (1): CEC version unknown
DEBUG:   [            3365]    Recorder 1 (1): osd name set to 'Recorder 1'
DEBUG:   [            3365]    Recorder 1 (1): device status changed into 'unknown'
DEBUG:   [            3365]    setting ackmask to  0
DEBUG:   [            3367]    turning controlled mode off
DEBUG:   [            3372]    unregistering all CEC clients
DEBUG:   [            3383]    communication thread ended

That log was made without TV connected, but if I connect it I can see information of events sent by remote controller. So this part works fine, but XBMC can't recognize adapter and I can't use it :/.

I tried few things. First I modified /data/data/org.xbmc.xbmc/cache/apk/assets/system/peripherals.xml

Code:
<peripherals>
  <peripheral vendor_product="1915:003B,22B8:003B" bus="usb" name="Motorola Nyxboard Hybrid" mapTo="nyxboard">
    <setting key="do_not_use_custom_keymap" type="bool" value="0" label="35009" order="1" />
    <setting key="keymap" value="nyxboard" label="35007" configurable="0" />
    <setting key="enable_flip_commands" type="bool" value="1" label="36005" order="2" />
    <setting key="flip_keyboard" value="XBMC.VideoLibrary.Search" label="36002" order="3" />
    <setting key="flip_remote" value="Dialog.Close(virtualkeyboard)" label="36003" order="4" />
  </peripheral>

  <peripheral vendor_product="2548:1001,2548:1002" bus="usb" name="Pulse-Eight CEC Adapter" mapTo="cec">
    <setting key="enabled" type="bool" value="1" label="305" order="1" />
    <setting key="activate_source" type="bool" value="1" label="36020" order="2" />
    <setting key="wake_devices" type="enum" value="36037" label="36007" lvalues="36037|36038|36039|231" order="3" />
    <setting key="standby_devices" type="enum" value="36037" label="36008" lvalues="36037|36038|36039|231" order="4" />
    <setting key="send_inactive_source" type="bool" value="1" label="36025" order="5" />
    <setting key="cec_standby_screensaver" type="bool" value="0" label="36009" order="6" />
    <setting key="cec_wake_screensaver" type="bool" value="1" label="36010" order="7" />
    <setting key="standby_pc_on_tv_standby" type="enum" value="13011" label="36029" order="8" lvalues="36028|13005|13011" />
    <setting key="standby_tv_on_pc_standby" type="bool" value="1" label="36026" order="9" />
    <setting key="use_tv_menu_language" type="bool" value="1" label="36018" order="10" />
    <setting key="pause_playback_on_deactivate" type="bool" value="1" label="36033" order="11" />
    <setting key="connected_device" type="enum" label="36019" value="36037" lvalues="36037|36038" order="12" />
    <setting key="cec_hdmi_port" type="int" value="1" min="1" max="15" label="36015" order="13" />
    <setting key="physical_address" type="string" label="36021" value="0" order="14" />
    <setting key="port" type="string" value="/dev/ttyACM0" label="36022" order="15" />

    <setting key="tv_vendor" type="int" value="0" configurable="0" />
    <setting key="device_name" type="string" value="XBMC" configurable="0" />
    <setting key="device_type" type="int" value="1" configurable="0" />
    <setting key="wake_devices_advanced" type="string" value="" configurable="0" />
    <setting key="standby_devices_advanced" type="string" value="" configurable="0" />
    <setting key="double_tap_timeout_ms" type="int" min="0" value="2000" configurable="0" />
  </peripheral>

  <!-- <peripheral vendor_product="2548:1001,2548:1002" bus="usb" name="Pulse-Eight CEC Adapter" mapTo="cec">
         This entry will not create a CPeripheralCecAdapter instance, since it's filtered out in CPeripherals::CreatePeripheral,
         but it will ensure that a warning is displayed when an adapter is inserted, but libCEC is not present or couldn't be loaded.
         Since libCEC is now used to scan for devices, the warning will not be displayed without this mapping
  </peripheral> -->

  <peripheral vendor_product="15C2:32,15C2:33,15C2:34,15C2:35,15C2:36,15C2:37,15C2:38,15C2:39,15C2:3A,15C2:3B,15C2:3C,15C2:3D,15C2:3E,15C2:3F,15C2:41,15C2:42,15C2:43,15C2:44,15C2:45,15C2:46" bus="usb" name="iMON HID device" mapTo="imon">
    <setting key="do_not_use_custom_keymap" type="bool" value="1" label="35009" configurable="0"/>
    <setting key="disable_winjoystick" type="bool" value="1" label="35102" order="1" />
  </peripheral>
</peripherals>

No luck, then I created usb_2548_1002.xml file under /mnt/sdcard/Android/data/org.xbmc.xbmc/files/.xbmc/userdata/peripheral_data

Code:
<settings>
    <setting id="activate_source" value="1" />
    <setting id="cec_hdmi_port" value="3" />
    <setting id="cec_standby_screensaver" value="0" />
    <setting id="cec_wake_screensaver" value="1" />
    <setting id="connected_device" value="36037" />
    <setting id="device_name" value="XBMC" />
    <setting id="device_type" value="1" />
    <setting id="double_tap_timeout_ms" value="2000" />
    <setting id="enabled" value="1" />
    <setting id="pause_playback_on_deactivate" value="1" />
    <setting id="physical_address" value="0" />
    <setting id="port" value="/dev/ttyACM0" />
    <setting id="send_inactive_source" value="1" />
    <setting id="standby_devices" value="231" />
    <setting id="standby_devices_advanced" value="" />
    <setting id="standby_pc_on_tv_standby" value="13011" />
    <setting id="standby_tv_on_pc_standby" value="1" />
    <setting id="tv_vendor" value="0" />
    <setting id="use_tv_menu_language" value="1" />
    <setting id="wake_devices" value="36037" />
    <setting id="wake_devices_advanced" value="" />
</settings>

No luck either :/

Here is XBMC log:

http://pastebin.com/ZWfj5Tnv

I presume there is a problem with detection of P8 adapter by libusb but there is no libusb.so in android libs.
Is there any way to make XBMC to use P8 adapter without detection by libusb?

Thanks in advance.
Reply
#2
Did you ever manage to get this working?

got a Minix 7 Mini, I would love to use with this adapter, and there just doesn't seem to be any information about it
Reply

Logout Mark Read Team Forum Stats Members Help
How to force XBMC to use Pulse Eight HDMI-CEC adapter0