Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
  • 1
  • 6
  • 7
  • 8(current)
  • 9
  • 10
  • 16
How to get a seamless remote experience
(2013-04-29, 23:51)GreatEmerald Wrote:
(2013-04-29, 22:10)cw-kid Wrote: When using the in kernel option with ir-keytable no LIRC can you use a remote.xml file? Or just the keyboard.xml file.

In-kernel LIRC interprets remotes as keyboards, so XBMC uses the keyboard.xml file. You can freely change what button represents what keystroke by modifying the files in /etc/rc_keymaps/. It makes sense to check out the stock keyboard.xml file and rebind your rc_keymaps to closely match the keys in the stock keyboard.xml file (so you don't need to change the XML files to begin with).

Hi

I've got all the standard MCE buttons working fine. I used the imon_mce keymap file and modified it to work for all the buttons. I also edited the keyboard.xml file to get some of the buttons working.

Really struggling now to add custom buttons and I can't get the discrete poweron / poweroff commands working on the Logitech Harmony MCE remote.

There are 77 predifined scancodes / Keys in the imon_mce keymap file, trying to figure out how to add my own new custom keys.

I can only seem to use the predefined scancodes for custom buttons, for example a button that is not being used like the RED button I can change this from KEY_RED to KEY_O to say bring up the CodecInfo.

But that means I am limited in the number of custom buttons I can create and the number of predefined scancodes that are not bring used like Yellow, Blue, Green buttons etc.
Reply
I started a thread here which has more details

Really need an expert who knows what they are doing to help me out as getting stuck now.

Thanks
Reply
Has anyone figured out how IR-Keytable key names relate to XBMC key names yet?

I have been working on getting IR-Keytable working with my Pronto TSU9400 for days now. Up until now, I have been running XBMC Live 10.1 which used LIRC for remote commands. I have a set of 256 working IR commands on my Pronto that LIRC recognises and can be used for any command I choose in XBMC Live 10.1.

I upgraded my HTPC to XBMCbuntu 12.00 only to find LIRC didn't work anymore, so I did some digging and found this thread (and many others on the subject of IR-Keytable). Unfortunately it just doesn't seem like the information is complete! I am only using IR-Keytable - I want to move away from LIRC as I get the feeling it will eventually be phased out.

I am able to correctly configure IR-Keytable to recognise RC-5 commands from my remote control and have created a custom key table, so when using "sudo ir-keytable -t" I can see what is being pressed.

This works fine for standard keys such as the alphabet, space, up, down, left, right, Enter, etc. The problem appears with non-keyboard keys such as KEY_GREEN, KEY_RED, KEY_F13, KEY_POWER, etc.

(As a side note, is there a definitive list of all available key names in IR-Keytable?)

"KEY_A" in IR-Keytable relates to "a" in XBMC, "KEY_ENTER" relates to "enter", and so on. Where are these mapped? There must be a file somewhere (or a way of creating one) that allows us to see what translation is happening.

I have managed to figure out some number IDs for keys by following the advice listed here:

http://wiki.xbmc.org/index.php?title=Lis...C_keynames

After enabling debugging, I can view the XBMC log and see the "OnKey" hex codes, which I noted down for each keyname, then converted to decimal using an Excel spreadsheet.

The problem with this method is that for the keynames from IR-Keytable that XBMC doesn't understand, won't show up in this list so I can't even grab a hex code to convert and use as the key id in my XBMC keyboard.xml. For example, if I press the equivalent of "F1", "sudo ir-keytable -t" displays it on screen as "KEY_F1". The XBMC log displays it as "f1" and gives an OnKey value of "f090" which converts to decimal 61584.

I should be able to use "<key id="61584">XBMC function</key>" in my keyboard.xml file instead of "<f1>XBM function</f1>, not that I would want to in this case. Take KEY_F13 as another example. This key doesn't exist on a normal keyboard so I would assume I could do the same as I did for KEY_F1 to find the matching OnKey hex code (and consequently the decimal number I could use in keyboard.xml). Unfortunately XBMC just doesn't even register that a keypress has been made in the log!

It just seems like there is a "gap" in the available information for IR-Keytable. I can get the basic functionality working - navigation, selection, transport controls - but I really need to be able to use all 256 infra-red codes I have available to me for the advanced functionality of my remote.

In theory, I should be able to create my own custom IR-Keytable driver file which contains a list of 256 IR-Keytable specific names and be able to map them into XBMC via the "keyboard.xml" file in my .xbmc/userdata/keymaps folder.

The question that nobody seems able to answer so far is this: How do IR-Keytable key names relate to XBMC? There must be a file somewhere that can translate between them. As far as I'm aware, Lircmap.xml used to do this for older versions of XBMC, so what do we use for XBMCbuntu?

I know this is a long post, so just to summarise, I can get my IR remote commands recognised for standard keys and these do work in XBMC. I'm just failing at the invisible bridge between IR-Keytable and XBMC.

Thanks for reading! I hope someone has an idea of how this should work!
Reply
It's explained in the first post of this thread. Basically, you need to look for your remote keymap in `/etc/rc_keymaps/`.

The whole in-kernel LIRC works like this: the remote sends a scancode, the kernel catches it, it then parses the needed file in /etc/rc_keymaps/ to find out what scancode is supposed to represent what button. Then it submits the emulated keyboard event to the /dev/input system. All other applications bind to the /dev/input system and wait for keyboard events from there, that includes XBMC. Since the events are regular keyboard presses, the XMBC-specific bindings are controlled via Keyboard.xml.

Your workflow should be to edit the file in /etc/rc_keymaps so that every button is mapped to an actual keyboard key. Ideally, you shouldn't touch XBMC configuration at all, and just adapt the keymap to what is default in XMBC. Only once everything is set to a real keyboard key you can additionally tweak XBMC bindings to your liking (by using the actual keyboard key names, not some codes).
Reply
To add to that, the legitimate key names are in input.h in the kernel source code, which you can see at

Code:
less /usr/src/linux-headers-$(uname -r)/include/linux/input.h
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
(2013-05-14, 18:15)GreatEmerald Wrote: It's explained in the first post of this thread. Basically, you need to look for your remote keymap in `/etc/rc_keymaps/`.

The whole in-kernel LIRC works like this: the remote sends a scancode, the kernel catches it, it then parses the needed file in /etc/rc_keymaps/ to find out what scancode is supposed to represent what button. Then it submits the emulated keyboard event to the /dev/input system. All other applications bind to the /dev/input system and wait for keyboard events from there, that includes XBMC. Since the events are regular keyboard presses, the XMBC-specific bindings are controlled via Keyboard.xml.

Your workflow should be to edit the file in /etc/rc_keymaps so that every button is mapped to an actual keyboard key. Ideally, you shouldn't touch XBMC configuration at all, and just adapt the keymap to what is default in XMBC. Only once everything is set to a real keyboard key you can additionally tweak XBMC bindings to your liking (by using the actual keyboard key names, not some codes).

But are you limited to whatever amount of scancodes are in the original keymap files? For example I copied the imon_mce keymap file to /etc/rc_keymaps and then edited to get it working properly. I have full functionality of standard MCE buttons. Wink

However if I want to add new custom buttons I have to use one of the existing unused MCE buttons in the imon_mce keymap file. For example I was able to change KEY_RED to be KEY_O instead and now the red button brings up the diagnostic info.

However it seems you cannot add in your own new scancodes to the keymap file? For example if I teach my Harmony remote control the keyboard command Ctrl+Alt+1 if I run irkeytable -t it does show a scancode for this, I tried adding this new scancode in to the keymap file and assigning a keyboard button to it and then ensuring in keyboard.xml that, that keyboard button would do the XBMC function I wanted. However it does not work.

So once I have used up all the spare MCE buttons like Red, Green, Yellow etc then what ?

I wrote about it all here in much more detail.

Cheers
Reply
Hi,
my htpc has an odd IR receiver that is seen as keyboard and mouse from Linux.
The remore is a rc6.
I know that xbmcbuntu works, but I cannot make it work in my Lubuntu distro.
Is there anyone who has proper .xbmc/userdata/keymap files for that?

Linux sees the IR receiver as
[ 2.365142] input: HOLTEK as /devices/pci0000:00/0000:00:13.0/usb5/5-2/5-2:1.0/input/input2
[ 2.365287] hid-generic 0003:1241:E000.0001: input,hidraw0: USB HID v1.10 Keyboard [HOLTEK] on usb-0000:00:13.0-2/input0
[ 2.394710] input: HOLTEK as /devices/pci0000:00/0000:00:13.0/usb5/5-2/5-2:1.1/input/input3
[ 2.395211] hid-generic 0003:1241:E000.0002: input,hiddev0,hidraw1: USB HID v1.10 Mouse [HOLTEK] on usb-0000:00:13.0-2/input1
Reply
Claudio.Sjo, did you solve your question? I have same IR and remote, need to configure it under openelec.
Reply
(2013-06-06, 12:52)puzzler Wrote: Claudio.Sjo, did you solve your question? I have same IR and remote, need to configure it under openelec.

Hi,
I've hacked the Generic HID driver, by fixing a faulty approach for detecting devices.
You can fetch it from here
HID driver
It works very well on my system, once I fully removed lirc.
Please let me know your experience.

BR,
Claudio
Reply
Claudio.Sjo, thanks for the reply. I'm not an expert at linux, so could you please describe step-by-step how to do it?
Reply
(2013-06-07, 15:24)puzzler Wrote: Claudio.Sjo, thanks for the reply. I'm not an expert at linux, so could you please describe step-by-step how to do it?

Hi,
I'm going to try helping you.
First of all, the thread where I got the driver that I hacked:
http://forum.xbmc.org/showthread.php?tid=88560
then the page in french that explains how to install such a driver
http://doc.ubuntu-fr.org/tutoriel/hid

Let's talk about compiling and installing.
You need the proper toolkit in your Ubuntu Linux, that is make, gcc and g++
You can install the missing tools by using the command
$ sudo apt-get install

Unpack the source code in a directory and give the commands
$ make clean
$ make
if successfull, this will produce the driver, otherwise you need some other tools to be installed
Let say that it was OK, now you have compiled the driver.
You can test it by giving
$ ./hid_mapper
and the driver will complain that it must be run as root

It's time now to test it seriously, give
$ sudo ./hid_mapper --list-devices
and this time the driver will provide you a list of HID devices, where you will find the one provided by HDPLEX, the name is HOLTEK, the manufacturer is 1241 and the product is e000
You can test your remote by giving
$ sudo ./hid_mapper --learn --manufacturer 1241 --product e000
and then pressing the keys on your remote you will be able to get the values on the screen.

Please verify that the values that you get are exactly the same as I wrote in the lenovo-rc6.map file, otherwise edit that file and fix it.
The editor is "nano"


So far so good, now it's time to install it.
You need to create a directory for the data file
$ sudo mkdir /usr/local/etc/hid_mapper
copy the datafile
$ sudo cp lenovo-rc6.map /usr/local/etc/hid_mapper/remote.map
install the driver
$ sudo cp hid_mapper /usr/local/bin

---- The driver launcher ---
If you use Lubuntu, install the driver launcher
$ sudo cp 10-HID-REMOTE.rules /etc/udev/rules.d

If you are not using Lubuntu:
Lubuntu comes with uinput module already compiled in the kernel, this is not valid with all distros.
If you have uinput compiled as a module, you need to use the file 10-HID-REMOTE.rules described in section 2.3 of the document
http://doc.ubuntu-fr.org/tutoriel/hid
It forces loading uinput module before the driver.

--- Get rid of X11 side effects

create a rule for avoiding X11 to use the remote
the editor is "nano", use it in this way
$ sudo nano /usr/share/X11/xorg.conf.d/50-HID-blacklist.conf
and write the following inside that file

Code:
Section "InputClass"
Identifier "HID blacklist"
MatchProduct "HOLTEK"
Option "Ignore" "on"
EndSection

press Ctrl-O to write the file and Ctrl-X to exit

Reboot the HTPC and it shall work.
Reply
Hint: to get basic compiling tools on ubuntu and derivatives
Code:
sudo apt-get install build-essential
. This will get you make, gcc and all the other compiling goodness.
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
Thanks guys, I got the idea. Now need to find a way to fix it on openelec.
Reply
Hi,

I'm planning on installing XBMC's version of Ubuntu on my to-build HTPC. Here's the list of the parts of my build.

PCPartPicker part list / Price breakdown by merchant / Benchmarks

CPU: Intel Celeron G1610 2.6GHz Dual-Core Processor ($45.40 @ DirectCanada)
Motherboard: ASRock H77M Micro ATX LGA1155 Motherboard ($87.05 @ Newegg Canada)
Memory: G.Skill 4GB (2 x 2GB) DDR3-1600 Memory ($46.83 @ Newegg Canada)
Storage: A-Data Premier Pro SP600 64GB 2.5" Solid State Disk ($78.32 @ TigerDirect Canada)
Case: nMEDIAPC HTPC 1000B HTPC Case ($74.99 @ NCIX)
Power Supply: SeaSonic S12II 380W 80 PLUS Bronze Certified ATX12V Power Supply ($64.88 @ Newegg Canada)
Total: $397.47
(Prices include shipping, taxes, and discounts when available.)
(Generated by PCPartPicker 2013-08-04 18:06 EDT-0400)

If I want to use my Harmony 650 remote to control my HTPC and to turn it on from S5 state and to turn it back to S5 state, which IR receiver should I be looking for? I was reading the first few posts of this guide and the autor mentinoned to pick a receiver that would work easily with Linux regarding the drivers and everything.

Quote: All I can do if that if you are still planning to buy an IR receiver, make sure it is compatible with Linux out-of-the-box, meaning that the driver should be included in the vanilla Linux kernel. This will make life a lot easier for you.

How can I know if a receiver is compatible with Linux out of the box? Are this and this receivers compatibles with Linux (XBMC Ubuntu)? Otherwise, which ones are?

Does this quote mean that the Linux drivers for the receiver should ideally be available or the ones for the CIR header on the motherboard should ideally be available on Linux?

Also, to power my HTPC from S5 state, is a USB IR receiver able to do so or if I should instead buy a CIR IR receiver (I have a CIR header on my ASRock motherboard) as a USB receiver wouldn't allow me to do so?

I have a CIR header on my ASRock motherboard; H77M, but the only CIR drivers for Linux I found on ASRock website are the ones for the ION. Do you think they would work nonetheless with the ASRock H77M motherboard?

Thanks in advance,

Blaccko
Reply
>I have a CIR header on my ASRock motherboard

Good luck getting that to work. I think it's not a matter which drivers you have, but to get the whole thing to work in a way that's acceptable. With the Lirc way the receiver doesn't receive signals from more than 1,5 meters (~4,8 feet) away. With the other way it seems sluggish as hell and I can't get all keys to work even when following this guide. From my experience I'd rather suggest getting a third party IR.
Reply
  • 1
  • 6
  • 7
  • 8(current)
  • 9
  • 10
  • 16

Logout Mark Read Team Forum Stats Members Help
How to get a seamless remote experience9