Cubox i4 Pro and Xbox One media remote

This forum is for supported devices using an ARMv7 Freescale SoC.

Cubox i4 Pro and Xbox One media remote

Postby Orbi » Sun Feb 15, 2015 7:02 pm

I bought the Xbox One media remote after reading positive feedback about it working well with the cubox and Kodi. I must say I'm impressed by the build quality and the range, Microsoft did well.

$this->bbcode_second_pass_code('', 'root@alarm ~]# uname -a
Linux alarm 3.14.33-1-ARCH #1 SMP Thu Feb 12 01:41:04 MST 2015 armv7l GNU/Linux')

I'm trying to get the remote working with ir-keytable.

The cubox recognizes keypresses but without linking it to keynames:
$this->bbcode_second_pass_code('', '[root@alarm ~]# ir-keytable -t
Testing events. Please, press CTRL-C to abort.
1424026790.210813: event type EV_MSC(0x04): scancode = 0x80d81e
1424026790.210813: event type EV_SYN(0x00).
1424026796.200995: event type EV_MSC(0x04): scancode = 0x80d821
1424026796.200995: event type EV_SYN(0x00).
1424026797.093896: event type EV_MSC(0x04): scancode = 0x80d81f
1424026797.093896: event type EV_SYN(0x00).')

$this->bbcode_second_pass_code('', '[root@alarm ~]# ir-keytable
Found /sys/class/rc/rc0/ (/dev/input/event0) with:
Driver gpio-rc-recv, table rc-empty
Supported protocols: NEC RC-5 RC-6 JVC SONY SANYO LIRC other
Enabled protocols: NEC
Name: gpio_ir_recv
bus: 25, vendor/product: 0001:0001, version: 0x0100
Repeat delay = 500 ms, repeat period = 125 ms')

ir-keytable loads a table called rc-empty. I can't however find where this table is located. Anyway, I'm trying to load a custom table with the following command :
$this->bbcode_second_pass_code('', '[root@alarm ~]# ir-keytable -c -w /etc/rc_keymaps/XboxOneRemote
Read XboxOneRemote table
Old keytable cleared
Wrote 21 keycode(s) to driver
Protocols changed to NEC')

However, this doesn't seem to change much as the used table is still rc-empty:
$this->bbcode_second_pass_code('', 'Found /sys/class/rc/rc0/ (/dev/input/event0) with:
Driver gpio-rc-recv, table rc-empty
Supported protocols: NEC RC-5 RC-6 JVC SONY SANYO LIRC other
Enabled protocols: NEC
Name: gpio_ir_recv
bus: 25, vendor/product: 0001:0001, version: 0x0100
Repeat delay = 500 ms, repeat period = 125 ms')

The journal gives the following information about ir-keytable:
$this->bbcode_second_pass_code('', '-- Unit systemd-udevd.service has begun starting up.
Feb 14 09:30:38 alarm kernel: IR keymap rc-rc6-mce not found
Feb 14 09:30:38 alarm kernel: Registered IR keymap rc-empty
Feb 14 09:30:38 alarm kernel: input: gpio_ir_recv as /devices/soc0/ir-receiver.24/rc/rc0/input0
Feb 14 09:30:38 alarm kernel: rc0: gpio_ir_recv as /devices/soc0/ir-receiver.24/rc/rc0
Feb 14 09:30:38 alarm kernel: IR Sony protocol handler initialized
Feb 14 09:30:38 alarm kernel: input: MCE IR Keyboard/Mouse (gpio-rc-recv) as /devices/virtual/input/input1
Feb 14 09:30:38 alarm kernel: IR MCE Keyboard/mouse protocol handler initialized
Feb 14 09:30:38 alarm kernel: IR NEC protocol handler initialized
Feb 14 09:30:38 alarm kernel: IR RC5(x) protocol handler initialized
Feb 14 09:30:38 alarm kernel: IR RC6 protocol handler initialized
Feb 14 09:30:38 alarm kernel: IR SANYO protocol handler initialized
Feb 14 09:30:38 alarm kernel: lirc_dev: IR Remote Control driver registered, major 242
Feb 14 09:30:38 alarm kernel: IR JVC protocol handler initialized
Feb 14 09:30:38 alarm kernel: rc rc0: lirc_dev: driver ir-lirc-codec (gpio-rc-recv) registered at minor = 0
Feb 14 09:30:38 alarm kernel: IR LIRC bridge handler initialized
Feb 14 09:30:38 alarm kernel: caam 2100000.caam: device ID = 0x0a16010000000000 (Era -524)
Feb 14 09:30:38 alarm kernel: caam 2100000.caam: job rings = 2, qi = 0
Feb 14 09:30:38 alarm kernel: cfg80211: Calling CRDA to update world regulatory domain
Feb 14 09:30:38 alarm kernel: usbcore: registered new interface driver brcmfmac
Feb 14 09:30:37 alarm systemd-udevd[187]: starting version 218
Feb 14 09:30:38 alarm systemd[1]: Started udev Kernel Device Manager.
-- Subject: Unit systemd-udevd.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit systemd-udevd.service has finished starting up.')

What can I do?
Orbi
 
Posts: 16
Joined: Fri Feb 13, 2015 7:02 am

Re: Cubox i4 Pro and Xbox One media remote

Postby pepedog » Sun Feb 15, 2015 8:00 pm

Do you have /etc/modules.load.d/ir-lirc-codec.conf
It should have ir-nec-decoder inside it
it-keytable should look like this
$this->bbcode_second_pass_code('', '0x80d864 KEY_MEDIA
0x80d81e KEY_UP
0x80d81f KEY_DOWN
0x80d820 KEY_LEFT
0x80d821 KEY_RIGHT
0x80d822 KEY_OK
0x80d823 KEY_EXIT
0x80d80e KEY_MUTE
0x80d810 KEY_VOLUMEUP
0x80d811 KEY_VOLUMEDOWN
0x80d812 KEY_CHANNELUP
0x80d813 KEY_CHANNELDOWN
0x80d870 KEY_PLAY
0x80d814 KEY_FASTFORWARD
0x80d815 KEY_REWIND
0x80d819 KEY_STOP
0x80d81a KEY_NEXT
0x80d81b KEY_PREVIOUS
0x80d826 KEY_EPG
0x80d86f KEY_DVD
0x80d86e KEY_ZOOM')
Now buy me one so I can test
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: Cubox i4 Pro and Xbox One media remote

Postby Orbi » Mon Feb 16, 2015 8:42 am

pepedog, amazon is selling the remote with 40% discount. I'm willing to contribute :)

my ir-keytable was wrong. ir-keytable -t recognizes the keynames now. I'll see tonight if KODI needs additional tuning...
Orbi
 
Posts: 16
Joined: Fri Feb 13, 2015 7:02 am

Re: Cubox i4 Pro and Xbox One media remote

Postby Orbi » Tue Feb 17, 2015 7:53 am

I don't have /etc/modules.load.d/ir-lirc-codec.conf with ir-nec-decoder inside it.

After modifying kodi's keyboard.xml, the remote is fully functional in kodi. Since it's working now, do I still need /etc/modules.load.d/ir-lirc-codec.conf ?
Orbi
 
Posts: 16
Joined: Fri Feb 13, 2015 7:02 am

Re: Cubox i4 Pro and Xbox One media remote

Postby Orbi » Fri Feb 20, 2015 10:46 am

After using the remote a couple of days with Kodi, I thought I would give some feedback about my experience with it.

Generally speaking, the experience is averagely satisfying. I managed to get all the buttons working in Kodi and the range is good. I'm sitting on my couch 3m from the cubox. I really have to point the remote towards the cubox to get the keypresses registered. Reports of other users complaining about the lack of sensitivity of the IR receiver are not exaggerated.

It is however annoying that sometimes a keypress results in a double action. It is a random occurrence and doesn’t happen with the same keys. When I want to pause a movie because my phone is calling, it takes several tries to actually pause the movie because one push on the pause button results in Kodi pausing and immediately playing the movie.

Another annoying fact is that after not using the remote a while (for example 30min) it takes several keypresses to actually get a reaction. It’s like the IR receiver or the decoding system enter a ‘sleep’ mode when they are not used and it takes like 5 seconds of pushing the remote buttons to get a reaction. After getting a reaction, all reacts well except for the occasional double press.

I have not read similar reactions of people using the Xbox One media remote with Openelec. Since Openelec uses lirc, I wonder if this would solve the annoyances I’ve been experiencing. It should work the same with or without lirc, right?

Perhaps something else is interfering with how the signal is decoded. Does anyone have a clue?
Orbi
 
Posts: 16
Joined: Fri Feb 13, 2015 7:02 am

Re: Cubox i4 Pro and Xbox One media remote

Postby fattoony » Fri Feb 20, 2015 8:58 pm

Hi Orbi
Would you mind expanding on what was wrong with your ir-keytable

"my ir-keytable was wrong. ir-keytable -t recognizes the keynames now. I'll see tonight if KODI needs additional tuning..."

I think i am having similar problems to what you had, here is what i have so far.

$this->bbcode_second_pass_code('', 'drew@Xserve[ ~ $ uname -a
Linux Xserve 3.14.33-2-ARCH #1 SMP Mon Feb 16 13:40:54 MST 2015 armv7l GNU/Linux')


ir-keytable returns this...
$this->bbcode_second_pass_code('', 'drew@Xserve[ ~ $ ir-keytable
Found /sys/class/rc/rc0/ (/dev/input/event2) with:
Driver gpio-rc-recv, table rc-empty
Supported protocols: NEC RC-5 RC-6 JVC SONY SANYO LIRC RC-5-SZ other
Enabled protocols: NEC RC-5 RC-6 JVC SONY SANYO LIRC RC-5-SZ other
Name: gpio_ir_recv
bus: 25, vendor/product: 0001:0001, version: 0x0100
Repeat delay = 500 ms, repeat period = 125 ms')

I suspect "Driver gpio-rc-recv, table rc-empty" is the problem but no clue how to sort it!!

ir-keytable -t will not recognise any key presses from any remote.

dmesg

$this->bbcode_second_pass_code('', '[ 14.531535] IR keymap rc-rc6-mce not found
[ 14.538141] Registered IR keymap rc-empty
[ 14.544548] input: gpio_ir_recv as /devices/soc0/ir-receiver.24/rc/rc0/input2
[ 14.554228] rc0: gpio_ir_recv as /devices/soc0/ir-receiver.24/rc/rc0
[ 14.569344] systemd[1]: Found device /dev/ttymxc0.
[ 14.587586] IR SANYO protocol handler initialized
[ 14.596369] rc rc0: lirc_dev: driver ir-lirc-codec (gpio-rc-recv) registered at minor = 0
[ 14.606914] input: MCE IR Keyboard/Mouse (gpio-rc-recv) as /devices/virtual/input/input3
[ 14.620238] IR MCE Keyboard/mouse protocol handler initialized
[ 14.690742] systemd[1]: Starting Sound Card.
[ 14.703324] systemd[1]: Reached target Sound Card.
[ 14.749425] caam 2100000.caam: device ID = 0x0a16010000000000 (Era -524)
[ 14.760911] caam 2100000.caam: job rings = 2, qi = 0
[ 14.880586] cfg80211: Calling CRDA to update world regulatory domain
[ 14.942589] usbcore: registered new interface driver brcmfmac
[ 15.141822] systemd[1]: Starting system-lvm2\x2dpvscan.slice.
[ 15.157256] systemd[1]: Created slice system-lvm2\x2dpvscan.slice.
[ 15.165800] systemd[1]: Starting LVM2 PV scan on device 8:1...
[ 15.170900] brcmfmac: brcmf_c_preinit_dcmds: Firmware version = wl0: Oct 25 2011 19:34:12 version 5.90.125.104')

If i
$this->bbcode_second_pass_code('', 'sudo cat /dev/lirc0')
do get output from remote key presses but the output is garbled, which suggests that the cubox is at least receiving the inputs

I would be very grateful for your input.

Kind regards,
Drew
fattoony
 
Posts: 8
Joined: Fri Feb 20, 2015 8:50 pm

Re: Cubox i4 Pro and Xbox One media remote

Postby Orbi » Fri Feb 20, 2015 9:36 pm

Hi Drew,

Before pepedog posted his keymap, mine was like this:
$this->bbcode_second_pass_code('', '# table XboxOneRemote, type: NEC
0x80d864 XboxFancyButton
0x80d86e View
0x80d86f Menu
0x80d81e Up
0x80d81f Down
0x80d820 Left
0x80d821 Right
0x80d822 Select
0x80d823 Back
0x80d826 Guide
0x80d810 VolumeUp
0x80d811 VolumeDown
0x80d80e Mute
0x80d812 ChannelUp
0x80d813 ChannelDown
0x80d815 Rewind
0x80d814 FastForward
0x80d870 Play
0x80d81b Previous
0x80d81a Next
0x80d819 Stop')

You can see the differences between his and mine. I changed a couple of keys to suit my needs, and voila ir-keytable -t recognized all key presses.

I see you try using both ir-keytable and lirc. If you have lirc installed, you have to continue configuring your remote with lirc. Otherwise, you remove lirc and try to get your remote working with ir-keytable.

I think the easiest is to try it with ir-keytable and then go the lirc route should that not work out.
You also have a Xbox One remote?
Orbi
 
Posts: 16
Joined: Fri Feb 13, 2015 7:02 am

Re: Cubox i4 Pro and Xbox One media remote

Postby fattoony » Sat Feb 21, 2015 12:43 pm

Thanks for the quick responce Orbi,

Lirc as far as i know is not installed, i have it selected as an enabled protocol along with rc5, rc6, nec, etc... as i am still
stuck at the first stage of nailing down which protocol my remote uses.

My problem is that..
$this->bbcode_second_pass_code('', 'ir-keytable -c -p NEC,RC-5,RC-6,JVC,SONY,SANYO,LIRC,RC-5-SZ -t')
does not generate any events, so i can't figure out which protocol to use.

I am thinking it has something to do with the correct models being loaded, Pepedog mentioned earlier..
$this->bbcode_second_pass_quote('', 'D')o you have /etc/modules.load.d/ir-lirc-codec.conf
It should have ir-nec-decoder inside it

on my system /etc/modules.load.d/ does not exist.

$this->bbcode_second_pass_quote('', 'y')ou also have a Xbox One remote?

No i have the Xbox 360 Media Remote, wish i had seen the Xbox one remote looks nice & compact.
fattoony
 
Posts: 8
Joined: Fri Feb 20, 2015 8:50 pm

Re: Cubox i4 Pro and Xbox One media remote

Postby Orbi » Sat Feb 21, 2015 2:31 pm

Can you run:
$this->bbcode_second_pass_code('', 'systemctl status lirc')

Looking at your dmesg, it looks like only the Sanyo and MCE IR protocols are loaded. Try loading the ir-rc6-decoder as pepedog suggested (xbox 360 uses the rc6 protocol, not nec).

Create the necessary folder and file.
Orbi
 
Posts: 16
Joined: Fri Feb 13, 2015 7:02 am

Re: Cubox i4 Pro and Xbox One media remote

Postby fattoony » Sat Feb 21, 2015 3:47 pm

$this->bbcode_second_pass_code('', 'drew@Xserve[ ~ $ systemctl status lirc
* lirc.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)')
fattoony
 
Posts: 8
Joined: Fri Feb 20, 2015 8:50 pm

Next

Return to Freescale

Who is online

Users browsing this forum: No registered users and 21 guests