•   
  • 1
  • 9
  • 10
  • 11(current)
  • 12
  • 13
  • 16
  •   
How to get a seamless remote experience
I followed the instructions to use the in kernel lirc.

ir-keytable -t works as expected and translates my keypresses to keyboard commands:

Code:
# ir-keytable -t                                                                                                                              :(
Testing events. Please, press CTRL-C to abort.
1424458324.268195: event type EV_MSC(0x04): scancode = 0x82
1424458324.268195: event type EV_KEY(0x01) key_down: KEY_RIGHT(0x0001)
1424458324.268195: event type EV_SYN(0x00).
1424458324.268207: event type EV_MSC(0x04): scancode = 0x82
1424458324.268207: event type EV_SYN(0x00).
1424458324.520165: event type EV_KEY(0x01) key_up: KEY_RIGHT(0x0001)
1424458324.520165: event type EV_SYN(0x00).
1424458325.076174: event type EV_MSC(0x04): scancode = 0x90
1424458325.076174: event type EV_KEY(0x01) key_down: KEY_LEFT(0x0001)
1424458325.076174: event type EV_SYN(0x00).
1424458325.076198: event type EV_MSC(0x04): scancode = 0x90
1424458325.076198: event type EV_SYN(0x00).
1424458325.328159: event type EV_KEY(0x01) key_up: KEY_LEFT(0x0001)
1424458325.328159: event type EV_SYN(0x00).

But Kodi does not react to them! Am I missing a step here? If I stop Kodi I can use my IR-remote to enter numbers in the console, so it works as it should, but why does kodi not find it?

Some more info:
Code:
# ir-keytable
Found /sys/class/rc/rc0/ (/dev/input/event2) with:
    Driver saa716x, table rc-tbs-nec
    Supported protocols: NEC RC-5 RC-6 JVC SONY LIRC other
    Enabled protocols: NEC RC-5 RC-6 JVC SONY LIRC other
    Name: saa716x IR (TurboSight TBS 6618)
    bus: 1, vendor/product: 6618:0001, version: 0x0001
    Repeat delay = 500 ms, repeat period = 125 ms

Code:
# ls -la /dev/input/
insgesamt 9584
drwxr-xr-x 2 root root     120 Feb 20 19:27 by-id
drwxr-xr-x 2 root root     140 Feb 20 19:27 by-path
-rw------- 1 root root 9814016 Feb 20 19:47 core
crw-r----- 1 root root  13, 64 Feb 20 19:27 event0
crw-r----- 1 root root  13, 65 Feb 20 19:27 event1
crw-r----- 1 root root  13, 74 Feb 20 19:27 event10
crw-r----- 1 root root  13, 75 Feb 20 19:27 event11
crw-r----- 1 root root  13, 76 Feb 20 19:27 event12
crw-r----- 1 root root  13, 77 Feb 20 19:27 event13
crw-r----- 1 root root  13, 78 Feb 20 19:27 event14
crw-r----- 1 root root  13, 79 Feb 20 19:27 event15
crw-r----- 1 root root  13, 80 Feb 20 19:27 event16
crw-r----- 1 root root  13, 81 Feb 20 19:27 event17
crw-r----- 1 root root  13, 82 Feb 20 19:27 event18
crw-r----- 1 root root  13, 83 Feb 20 19:27 event19
crw-r----- 1 root root  13, 66 Feb 20 19:27 event2
crw-r----- 1 root root  13, 84 Feb 20 19:27 event20
crw-r----- 1 root root  13, 85 Feb 20 19:27 event21
crw-r----- 1 root root  13, 67 Feb 20 19:27 event3
crw-r----- 1 root root  13, 68 Feb 20 19:27 event4
crw-r----- 1 root root  13, 69 Feb 20 19:27 event5
crw-r----- 1 root root  13, 70 Feb 20 19:27 event6
crw-r----- 1 root root  13, 71 Feb 20 19:27 event7
crw-r----- 1 root root  13, 72 Feb 20 19:27 event8
crw-r----- 1 root root  13, 73 Feb 20 19:27 event9
crw-r--r-- 1 root root  13,  0 Feb 20 19:27 js0
crw-r--r-- 1 root root  13,  1 Feb 20 19:27 js1
crw-r--r-- 1 root root  13,  2 Feb 20 19:27 js2
crw-r--r-- 1 root root  13,  3 Feb 20 19:27 js3
crw-r----- 1 root root  13, 63 Feb 20 19:27 mice
crw-r----- 1 root root  13, 32 Feb 20 19:27 mouse0
crw-r----- 1 root root  13, 33 Feb 20 19:27 mouse1
lrwxrwxrwx 1 root root       6 Feb 20 19:27 tbs-ir -> event2


# ls -la /dev/input/by-path
insgesamt 0
lrwxrwxrwx 1 root root 10 Feb 20 19:27 pci-0000:00:14.0-usb-0:2:1.2-event-kbd -> ../event21
lrwxrwxrwx 1 root root  9 Feb 20 19:27 pci-0000:00:14.0-usb-0:3:1.0-event-mouse -> ../event4
lrwxrwxrwx 1 root root  9 Feb 20 19:27 pci-0000:00:14.0-usb-0:3:1.0-mouse -> ../mouse1
lrwxrwxrwx 1 root root  9 Feb 20 19:27 pci-0000:00:14.0-usb-0:3:1.1-event -> ../event5
lrwxrwxrwx 1 root root  9 Feb 20 19:27 pci-0000:01:00.0-event-ir -> ../event2

# ls -la /dev/input/by-id
insgesamt 0
lrwxrwxrwx 1 root root  9 Feb 20 19:27 usb-Logitech_USB_Receiver-event-if01 -> ../event5
lrwxrwxrwx 1 root root  9 Feb 20 19:27 usb-Logitech_USB_Receiver-event-mouse -> ../event4
lrwxrwxrwx 1 root root 10 Feb 20 19:27 usb-Logitech_USB_Receiver-if02-event-kbd -> ../event21
lrwxrwxrwx 1 root root  9 Feb 20 19:27 usb-Logitech_USB_Receiver-mouse -> ../mouse1
Reply
Baxh, if you turn on debugging in Kodi do you see anything in the logs?

Have you verified that the keymap in Kodi is set up right as in post #4?

http://forum.kodi.tv/showthread.php?tid=...#pid828177
Reply
When I made a most recent upgrade the arrow keys on my remote stopped working properly. They were suddenly generating multiple keypresses. The rest of the remote keys continued to work fine.

What it seems like is that there's another kernel module that is (mis)handling some of the inputs from the remote.

When I use "ir-keytable -t" and "xev" at the same time, I can see that the direction buttons on the remote are generating events in "xev", but "ir-keytable" doesn't see them.

With the rest of the keys I see both single events in "xev" and the corresponding events in "ir-keytable -t".

Does anybody know what kernel module might be interfering?
Reply
(2015-01-29, 02:27)fbacher Wrote: I have Ubuntu 14.10 and using the kernel IR support, not lirc. I have an mce remote working for a number of navigation keys (left, right, up, down, play, etc.) but I can not get it to work for simple things like KEY_BACKSPACE or KEY_C, which I remapped a few keys to in order to avoid the > 255 problem.

Using ir-keytable -t, I can see that it properly generates KEY_C, or KEY_BACKSPACE, yet kodi does not recognize them.

This is very similar to my problem. Everything was working fine before 14.10, I'm just using a little Apple Remote, and after the upgrade my KEY_PLAYPAUSE and KEY_BACKSPACE no longer worked on the remote. I switched KEY_PLAYPAUSE to KEY_PLAY and it started working again...and KEY_BACKSPACE is, as you say, generated in ir-keytable -t but Kodi doesn't respond to it.

In a somewhat related issue, my whole ir-keytable -w command no longer seems to work (post 14.10 upgrade) from rc.local, although it does still work in Terminal.

Does anyone even know where kodi remaps ir-keytable key presses to kodi commands? For example in my keyboard keymap file I'm able to redefine <up> to VolumeUp during <FullscreenVideo>. So that my apple remote button (defined as KEY_UP) can change the volume while videos are playing. But I haven't the faintest idea how kodi knows to define KEY_UP to <up> in the first place. I know I didn't set that. I'd love to know because I have a feeling I wouldn't have to guess and check anymore how I should define my key presses in my ir-keytable configuration file. I've had to make edits to it in the past when things stopped working as well (for example at one point KEY_MENU no longer worked and I had to redefine it as KEY_BACKSPACE...now of course neither of them work. And then another time KEY_SPACE no longer worked, so I switched it to KEY_PLAYPAUSE. But this is all just guess and check because I don't know how or where kodi is interpreting my ir-keytable definitions).
Reply
(2015-02-28, 22:47)immerc Wrote: Baxh, if you turn on debugging in Kodi do you see anything in the logs?

Have you verified that the keymap in Kodi is set up right as in post #4?

http://forum.kodi.tv/showthread.php?tid=...#pid828177


@imerc I did turn on debugging in Kodi but nothing showed up, the keymap is also setup (I used dedicated lirc before and it worked). I am using a wireless XBOX 360 Controller now (which also didn't work initially, but I created a workaround
Reply
Hi,
I am still relatively new to Kodi, but I ran into the same problems as mentioned above: purged lirc (ubuntu/apt-get) and used a custom keymapping with some keys from the IR remote working as soon as I reload the keymap (like KEY_PLAYPAUSE, KEY_FASTFORWARD) and some not (like KEY_0-KEY_9, KEY_F, KEY_POWER and KEY_BACKSPACE) - even though they are working just fine outside of Kodi (in a terminal for example).
I also found some kind of clue as to where the problem is: If I killall -9 kodi the keys still won't work, but If I leave Kodi normally and (using the default Ubuntu login screen) log in again, everything works just fine (every key behaves just like it came from an ordinary keyboard).
I am not using any custom kodi keymap.xml except one:
Code:
<f>ActivateWindow(Favourites)</f>
in the global/keyboard section.

I am using Ubuntu 14.10 and enabled autologin with a pure Kodi session (no gnome).

Since I've already used the better part of the evening trying to set this damn IR remote up, I am not really motivated into doing more "research" into that, at least for today and probably the rest of the week, but maybe someone here could.
Reply
Well, seems like this is a timing issue. Not sure, wether Xorg or the rc.local script is timed wrong here, but anyway I fixed the issue by creating a custom udev rule for my ir-receiver:

in (a new file) /etc/udev/rules.d/99-ir.rules
Code:
SUBSYSTEMS=="input" ATTRS{name}=="em28xx IR (em28178 #0)" SYMLINK+="pctv-remote" RUN+="/usr/bin/ir-keytable -d /dev/pctv-remote -c -w /etc/rc_keymaps/mini-remote"

which adds a default device /dev/pctv-remote for my IR receiver and executes ir-keytable so to make sure the new rules are loaded as soon as the device turns up.

if you want to try it too, you would have to find out the attributes/vendor information for your IR receiver and probably read a bit about udev rules. then just use the RUN+="..." part from above.

Just to recap: don't put your ir-keytable command in rc.local
Reply
Teedubb, the day has arrived that I want to try this. Had to unplug USB last week and couldnt find the port it was in. I opened the file you mention using "sudo nano /etc/udev/rules.d/99-disable-wakeup.rules"
It opens a file that is completely empty. in fact it mentions new file so either I dont have this yet or it is in a different location. I am running the kodibuntu installation, so no seperate linux with kodi install, plain kodibuntu installed.

screenshot:
Image

Which parts of your file do I need to get it to work? Do I need stuff like
Code:
#enable
#cec adapter

or just
Code:
#harmony/phillips ir
SUBSYSTEM=="usb", ATTRS{idVendor}=="0471", ATTRS{idProduct}=="2093", RUN+="/bin/sh -c 'echo enabled > /sys$env{DEVPATH}/../power/wakeup'"
I also noticed the [/code], used to try some Html back in '95 or near so shoud I have

Code:
[code]
#harmony/phillips ir
SUBSYSTEM=="usb", ATTRS{idVendor}=="0471", ATTRS{idProduct}=="2093", RUN+="/bin/sh -c 'echo enabled > /sys$env{DEVPATH}/../power/wakeup'"
[/code]

and then with the input for my remote?



(2015-02-09, 13:37)teeedubb Wrote: kees667 Glad you found that 3+ year old post useful Smile

There is a better way to enable wakeup on a device - using udev. It will enable/disable wakeup even if you change the usb port the device is connect to (something the guide you used will not do).

/etc/udev/rules.d/99-disable-wakeup.rules
Code:
#disable devices
#ipazz keyboard
#SUBSYSTEM=="usb", ATTRS{idVendor}=="0c45", ATTRS{idProduct}=="7000", RUN+="/bin/sh -c 'echo disabled > /sys$env{DEVPATH}/../power/wakeup'"
#logitect k400r
SUBSYSTEM=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c52b", RUN+="/bin/sh -c 'echo disabled > /sys$env{DEVPATH}/../power/wakeup'"
#usb bt
SUBSYSTEM=="usb", ATTRS{idVendor}=="0cf3", ATTRS{idProduct}=="3005", RUN+="/bin/sh -c 'echo disabled > /sys$env{DEVPATH}/../power/wakeup'"
#xbox360
SUBSYSTEM=="usb", ATTRS{idVendor}=="045e", ATTRS{idProduct}=="0291", RUN+="/bin/sh -c 'echo disabled > /sys$env{DEVPATH}/../power/wakeup'"


#enable
#cec adapter
SUBSYSTEM=="usb", ATTRS{idVendor}=="1d6b", ATTRS{idProduct}=="0003", RUN+="/bin/sh -c 'echo enabled > /sys$env{DEVPATH}/../power/wakeup'"
#harmony/phillips ir
SUBSYSTEM=="usb", ATTRS{idVendor}=="0471", ATTRS{idProduct}=="2093", RUN+="/bin/sh -c 'echo enabled > /sys$env{DEVPATH}/../power/wakeup'"

You'll need to configure it for your system/devices, change the idvendor and idproduct string to match the output of lsusb, eg the output for my phillips ir receiver:
Code:
Bus 001 Device 005: ID 0471:2093 Philips (or NXP)
Reply
New to Linux
Kodi 14.1 Helix Ubuntu 14.10,Intel Celeron NUC
Have Bluetooth keyboard that does not wake up properly, have checked cat /proc/acpi/wakeup and lspci, but can't work out which device code applies to the bluetooth keyboard if any
XHC1, PXSX and PWRB are enabled
Reply
kees667 The file doesnt exist by default, its user generated. Any thing with a # in front is a comment so it is ignored, the comments are there to be able identify devices easily. You dont need code tags either.
Reply
(2015-03-07, 01:57)teeedubb Wrote: kees667 The file doesnt exist by default, its user generated. Any thing with a # in front is a comment so it is ignored, the comments are there to be able identify devices easily. You dont need code tags either.

Thanks. Will give it a try then!
Reply
Hi!

I installed OpenElec on an Asus Chromebox yesterday. Kodi works great with a keyboard connected. Then I connected a remote control as the picture shows:
Image
Nothing happens when I press the keys.

I think it is a HP MCE Remote.
After connecting it I killed the lircd as the guide propose.

Running lsusb output this:
Code:
HTPC:~ # lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 1267:0103 Logic3 / SpectraVideo plc G-720 Keyboard
Bus 001 Device 004: ID 0461:4d03 Primax Electronics, Ltd Kensington Mouse-in-a-box
Bus 001 Device 006: ID 04ca:3007 Lite-On Technology Corp.
Bus 001 Device 002: ID 1784:0006 TopSeed Technology Corp. eHome Infrared Transceiver
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Then I start ir-keytable -c -p all -t and start pressing keys on the remote. Output is
Code:
ir-keytable -c -p all -t
Old keytable cleared
Protocols changed to NEC RC-5 RC-6 JVC SONY SANYO LIRC RC-5-SZ SHARP XMP other
Testing events. Please, press CTRL-C to abort.
1425741144.207354: event type EV_MSC(0x04): scancode = 0x800f0
1425741144.207354: event type EV_SYN(0x00).
1425741154.639309: event type EV_MSC(0x04): scancode = 0x800f84
1425741154.639309: event type EV_SYN(0x00).
This is after pressing many different keys. I have new batteries in the remote. The small led blinks on the remote when I press keys. The small led on the receiver blinks when I press keys. Still ir-keytable does not recognize when I press the key. It only recognizes some keys and not every time.

What have I missed to do?

Regards,
Niklas
Reply
Does this help? http://forum.kodi.tv/showthread.php?tid=182065
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
That was a bit interesting reading and it might answer the question why it did not work.
I have the same receiver as fbacher in that thread and the solution in the thread was to use USB2 if I understood it correct. What I can read is that my ASUS ChromeBox only has USB3 connections. Sad
But, this is the output from lsusb:
Code:
HTPC:~ # lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 1267:0103 Logic3 / SpectraVideo plc G-720 Keyboard
Bus 001 Device 003: ID 0461:4d03 Primax Electronics, Ltd Kensington Mouse-in-a-box
Bus 001 Device 006: ID 04ca:3007 Lite-On Technology Corp.
Bus 001 Device 005: ID 1784:0006 TopSeed Technology Corp. eHome Infrared Transceiver
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
I don't know how I can interpret the last row. Does it mean that it uses USB2?

Still, it does not work. :-(
Reply
(2015-03-07, 23:38)nilaz Wrote: That was a bit interesting reading and it might answer the question why it did not work.
I have the same receiver as fbacher in that thread and the solution in the thread was to use USB2 if I understood it correct. What I can read is that my ASUS ChromeBox only has USB3 connections. Sad
But, this is the output from lsusb:
Code:
HTPC:~ # lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 1267:0103 Logic3 / SpectraVideo plc G-720 Keyboard
Bus 001 Device 003: ID 0461:4d03 Primax Electronics, Ltd Kensington Mouse-in-a-box
Bus 001 Device 006: ID 04ca:3007 Lite-On Technology Corp.
Bus 001 Device 005: ID 1784:0006 TopSeed Technology Corp. eHome Infrared Transceiver
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
I don't know how I can interpret the last row. Does it mean that it uses USB2?

Still, it does not work. :-(

As per the wiki, ALL topseed receivers do not work
Reply
  •   
  • 1
  • 9
  • 10
  • 11(current)
  • 12
  • 13
  • 16
  •   



Logout Mark Read Team Forum Stats Members Help
How to get a seamless remote experience9
This forum uses Lukasz Tkacz MyBB addons.