ADAM'S WEB PRESENCE

15 November 2008

Update on TwinHan remote for Mythbuntu 8.10

Filed under: General — adam @ 11:08 pm

twinhan remoteI’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:

lircd.conf

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:

lircrc-mythtv

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:

lircrc-mplayer

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.

49 Comments »

  1. Comment by neztiti — 17 November 2008 @ 9:57 pm

    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

  2. Comment by adam — 18 November 2008 @ 7:24 am

    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.

  3. Comment by neztiti — 19 November 2008 @ 3:24 am

    ok thank you man for every update , you are NO.1 m8

  4. Comment by stf — 22 November 2008 @ 11:40 am

    I followed your docs. All seems right, but when I fire up irw I’ve got this message:
    Lirc: command not found

  5. Comment by adam — 27 November 2008 @ 3:39 pm

    Sounds like lirc is not installed on your box. Try sudo apt-get install lirc.

  6. Comment by Glyn — 22 December 2008 @ 5:33 am

    Useful page, thanks. You have a typo though, your lircrc-mythtv link above points to lircrc-mplayer as well.

  7. Comment by adam — 22 December 2008 @ 3:36 pm

    Thanks for spotting that Glyn, I’ve fixed it now.

  8. Comment by hosam — 3 January 2009 @ 6:04 am

    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

  9. Comment by adam — 3 January 2009 @ 12:59 pm

    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.

  10. Comment by hosam — 4 January 2009 @ 1:31 am

    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

  11. Comment by hosam — 4 January 2009 @ 1:36 am

    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 ]

  12. Comment by hosam — 7 January 2009 @ 5:43 am

    adam please try to fix my problem

  13. Comment by adam — 24 January 2009 @ 9:09 pm

    Can you show me the contents of your file /usr/share/hal/fdi/preprobe/20thirdparty/lirc.fdi – it will help work out the problem.

  14. Comment by Gregg — 28 January 2009 @ 8:52 pm

    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.

  15. Comment by Hector — 19 February 2009 @ 10:23 am

    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)

  16. Comment by flo — 19 February 2009 @ 8:23 pm

    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.

  17. Comment by dishbert — 1 March 2009 @ 7:02 am

    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.

  18. Comment by slickvguy — 27 March 2009 @ 7:10 pm

    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.

  19. Comment by slickvguy — 27 March 2009 @ 8:23 pm

    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…

  20. Comment by slickvguy — 28 March 2009 @ 12:03 am

    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?

  21. Comment by G2 — 29 March 2009 @ 12:42 pm

    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.

  22. Comment by Jared — 5 May 2009 @ 3:47 pm

    Works perfectly for Mythbuntu 9.10. Thanks!

  23. Comment by Jared — 7 May 2009 @ 4:19 pm

    …and by Mythbuntu 9.10, I really mean 9.04

  24. Comment by doep — 15 May 2009 @ 1:26 am

    hi, my power button works with:

    POWER 0×10040

    gz doep

  25. Comment by File — 6 June 2009 @ 5:41 am

    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

  26. Comment by File — 6 June 2009 @ 5:48 am

    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

  27. Comment by File — 6 June 2009 @ 5:53 am

    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

  28. Comment by dean — 27 July 2009 @ 10:26 am

    Thanks great web site, is there away to use this reomte to shutdown mythtv pc and/or awake pc

  29. Comment by adam — 27 July 2009 @ 10:48 am

    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.

  30. Comment by Lasse — 3 September 2009 @ 12:09 am

    Thank you! Works splendidly with 9.04.

  31. Comment by Matt — 1 January 2010 @ 2:59 pm

    Thanks so much for this information, worked perfectly!

  32. Comment by neztiti — 20 April 2010 @ 8:45 pm

    what about ubuntu 10.4 ??

  33. Comment by adam — 20 April 2010 @ 9:22 pm

    Well, give it a go on 10.4 and let us know how it went.

  34. Comment by Brett — 1 May 2010 @ 3:15 pm

    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.

  35. Comment by Peter — 4 May 2010 @ 10:43 pm

    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 0×1006d 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?

  36. Comment by neztiti — 13 May 2010 @ 8:17 pm

    any one get it work with lucid??

  37. Comment by Wayne — 15 May 2010 @ 3:44 pm

    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.

  38. 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 [...]

  39. Comment by Jean-Francois — 16 May 2010 @ 2:54 am

    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 0×00DF
    KEY_CHANNELDOWN 0×0193
    KEY_CHANNELUP 0×0192
    KEY_EPG 0×016D
    KEY_FAVORITES 0×016C
    KEY_FORWARD 0×009F
    KEY_LIST 0×018B
    KEY_MUTE 0×0071
    KEY_PAUSE 0×0077
    KEY_PLAY 0×00CF
    KEY_POWER2 0×0164
    KEY_PRINT 0×00D2
    KEY_PROGRAM 0×016A
    KEY_RECORD 0×00A7
    KEY_RESTART 0×0198
    KEY_REWIND 0×00A8
    KEY_SCREEN 0×0177
    KEY_STOP 0×0080
    KEY_TAB 0×000F
    KEY_TEXT 0×0184
    KEY_VOLUMEDOWN 0×0072
    KEY_VOLUMEUP 0×0073
    end codes

    end remote

  40. Comment by neztiti — 17 May 2010 @ 8:23 pm

    Jean-Francois – you mean that you followed the old steps up?? what is your hardware.conf ??

  41. Comment by Jean-Francois — 20 May 2010 @ 9:59 pm

    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=”"

  42. Comment by ukasz — 21 May 2010 @ 8:56 am

    hi

    after updating from karmic to lucid i have same problem. even with Jean-Francois fixes i still have no result.

  43. Comment by ukasz — 21 May 2010 @ 9:05 am

    i had to downgrade to 2.6.31-20-generic to get my ir working.

  44. Comment by Flo — 28 May 2010 @ 6:26 am

    Sadly i cant get my remote working with lucid anymore. Tried the tips from Jean-Francois.

  45. Comment by doctor_ahmed — 30 May 2010 @ 7:46 pm

    ????? 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 0×016D
    KEY_FASTFORWARD 0×00D0
    KEY_FAVORITES 0×016C
    KEY_FORWARD 0×009F
    KEY_MUTE 0×0071
    KEY_PAUSE 0×0077
    KEY_PLAY 0×00CF
    KEY_POWER2 0×0164
    KEY_RECORD 0×00A7
    KEY_REWIND 0×00A8
    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 0×00DF
    KEY_PRINT 0×00D2
    KEY_LIST 0×018B
    KEY_TAB 0×000F
    KEY_PROGRAM 0×016A
    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 0×016D
    KEY_FASTFORWARD 0×00D0
    KEY_FAVORITES 0×016C
    KEY_FORWARD 0×009F
    KEY_MUTE 0×0071
    KEY_PAUSE 0×0077
    KEY_PLAY 0×00CF
    KEY_POWER2 0×0164
    KEY_RECORD 0×00A7
    KEY_REWIND 0×00A8
    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 0×00DF
    KEY_PRINT 0×00D2
    KEY_LIST 0×018B
    KEY_TAB 0×000F
    KEY_PROGRAM 0×016A
    end codes

    end remote

    4- gedit /usr/share/hal/fdi/preprobe/20thirdparty/lirc.fdi

    true

    5- /etc/init.d/lirc restart

    ???? ???? ????? ????????? ????? ??????

    ????? ????? ????? ??????? ?? ??????? doctor_ahmed ?? ???? ?? ?? ???? ???

    ???? ??? ????? ??????? ?????? ??????? ????? ???? ????? ???????

  46. Comment by Doctor_Ahmed — 30 May 2010 @ 7:55 pm

    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 0×016D
    KEY_FASTFORWARD 0×00D0
    KEY_FAVORITES 0×016C
    KEY_FORWARD 0×009F
    KEY_MUTE 0×0071
    KEY_PAUSE 0×0077
    KEY_PLAY 0×00CF
    KEY_POWER2 0×0164
    KEY_RECORD 0×00A7
    KEY_REWIND 0×00A8
    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 0×00DF
    KEY_PRINT 0×00D2
    KEY_LIST 0×018B
    KEY_TAB 0×000F
    KEY_PROGRAM 0×016A
    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 0×016D
    KEY_FASTFORWARD 0×00D0
    KEY_FAVORITES 0×016C
    KEY_FORWARD 0×009F
    KEY_MUTE 0×0071
    KEY_PAUSE 0×0077
    KEY_PLAY 0×00CF
    KEY_POWER2 0×0164
    KEY_RECORD 0×00A7
    KEY_REWIND 0×00A8
    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 0×00DF
    KEY_PRINT 0×00D2
    KEY_LIST 0×018B
    KEY_TAB 0×000F
    KEY_PROGRAM 0×016A
    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

  47. Comment by Doctor_Ahmed — 30 May 2010 @ 8:59 pm

    just correction :!

    step 4 gedit /usr/share/hal/fdi/preprobe/20thirdparty/lirc.fdi

    as the original topic here

    true

  48. 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. [...]

  49. Comment by Tim Gould — 2 June 2010 @ 12:23 pm

    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.

RSS feed for comments on this post. TrackBack URI

Leave a comment


Powered by WordPress