Update on TwinHan remote for Mythbuntu 8.10
I’ve just upgraded my HTPC to the new Mythbuntu 8.10. I must say that setup is a helluva lot easier than previous versions of Myth although I found my ATI card did not work at all and I had to exhume an ancient nVidia card from my parts box. And I had to hack the xorg.conf file to make the TV output work so the setup is not 100% seamless.
Anyway, onto the odd device, my TwinHan remote control. Setting this up is much easier under Mythbuntu 8.10. Here’s the step-by-step:
Step 1 – Configure LIRC
Plug the IR receiver into a USB port. Wait a moment for it to register and then type the following command:
ls /dev/input/by-id
It should produce output like this. This step is just to verify the correct device name for the remote.
usb-Twinhan_Tech_Remote_Control_1111111-event-kbd usb-Twinhan_Tech_Remote_Control_1111111-event-mouse usb-Twinhan_Tech_Remote_Control_1111111-mouse
Now edit the file /etc/lirc/hardware.conf and enter values for REMOTE_DRIVER and REMOTE_DEVICE:
REMOTE_DRIVER="devinput" REMOTE_DEVICE="/dev/input/by-id/usb-Twinhan_Tech_Remote_Control_1111111-event-kbd"
Due to a bug in this version of Ubuntu, you will also need to run the following command:
lshal | grep input.product
It will spit out a few lines of text. Verify that it produces a line like this:
input.product = 'Twinhan Tech Remote Control' (string)
Then edit the file /usr/share/hal/fdi/preprobe/20thirdparty/lirc.fdi and make it read like so:
<?xml version="1.0" encoding="UTF-8"?>
<deviceinfo version="0.2">
<device>
<match key="info.product" contains_ncase="Twinhan Tech Remote Control">
<merge key="info.ignore" type="bool">true</merge>
</match>
</device>
</deviceinfo>
Finally, download this file:
and put it in /etc/lirc/
At this stage, I had to reboot so that everything loaded properly. Once you have rebooted, you can test the remote control by typing:
irw
Now every time you press a key, you should see it printed on the screen. Press Ctrl-C when you are done.
STEP 2 – Configure MythTV commands
We are getting closer now. The next step is to set up a file called ~/.lirc/mythtv which contains the mappings between the keys on the remote and the functions in MythTV. Once again, I have already prepared this file which you can download here:
Rename this file to mythtv and move it to ~/.lirc/ Once that is done, restart MythTV. Here are the key mappings you will end up with:
| Key | Function |
|---|---|
| REC | Record |
| TELETEXT | OSD |
| RECALL | MENU |
| PREVIEW | INFO |
| REW/FFWD | Forward/backward in MythMusic |
| CAPTURE | Previous playlist item in MythMusic |
| RECORDLIST | Next playlist item in MythMusic |
STEP 3 – Configure MPlayer
The final step is to configure the mapping between the remote and the commands in MPlayer. Since MPlayer is a separate program, it needs to be configured separately to MythTV. To configure it, we need another lircrc file but this time is has to be called ~/.lirc/mplayer. Download it from here:
Rename it to mplayer and put it in ~/.lirc/ and that should be that! Here are the key mappings for MPlayer:
| Key | Function |
|---|---|
| MUTE | Mute |
| VOL+/- | Adjust volume |
| CH+/- | Skip fwd/back 60 seconds |
| REW/FFWD | Skip fwd/back 10 seconds |
| PREVIEW | Show/hide subtitles |
| TELETEXT | Show/hide OSD |
| TAB | Cycle through audio tracks |
If you do not like the key mappings I have chosen, you may edit the files in ~/.lirc. The format should be fairly easy to follow.

thank u man , see the config of lircrc-mythtv ,its like this
begin
button = VOL+
prog = mplayer
config = volume 1
end
begin
button = VOL-
prog = mplayer
config = volume -1
is it normal??
end
Yes, it means that when the user presses the “VOL+” button, it adds 1 to the volume and when the user presses the “VOL-” button, it adds -1 to the volume. These files are copied off my own mythtv box and they work for this type of remote control.
ok thank you man for every update , you are NO.1 m8
I followed your docs. All seems right, but when I fire up irw I’ve got this message:
Lirc: command not found
Sounds like lirc is not installed on your box. Try sudo apt-get install lirc.
Useful page, thanks. You have a typo though, your lircrc-mythtv link above points to lircrc-mplayer as well.
Thanks for spotting that Glyn, I’ve fixed it now.
hi adam
first i want to thank you for this blog
secondly :
i have usb twinhan starbox 702x and i have same remote control that u write about it but the irc is not usb like pci it is inside the device
is that setting same because when I followed your docs. All seems right
but when i try type remote inside editor test no input view and no response
is there slove for this
yhank u soo match
http://www.twinhan.com/product_AD-SB200.asp
and sorry about my language
If I understand you correctly, the USB device nodes appear but when you run irw, there is no response from the remote control.
If this is the case, I would double-check the device class name in /dev/input/by-id and make sure it matches the name you set up in /etc/lirc/hardware.conf.
mr. adam see my output
command:
ls /dev/input/by-path
pci-0000:00:1d.0-usb-0:1:1.0-event-kbd
pci-5-4–event-ir
pci-0000:00:1d.0-usb-0:1:1.1-
platform-pcspkr-event-spkr
pci-0000:00:1d.0-usb-0:1:1.1-event-
you can see pci-5-4–event-ir
this is my ir for my dvb-s
after that i make my hardware.conf:
# /etc/lirc/hardware.conf
#
#Chosen Remote Control
REMOTE=”None”
REMOTE_MODULES=”"
REMOTE_DRIVER=”devinput”
REMOTE_DEVICE=”/dev/input/by-path/pci-5-4–event-ir”
REMOTE_LIRCD_CONF=”"
REMOTE_LIRCD_ARGS=”"
#Chosen IR Transmitter
TRANSMITTER=”None”
TRANSMITTER_MODULES=”"
TRANSMITTER_DRIVER=”"
TRANSMITTER_DEVICE=”"
TRANSMITTER_LIRCD_CONF=”"
TRANSMITTER_LIRCD_ARGS=”"
#Enable lircd
START_LIRCD=”false”
#Don’t start lircmd even if there seems to be a good config file
#START_LIRCMD=”false”
#Try to load appropriate kernel modules
LOAD_MODULES=”true”
# Default configuration files for your hardware if any
LIRCMD_CONF=”"
#Forcing noninteractive reconfiguration
#If lirc is to be reconfigured by an external application
#that doesn’t have a debconf frontend available, the noninteractive
#frontend can be invoked and set to parse REMOTE and TRANSMITTER
#It will then populate all other variables without any user input
#If you would like to configure lirc via standard methods, be sure
#to leave this set to “false”
FORCE_NONINTERACTIVE_RECONFIGURATION=”false”
START_LIRCMD=”"
___________________________–
now command
lshal | grep input.product
output:
input.product = ‘IR-receiver inside an USB DVB receiver’ (string)
after that i edit file /usr/share/hal/fdi/preprobe/20thirdparty/lirc.fdi :
true
after that i download file http://www.doctort.org/adam/files/twinhan/lircd.conf
inside /etc/lirc/
when i type irw now thing happing or no error
after that i reboot but no thing happing
thank u mate for listen
hos@ubuntu:~$ sudo /etc/init.d/lirc restart
* Stopping remote control daemon(s): LIRC [ OK ]
* Loading LIRC modules [ OK ]
* Starting remote control daemon(s) : LIRC [ OK ]
adam please try to fix my problem
Can you show me the contents of your file /usr/share/hal/fdi/preprobe/20thirdparty/lirc.fdi – it will help work out the problem.
Dear Adam, Thanks for your post. I’ve got two Twinhan remotes identical to yours in appearance, but they give off different codes on some keys (the two I have aren’t interchangeable). A potential ‘gotcha’, but not related to my problem. My problem is that lirc just doesn’t seem to do anything no matter what I do. The remote behaves (and keeps behaving) as if it is a keyboard (even after following your instructions) in Mythtv and in other apps (running ubuntu 8.10 with mythtv added – working fine except for the remote). I’ve been using xmodmap which sort of did what I wanted by re-mapping the keys, but it is a pain to swap when you want to use the computer (the keyboard must be re-re-mapped). Specifically, how do we stop the Twinhan remote from behaving like a keyboard, and to start behaving like an IR remote? Is there something in mythtv to say we want to use lirc as a higher priority? I can’t find that. Also, do we run lircd or not? I ask because it makes no difference on my machine – I’m wondering if mythtv has its own interpreter – particularly since there’s a file called ~/.lirc/mythtv – how does mythtv know to use that? Ok, I’ve used up my 20 questions. Any advice you can offer will save what is left of my hair.
THANKS—THANKS—THANKS–..¡¡¡¡¡¡¡¡¡
You are my idol, whit the old guide nothing of nothing, but this guide all ok.
Thanks again.
(sorry for my english)
Great guide. Helped me get my remote working.
Just 1 strange thing, all buttons but the vol +/- are working.
Do you have any suggestions what could cause this problem?
Thx for your nice guide.
Thanks so much for this, for the first time ever I have a remote that works with Myth! This actually makes my month long Myth project worthwhile.
Ubuntu 8.10. I followed your instructions and everything matched up until running irw – it gives me an error message “connect: no such file or directory”. The remote is being picked up as a keyboard (i.e. if I press on a number it’s as if I pressed it on my keyboard). Also, I have no .lirc directory nor a /dev/lirc. Don’t we need to install a driver/kernel module? Another thing…when I start or restart lirc (sudo /etc/init.d/lirc start) I do not get any messages. Any help would be appreciated. I don’t plan on using myth, but I do want to use this remote for mplayer as I have my pc connected to my hdtv and use it to watch movies. Thank you.
Progress. After reading many more posts, I added lirc_dev and lirc_imo to /etc/modules. I edited /etc/lirc/hardware.conf (REMOTE_MODULES=”lirc_dev lirc_imon” and START_LIRCD=”true”). Now irw works (and the keys on the remote are generating the matching line int eh conf file). I also have a /dev/lircd (but not a /dev/lirc). And when I run the lirc script, e.g. restart, it displays the status messages. But I still didn’t have the .lirc directory to put mplayer in, so I created one and copied it there. The mapping is not working properly though. I run mplayer and the rc keys are doing something, but not the right thing. Not sure what it’s doing, I think it’s still acting like a keyboard. Hmmm…
Yes! Finally got it to work! :) Needed to use the “old” filename of .lircrc for the mplayer config. Doh. Glad I found an example on an mplayer site. Not sure why you said to call it mplayer and place it in the ~/.lirc directory. Maybe it works that way if Myth is installed?
Thanks for your howto.
I have everything working up to and including the irw (displays sensible things on the screen).
I’m getting a Segmentation Fault when I press a key on the remote with the mythfrontend open.
$ mythfrontend -v all
shows nothing but “Segmentation Fault”. Any ideas what to check?
By the way, if someone has problems with getting irw working, I had to do:
$ sudo modprobe lirc_serial
to load the lirc module.
Works perfectly for Mythbuntu 9.10. Thanks!
…and by Mythbuntu 9.10, I really mean 9.04
hi, my power button works with:
POWER 0×10040
gz doep
any idea why the play button won’t act like my enter button on my keyboard? not sure it is working but in irw i can see the output
i want to use the remote to navagate the interface but i can’t get it to use enter to get to the next menu
how can i figure this remote out i want to use it like this
CH+ up
CH- down
VOL+ right arrow
VOL- left arrow
play as enter
stop as stop i guess
cancel as esc button
that is basically all i can seee me using as my tv will control the volume im just not sure how to get it to do it
Thanks great web site, is there away to use this reomte to shutdown mythtv pc and/or awake pc
There is no way to use it to start up the PC as far as I know but you should be able to use it to shut down the PC by setting up and enabling the SHUTDOWN item in your MythTV menu. This is done using mythtv-setup if I recall correctly.
Thank you! Works splendidly with 9.04.
Thanks so much for this information, worked perfectly!
what about ubuntu 10.4 ??
Well, give it a go on 10.4 and let us know how it went.
Ugh, I had a nice working setup with 9.10 based on your configs, and now a dist-upgrade to lucid has killed it.
Updated the event id, and still irw produces no output at all. A complete mystery.
Can’t seem to get this remote to work at all under lucid, and would love any tips from anyone who has done so.
Similar story here (worked perfectly in 9.10, but broken after upgrade to lucid), though I’ve got a bit further:
Firstly I noticed that the device id has changed from /dev/input/by-id/usb-Twinhan_Tech_Remote_Control_1111111-event-kbd to /dev/input/by-id/usb-Twinhan_Tech_Remote_Control_1111111-event-if00 after changing this in hardware.conf and restarting lirc, irw now displays keystrokes when buttons are pressed on the remote (although with different names eg. “KEY_CHANNELUP” instead of “CH+” and the number keys (0-9) don’t work). Note that the upgrade to lucid has replaced the lircd.conf file with a single line: include “/usr/share/lirc/remotes/devinput/lircd.conf.devinput” (the key definitions are now in the included file, instead of directly in lircd.conf).
So by hacking the lircd.conf.devinput file and changing the names back to the names used in Adam’s original file I can get it working without having to change anything in the myth lirc configs.
That is, all keys are working except the number keys: 0 – 9 (which don’t work in irw either. And I don’t know how to find the code for these.
What is really weird is that the codes in Adam’s original lircd.conf that worked fine in 9.1 don’t work at all in lucid, as the codes have completely changed (eg. CH- was 0x1006d and is now 0×0193). Maybe connected with the fact that the header definition has also changed:
In Adam’s lircd.conf it was:
begin remote
name TwinHan
bits 32
begin codes
…
In the lucid’s /usr/share/lirc/remotes/devinput/lircd.conf.devinput:
begin remote
name devinput
bits 16
eps 30
aeps 100
one 0 0
zero 0 0
pre_data_bits 16
pre_data 0×8001
gap 132799
toggle_bit_mask 0×0
begin codes
…
Any ideas?
any one get it work with lucid??
I’ve got the exact problem with Peter, however I noticed that it was a kernel change that caused the problem. I could boot with an older kernel (3.6.31) with lucid, have the kbd device. the later kernel (3.6.32) would have the if00 device. Unfortunately I now cannot use the nvidia driver with the updates, so I’m now forced to the newest kernel.
Wayne.
Pingback by Tweets that mention Adam Pierce » Update on TwinHan remote for Mythbuntu 8.10 -- Topsy.com — 15 May 2010 @ 11:11 pm
[...] This post was mentioned on Twitter by Tim Gould. Tim Gould said: My #Ubuntu #Lucid upgrade is complete. Far more manual tweaking than I expected, and my usb remote is still fscked: http://is.gd/c8Fo1 [...]
Ok thanks for all your help, I finally got the remote working in lucid except for the number keys like everyone else. I manage to get them with this command:
sudo hexdump -C /dev/input/by-id/usb-Twinhan_Tech_Remote_Control_1111111-event-if00
So my lircd.conf config for this remote (including number keys) is now:
# Twinhan Remote Control
begin remote
name devinput
bits 16
eps 30
aeps 100
one 0 0
zero 0 0
pre_data_bits 16
pre_data 0×8001
gap 132799
toggle_bit_mask 0×0
begin codes
KEY_0 0×0200
KEY_1 0×0201
KEY_2 0×0202
KEY_3 0×0203
KEY_4 0×0204
KEY_5 0×0205
KEY_6 0×0206
KEY_7 0×0207
KEY_8 0×0208
KEY_9 0×0209
KEY_CANCEL 0x00DF
KEY_CHANNELDOWN 0×0193
KEY_CHANNELUP 0×0192
KEY_EPG 0x016D
KEY_FAVORITES 0x016C
KEY_FORWARD 0x009F
KEY_LIST 0x018B
KEY_MUTE 0×0071
KEY_PAUSE 0×0077
KEY_PLAY 0x00CF
KEY_POWER2 0×0164
KEY_PRINT 0x00D2
KEY_PROGRAM 0x016A
KEY_RECORD 0x00A7
KEY_RESTART 0×0198
KEY_REWIND 0x00A8
KEY_SCREEN 0×0177
KEY_STOP 0×0080
KEY_TAB 0x000F
KEY_TEXT 0×0184
KEY_VOLUMEDOWN 0×0072
KEY_VOLUMEUP 0×0073
end codes
end remote
Jean-Francois – you mean that you followed the old steps up?? what is your hardware.conf ??
Yes, I followed the steps in the guide and the help provided by other users like Peter.
Here’s my hardware.conf:
# /etc/lirc/hardware.conf
#
#Chosen Remote Control
REMOTE=”Twinhan Remote Control”
REMOTE_MODULES=”lirc_dev lirc_sir”
REMOTE_DRIVER=”devinput”
#REMOTE_DEVICE=”/dev/input/by-id/usb-Twinhan_Tech_Remote_Control_1111111-event-kbd”
REMOTE_DEVICE=”/dev/input/by-id/usb-Twinhan_Tech_Remote_Control_1111111-event-if00″
REMOTE_SOCKET=”"
REMOTE_LIRCD_CONF=”"
REMOTE_LIRCD_ARGS=”"
#Chosen IR Transmitter
TRANSMITTER=”None”
TRANSMITTER_MODULES=”"
TRANSMITTER_DRIVER=”"
TRANSMITTER_DEVICE=”"
TRANSMITTER_SOCKET=”"
TRANSMITTER_LIRCD_CONF=”"
TRANSMITTER_LIRCD_ARGS=”"
#Enable lircd
START_LIRCD=”true”
#Don’t start lircmd even if there seems to be a good config file
#START_LIRCMD=”false”
#Try to load appropriate kernel modules
LOAD_MODULES=”true”
# Default configuration files for your hardware if any
LIRCMD_CONF=”"
#Forcing noninteractive reconfiguration
#If lirc is to be reconfigured by an external application
#that doesn’t have a debconf frontend available, the noninteractive
#frontend can be invoked and set to parse REMOTE and TRANSMITTER
#It will then populate all other variables without any user input
#If you would like to configure lirc via standard methods, be sure
#to leave this set to “false”
FORCE_NONINTERACTIVE_RECONFIGURATION=”false”
START_LIRCMD=”"
hi
after updating from karmic to lucid i have same problem. even with Jean-Francois fixes i still have no result.
i had to downgrade to 2.6.31-20-generic to get my ir working.
Sadly i cant get my remote working with lucid anymore. Tried the tips from Jean-Francois.
????? neztiti ??? ???? ???????
????? ??? ???? ?? ????? ??????? ????? ?????? ??? ???? ???????
??????? ???????
1- gedit /etc/lirc/hardware.conf
# /etc/lirc/hardware.conf
#
#Chosen Remote Control
REMOTE=”Twinhan Remote Control”
REMOTE_MODULES=”lirc_dev lirc_mceusb”
REMOTE_DRIVER=”devinput”
REMOTE_DEVICE=”/dev/input/by-id/usb-Twinhan_Tech_Remote_Control_1111111-event-if00″
REMOTE_SOCKET=”"
REMOTE_LIRCD_CONF=”"
REMOTE_LIRCD_ARGS=”"
#Chosen IR Transmitter
TRANSMITTER=”None”
TRANSMITTER_MODULES=”"
TRANSMITTER_DRIVER=”"
TRANSMITTER_DEVICE=”"
TRANSMITTER_SOCKET=”"
TRANSMITTER_LIRCD_CONF=”"
TRANSMITTER_LIRCD_ARGS=”"
#Enable lircd
START_LIRCD=”true”
#Don’t start lircmd even if there seems to be a good config file
#START_LIRCMD=”false”
#Try to load appropriate kernel modules
LOAD_MODULES=”true”
# Default configuration files for your hardware if any
LIRCMD_CONF=”"
#Forcing noninteractive reconfiguration
#If lirc is to be reconfigured by an external application
#that doesn’t have a debconf frontend available, the noninteractive
#frontend can be invoked and set to parse REMOTE and TRANSMITTER
#It will then populate all other variables without any user input
#If you would like to configure lirc via standard methods, be sure
#to leave this set to “false”
FORCE_NONINTERACTIVE_RECONFIGURATION=”false”
START_LIRCMD=”"
2- gedit /etc/lirc/lircd.conf
begin remote
name devinput
bits 16
eps 30
aeps 100
one 0 0
zero 0 0
pre_data_bits 16
pre_data 0×8001
gap 132799
toggle_bit_mask 0×0
begin codes
KEY_0 0×0200
KEY_1 0×0201
KEY_2 0×0202
KEY_3 0×0203
KEY_4 0×0204
KEY_5 0×0205
KEY_6 0×0206
KEY_7 0×0207
KEY_8 0×0208
KEY_9 0×0209
KEY_CHANNELDOWN 0×0193
KEY_CHANNELUP 0×0192
KEY_EPG 0x016D
KEY_FASTFORWARD 0x00D0
KEY_FAVORITES 0x016C
KEY_FORWARD 0x009F
KEY_MUTE 0×0071
KEY_PAUSE 0×0077
KEY_PLAY 0x00CF
KEY_POWER2 0×0164
KEY_RECORD 0x00A7
KEY_REWIND 0x00A8
KEY_SCREEN 0×0177
KEY_STOP 0×0080
KEY_TEXT 0×0184
KEY_VOLUMEDOWN 0×0072
KEY_VOLUMEUP 0×0073
KEY_RESTART 0×0198
KEY_CANCEL 0x00DF
KEY_PRINT 0x00D2
KEY_LIST 0x018B
KEY_TAB 0x000F
KEY_PROGRAM 0x016A
end codes
end remote
3-gedit /usr/share/lirc/remotes/devinput/lircd.conf.devinput
# generated by devinput.sh
begin remote
name devinput
bits 16
eps 30
aeps 100
one 0 0
zero 0 0
pre_data_bits 16
pre_data 0×8001
gap 132799
toggle_bit_mask 0×0
begin codes
KEY_0 0×0200
KEY_1 0×0201
KEY_2 0×0202
KEY_3 0×0203
KEY_4 0×0204
KEY_5 0×0205
KEY_6 0×0206
KEY_7 0×0207
KEY_8 0×0208
KEY_9 0×0209
KEY_CHANNELDOWN 0×0193
KEY_CHANNELUP 0×0192
KEY_EPG 0x016D
KEY_FASTFORWARD 0x00D0
KEY_FAVORITES 0x016C
KEY_FORWARD 0x009F
KEY_MUTE 0×0071
KEY_PAUSE 0×0077
KEY_PLAY 0x00CF
KEY_POWER2 0×0164
KEY_RECORD 0x00A7
KEY_REWIND 0x00A8
KEY_SCREEN 0×0177
KEY_STOP 0×0080
KEY_TEXT 0×0184
KEY_VOLUMEDOWN 0×0072
KEY_VOLUMEUP 0×0073
KEY_RESTART 0×0198
KEY_CANCEL 0x00DF
KEY_PRINT 0x00D2
KEY_LIST 0x018B
KEY_TAB 0x000F
KEY_PROGRAM 0x016A
end codes
end remote
4- gedit /usr/share/hal/fdi/preprobe/20thirdparty/lirc.fdi
true
5- /etc/init.d/lirc restart
???? ???? ????? ????????? ????? ??????
????? ????? ????? ??????? ?? ??????? doctor_ahmed ?? ???? ?? ?? ???? ???
???? ??? ????? ??????? ?????? ??????? ????? ???? ????? ???????
Dear neztiti
After GOD WELL I have found the solution to make Twinhan Romte compeletely works with UBUNTU 10.4 LUCID
Exclusively i have found the codes of number buttons
The method as following just copy and paste:
1- gedit /etc/lirc/hardware.conf
# /etc/lirc/hardware.conf
#
#Chosen Remote Control
REMOTE=”Twinhan Remote Control”
REMOTE_MODULES=”lirc_dev lirc_mceusb”
REMOTE_DRIVER=”devinput”
REMOTE_DEVICE=”/dev/input/by-id/usb-Twinhan_Tech_Remote_Control_1111111-event-if00″
REMOTE_SOCKET=”"
REMOTE_LIRCD_CONF=”"
REMOTE_LIRCD_ARGS=”"
#Chosen IR Transmitter
TRANSMITTER=”None”
TRANSMITTER_MODULES=”"
TRANSMITTER_DRIVER=”"
TRANSMITTER_DEVICE=”"
TRANSMITTER_SOCKET=”"
TRANSMITTER_LIRCD_CONF=”"
TRANSMITTER_LIRCD_ARGS=”"
#Enable lircd
START_LIRCD=”true”
#Don’t start lircmd even if there seems to be a good config file
#START_LIRCMD=”false”
#Try to load appropriate kernel modules
LOAD_MODULES=”true”
# Default configuration files for your hardware if any
LIRCMD_CONF=”"
#Forcing noninteractive reconfiguration
#If lirc is to be reconfigured by an external application
#that doesn’t have a debconf frontend available, the noninteractive
#frontend can be invoked and set to parse REMOTE and TRANSMITTER
#It will then populate all other variables without any user input
#If you would like to configure lirc via standard methods, be sure
#to leave this set to “false”
FORCE_NONINTERACTIVE_RECONFIGURATION=”false”
START_LIRCMD=”"
2- gedit /etc/lirc/lircd.conf
begin remote
name devinput
bits 16
eps 30
aeps 100
one 0 0
zero 0 0
pre_data_bits 16
pre_data 0×8001
gap 132799
toggle_bit_mask 0×0
begin codes
KEY_0 0×0200
KEY_1 0×0201
KEY_2 0×0202
KEY_3 0×0203
KEY_4 0×0204
KEY_5 0×0205
KEY_6 0×0206
KEY_7 0×0207
KEY_8 0×0208
KEY_9 0×0209
KEY_CHANNELDOWN 0×0193
KEY_CHANNELUP 0×0192
KEY_EPG 0x016D
KEY_FASTFORWARD 0x00D0
KEY_FAVORITES 0x016C
KEY_FORWARD 0x009F
KEY_MUTE 0×0071
KEY_PAUSE 0×0077
KEY_PLAY 0x00CF
KEY_POWER2 0×0164
KEY_RECORD 0x00A7
KEY_REWIND 0x00A8
KEY_SCREEN 0×0177
KEY_STOP 0×0080
KEY_TEXT 0×0184
KEY_VOLUMEDOWN 0×0072
KEY_VOLUMEUP 0×0073
KEY_RESTART 0×0198
KEY_CANCEL 0x00DF
KEY_PRINT 0x00D2
KEY_LIST 0x018B
KEY_TAB 0x000F
KEY_PROGRAM 0x016A
end codes
end remote
3-gedit /usr/share/lirc/remotes/devinput/lircd.conf.devinput
# generated by devinput.sh
begin remote
name devinput
bits 16
eps 30
aeps 100
one 0 0
zero 0 0
pre_data_bits 16
pre_data 0×8001
gap 132799
toggle_bit_mask 0×0
begin codes
KEY_0 0×0200
KEY_1 0×0201
KEY_2 0×0202
KEY_3 0×0203
KEY_4 0×0204
KEY_5 0×0205
KEY_6 0×0206
KEY_7 0×0207
KEY_8 0×0208
KEY_9 0×0209
KEY_CHANNELDOWN 0×0193
KEY_CHANNELUP 0×0192
KEY_EPG 0x016D
KEY_FASTFORWARD 0x00D0
KEY_FAVORITES 0x016C
KEY_FORWARD 0x009F
KEY_MUTE 0×0071
KEY_PAUSE 0×0077
KEY_PLAY 0x00CF
KEY_POWER2 0×0164
KEY_RECORD 0x00A7
KEY_REWIND 0x00A8
KEY_SCREEN 0×0177
KEY_STOP 0×0080
KEY_TEXT 0×0184
KEY_VOLUMEDOWN 0×0072
KEY_VOLUMEUP 0×0073
KEY_RESTART 0×0198
KEY_CANCEL 0x00DF
KEY_PRINT 0x00D2
KEY_LIST 0x018B
KEY_TAB 0x000F
KEY_PROGRAM 0x016A
end codes
end remote
4- gedit /usr/share/hal/fdi/preprobe/20thirdparty/lirc.fdi
true
5- /etc/init.d/lirc restart
Now run command irw and all buttons will work gratly
I have previously posted the comment in my favorite great ARABIC language but saddly the blog not support it.
Hope to be happy by the working Remote EN SHAA ALLAH (after GOD’s well)
it works with me 100%
just do carful copy and paste
Doctor_Ahmed
just correction :!
step 4 gedit /usr/share/hal/fdi/preprobe/20thirdparty/lirc.fdi
as the original topic here
true
Pingback by TwinHan Remote under Ubuntu Lucid Lynx 10.04 - REverberations — 2 June 2010 @ 12:12 pm
[...] had no use for it for a while, and a few months ago wanted to make it work again. It turns out that Adam Pierce has a good set of instructions. But, like all other commenters on that blog post, my setup broke when upgrading to Ubuntu 10.04. [...]
Thanks to Adam, Doctor_Ahmed and others, I’ve been able to add a bit of extra work on my own and now have all keys working including numbers under lucid.
Documented in a blog entry here.
I’m replicating this under Maverick (10.10). It’s pretty close, but there’s some stuff that’s different.
1. Run: “dpkg-reconfigure lircd”
2. Select “Linux Input Layer” for the input device, and “none” for the transmitter.
3. Run: “/etc/init.d/lirc restart”
The “lshal | grep input.product” hack doesn’t appear to be required, nor does modifying lircd.conf (leave it blank)
irw should work at this point. The lircd.conf file is to be left blank BUT all of the keys have different names now. Here’s my ~/.lirc/mythtv :
begin
prog = mythtv
button = KEY_CANCEL
config = Esc
end
begin
prog = mythtv
button = KEY_VOLUMEUP
config = Right
end
begin
prog = mythtv
button = KEY_VOLUMEDOWN
config = Left
end
begin
prog = mythtv
button = KEY_CHANNELUP
config = Up
end
begin
prog = mythtv
button = KEY_CHANNELDOWN
config = Down
end
begin
prog = mythtv
button = KEY_PLAY
config = Enter
end
begin
prog = mythtv
button = KEY_PAUSE
config = p
end
begin
prog = mythtv
button = KEY_MUTE
config = F9
end
begin
prog = mythtv
button = KEY_RECORD
config = r
end
begin
prog = mythtv
button = KEY_STOP
config = o
end
begin
prog = mythtv
button = KEY_LIST
config = m
end
begin
prog = mythtv
button = KEY_EPG
config = i
end
begin
prog = mythtv
button = KEY_NUMERIC_0
config = 0
end
begin
prog = mythtv
button = KEY_NUMERIC_1
config = 1
end
begin
prog = mythtv
button = KEY_NUMERIC_2
config = 2
end
begin
prog = mythtv
button = KEY_NUMERIC_3
config = 3
end
begin
prog = mythtv
button = KEY_NUMERIC_4
config = 4
end
begin
prog = mythtv
button = KEY_NUMERIC_5
config = 5
end
begin
prog = mythtv
button = KEY_NUMERIC_6
config = 6
end
begin
prog = mythtv
button = KEY_NUMERIC_7
config = 7
end
begin
prog = mythtv
button = KEY_NUMERIC_8
config = 8
end
begin
prog = mythtv
button = KEY_NUMERIC_9
config = 9
end
begin
prog = mythtv
button = KEY_FORWARD
config = PgDown
end
begin
prog = mythtv
button = KEY_REWIND
config = PgUp
end
begin
prog = mythtv
button = KEY_REWIND
config = ,
end
begin
prog = mythtv
button = KEY_FORWARD
config = .
end
Hi Adam,
Do you know which Twinhan device in the Logitech Harmony this remote is?
Thanks!
So I upgraded from 9.04 to 10.10 and unsurprisingly it broke my remote.
What I did to fix it:
1. Run: “dpkg-reconfigure lircd”
2. Select “Linux Input Layer” for the input device, and “none” for the transmitter.
3. edit /etc/lirc/hardware.conf. Make sure the following lines are correct.
REMOTE_DRIVER=”devinput”
REMOTE_DEVICE=”/dev/input/by-id/usb-Twinhan_Tech_Remote_Control_1111111-event-if00″
Note that the last couple of characters of the device name changed from “kbd” to “if00″, this caught me out.
4. Now irw picks up codes but the names are all changed. 2 ways around this – replacing /usr/share/lirc/remotes/devinput/lircd.conf.devinput with http://www.doctort.org/adam/files/twinhan/lircd.conf should work, or do what I did and update ~/.lirc/mythtv to match the new names.
5. sudo service lirc restart
6. restart mythfrontend
7. Watch TV, sip beer.
Hopefully that helps someone.
With my logitech harmony I use TwinHanVP-1020A
you know, your blog is very well written, very close to lifehttp://www.creditocartao.net