What I don’t understand is why nobody else has come up with this and posted it.
MythTV has been both a bane and a joy over the years, the main bane being getting the remote to work properly. The most annoying and recurring symptom is that most of the keys work, but for some reason, the most important, the “OK” key never does.
The latest kernel now has ir keymaps built in, unfortunately this means that my carefully crafted LIRC configuration for my Hauppuage remote no longer works, and the default keymap settings are as useless as ever, Basically, the 1-9 keys, volume controls, up, down, left and right work, but nothing else.
There must be some well hidden documentation about this somewhere, but after much use of Google and reading webpages, I came to the conclusion that to get the best results without using LIRC as a “bridge” I would need to configure my remote as a keyboard.
To do this, I basically ignored all of the internet posts and guides, apart from the ones that gave me the clues to where the keymap files were kept.
First I installed the ir-keytable package from the repositories.
This also installs a selection of ir keymaps in /lib/udev/rc_keymaps
Using the ir-keytable, command, you can find out which drivers are in use and which keymaps they use.
on my system, it returns:
Found /sys/class/rc/rc1/ (/dev/input/event7) with:
Driver (null), table rc-dib0700-rc5
Supported protocols: NEC RC-5 RC-6
Enabled protocols: RC-5
I started by looking at the relevant keymap (dib0700_rc5) in /lib/udev/rc_keymaps, and tested the remote to see what buttons actually worked.
Then I ran ir-keytable -t > ~/devtest.txt, pressed every key on the remote in sequence from left to right descending in rows. This gave me a text file with the scan codes and their key attributes.
I then saved a copy of the dib0700_rc5 keymap, and edited it.
The first entry that I tried changing was KEY_OK.
I changed this to KEY_ENTER, rebooted, and lo! The OK key worked! I could now select items in the menus!
So basically, I edited the dib0700_rc5 keymap so that every key corresponds with a key on the keyboard, then going through the key setup in MythTV’s frontend creating links where necessary.
Unfortunately, there are a lot of keys already mapped to functions in MythTV, so this last bit was a little hit and miss, as some symbols or combinations such as CTRL+P don’t seem to work, but finally I can use every key on my Hauppuage remote. I have an MCE remote as well, but I haven’t bothered to do that one yet.
My Keymap is here
Yes I know that using devinput with LIRC as a bridge is more elegant for applications that support LIRC, but I only use a remote with MythTV, and the LIRC solution seems just too convoluted and unreliable to be worthwhile, too many links in the chain.
Note: you need to cold boot, i.e.shut down the PC and then restart it, for the new keymap to be read. I found that the remote would not work after a warm reboot, not sure why.
This is what I get:
ir-keytable
/sys/class/rc/: No such file or directory
I tried
ir-keytable -t -d /dev/input/event6
Testing events. Please, press CTRL-C to abort.
Nothing happens when I press keys.
I tried
ir-keytable –read
/sys/class/rc/: No such file or directory
Any ideas would be appreciated.
Which distro? ( I am running Mythbuntu 11.10)
What remote are you using?
It looks like it is not being recognised.
There could be several reasons for that, from the kernel not having LIRC compiled in to the remote not being detected.
I am using 11.1 and Snapstream Firefly Remote.
ir-keytable –version
IR keytable control version 0.8.5
I was using the remote up until I replaced my backend computer and decided to update to 11.1. It is a RF remote that uses a USB receiver. The receiver is detected when I lsusb.Is there a way to determine if LIRC is compiled?
Sorry to take so long replying.
LIRC is in kernel 3+ by default, I think.
It works fine for me in Mythbuntu 11.10, but I use the Hauppuage remote,. I also have an MCE remote which works.
not much use to you, I know, sorry.
Thanks!
Apparently, you need to make sure that the following kernel modules are installed.
lirc_dev
lirc_atiusb
You can check this with
lsmod | grep lirc
Not having your set up means that I can’t really test it further.
lsmod | grep lirc
and I get
lirc_dev 18700 0
I did a search on lirc_atiusb and found at:
https://bugs.launchpad.net/ubuntu/+source/lirc/+bug/787742
that atilibusb is deprecated and that the userspace driver is preferred.
I have been working on my system and discovered a keymap at:
http://lxr.linux.no/#linux+v3.2.9/drivers/media/rc/keymaps/rc-snapstream-firefly.c
Where do I place the keymap file and what other file/s require changing?
I purchased a Rosewill MCE remote and after using Mythbuntu Control Center to set it up, ir-keytable now works.
The keytable files need to go in /lib/udev/rc_keymaps
I found this which might help.
http://manpages.ubuntu.com/manpages/natty/man1/ir-keytable.1.html
By the way, I don’t think that atilibusb is the same as the atiusb module
So I realized earlier today I had to go to Mythbuntu 11.04 in order to get .25. So I guess I have to go through this remote stuff too? I have an mceusb remote. Some of the buttons were programmed for things like Alt+P, so if I’m reading you correctly, that’s not possible now?
Actually, I was wrong about that, you just need the right syntax.
I think I have a list somewhere, I meant to post it a while back and forgot.
If I can find it I’ll post it.
EDIT:
Actually, IIRC, it was that the modifier need to be uppercase.
Ctrl+Esc doesn’t work
CTRL+Esc does
Example List here:
http://xbmc.exstatic.org/ir_keys.txt
Thanks. So, to be clear on the steps…when I move to 11.04, do I need to uninstall lirc and install ir-keytable instead and then follow your steps?
I need more coffee… I upgraded to 11.04 last night and when MythTV .24-fixes came back up, my remote was working just fine. All the buttons still did what they were expected to. Did I read something wrong or do you think my lirc was programmed differently all along? Colour me confused…
I only hit problems with LIRC when I got to 11.10, I think.
It might depend on the Kernel version.
10.10 to 11.10 was the first time I had any upgrading issues, ended up having to do a fresh install.
Probably serves me right for skipping a version.
After much trawling and reddened eyes I managaed to discover taht you can do an instant reload of your new keytable with:
`sudo ir-keytable -vc -w /lib/udev/rc_keymaps/[your_New_Keytable]`
This should save people a bit more pain.
A minority of IR remotes actually pretend to be a USB HID keyboard or keyboard + mouse. The VRC-1100 (prod/vend 05a4:9881) is a (really affordable!) example. In that case, /sys/class/rc won’t exist, or will be empty because the IR core doesn’t think you have any IR remotes plugged in. Thus, you will search in vain for help and no one will understand why none of this advice about IR keytables works for you.
I just did this on Ubuntu 15.04 and I will NEVER go back. With LIRC we were getting 2-3 second delay on each keypress. Now we can scroll through MythTV screens faster than we can read. Amazing.
Glad to be of help 🙂
I know this is an old thread but still this is more use than the Mythbuntu Wiki on how to set up Hauppauge remote. I run Mytbuntu 0.28 & Remote was clunky & horrible to use. I took the plunge and removed/purged LIRC then followed your guide. All worked great with this method apart from ForwardFast and Rewind which produced a “no entry” sign on the screen when using your dib0700-rc5. After lots of googling I discovered that on my Hauppauge Nova T Remote, FF key 0x1e34 is KEY_DOT & Rewind is 0x1e32 KEY_COMMA. Which makes no sense but does the job …..
Also, varying the Delay/Repeat for volume & arrows made no difference, but the Keyboard Settings Manager in Mythbuntu does work. Note that I couldn’t find any combination of settings that make both typing and Remote Control work optimally so compromise is necessary.
Oh & you’ve occasionally used _ instead of – in a few commands (eg. Then I ran ir_keytable..)
Thanks again – you saved me lots of time.
Glad it helped.
I no longer use MythTV as a frontend (since about 2 years ago), I use Kodi with a MythTVbackend, and I use a TBS 6280 dual HDTV tuner/
Thank you immensely, FRASER.
I’ve been googling around furiously since updating Ubuntu to 18.04 and getting rid of LIRC and trying to use /dev/input per the mythbuntu wiki article on HID remotes. It all got working easily enough but I kept having repeat button presses and using ir-keytable’s delay and period options did nothing.
Finally came across your mention of changing the keyboard repeat rate (within GNOME’s “Universal Access” settings) and now i’m done pulling my hair out
Thanks again
Amazing that this blog post is still useful after 7 years…..!