2010-04-29, 21:05
I had been searching around several places look on how to get my Gyration remote (GYR3201US) to work completely with XBMC on a minimal Ubuntu install. Finally, another user (bbegin) took pity on me and helped me out. Now i'm sharing this with you!
NOTE: The mouse functions of the remote WILL NOT WORK with this. All of the buttons WILL work thoguh, so it's kind of a trade off. As I understand, it is a problem with lirc not with this config or XBMC. I'm not smart enough to know myself, so I'll take their word for it Future versions may fix this.
NOTE: The mouse functions of the remote WILL NOT WORK with this. All of the buttons WILL work thoguh, so it's kind of a trade off. As I understand, it is a problem with lirc not with this config or XBMC. I'm not smart enough to know myself, so I'll take their word for it Future versions may fix this.
- Step 1: Download this modified version of the lirc init.d script: http://bazaar.launchpad.net/~jon-raiford...irc.init.d and place it in /etc/init.d.
- Step 2: create a symlink of the script in /etc/rc5.d
Code:ln -s /etc/init.d/lirc.init.d /etc/rc5.d/lirc.init.d
- Step 3: Backup your hardware.conf file
Code:mv /etc/lirc/hardware.conf /etc/lirc/hardware.conf.backup
- Step 4: Create a new hardware.conf file:
contents:Code:nano /etc/lirc/hardware.conf
press CTRL-O to save, CTRL-X to quit.Code:#List of all required modules
REMOTE_MODULES=""
#Primary Remote Control Device
REMOTE[0]="Gyration-kbd"
REMOTE_DRIVER[0]="devinput"
REMOTE_DEVICE[0]="/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd"
#If remote socket is blank, the default used is /var/run/lirc/lircd
REMOTE_SOCKET[0]=""
#Additional arguments to pass to the lircd daemon
REMOTE_LIRCD_ARGS[0]="-r"
#Secondary Remote Control Device
REMOTE[1]="Gyration-mouse"
REMOTE_DRIVER[1]="devinput"
REMOTE_DEVICE[1]="/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-mouse"
#If remote socket is blank, the default used is /var/run/lirc/lircd1
REMOTE_SOCKET[1]=""
#Additional arguments to pass to the lircd daemon
REMOTE_LIRCD_ARGS[1]=""
#Tertiary Remote Control Device
#REMOTE[2]="None"
#REMOTE_DRIVER[2]=""
#REMOTE_DEVICE[2]=""
#If remote socket is blank, the default used is /var/run/lirc/lircd2
#REMOTE_SOCKET[2]=""
#Additional arguments to pass to the lircd daemon
#REMOTE_LIRCD_ARGS[2]=""
#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=""
- Step 5: If it's not already done, add this line to the end of /etc/lirc/lircd.conf:
Code:include "/usr/share/lirc/remotes/gyration/lircd.conf.gyration"
- Step 6: Create gyration/lircd.conf.gyration file
contents:Code:mkdir /usr/share/lirc/remotes/gyration
nano /usr/share/lirc/remotes/gyration/lircd.conf.gyration
Code:#
# lircd.conf
# for Gyration MCE remote(s). Could almost certainly be expanded to work for their keyboard as well.
#
# Composed by Marc Randolph based upon
# initial lircd.conf by Modulok (https://bugs.launchpad.net/mythbuntu/+bug/156494/comments/6)
# with help from the Linux MCE wiki (http://wiki.linuxmce.org/index.php/Gyration-GYR3101US-codes)
#
# Notes:
# Star and Hash keys produce two key sequences: 0x002A followed by either 8 for star, or 3 for hash
#
# Revision history
# 2.3 - Marc Randolph - Renamed camera to pictures and video to videos. Added alternative mappings
# 2.2 - Marc Randolph - Added untested DVDMenu entry
# 2.1 - Marc Randolph - StarHash comment was wrong
# 2.0 - Marc Randolph - Special codes should be correct, or at least, very close to correct
# 1.0 - Marc Randolph - added missing codes and changed names to match up the mceusb remote
# - Some of the more special codes have not been verified (Pictures, LiveTV, etc)
# 0.1 - Modulok - Initial revision
#
#
begin remote
name gyration
bits 16
eps 30
aeps 100
one 0 0
zero 0 0
pre_data_bits 16
pre_data 0x8001
gap 135997
toggle_bit_mask 0x0
begin codes
Home 0x0066 # AKA "Windows button"
Up 0x0067
Left 0x0069
Right 0x006A
Down 0x006C
Mute 0x0071
VolDown 0x0072
VolUp 0x0073
# Power 0x0074
Power 0x008E
Pause 0x0077
More 0x0082 # AKA "Info" or Help
Back 0x009E
Skip 0x00A3
Replay 0x00A5
Stop 0x00A6
RecTV 0x00A7 #Not "recorded TV", but "record current show on TV"
Rewind 0x00A8
Play 0x00CF
Forward 0x00D0
Pictures 0x00D4 # not on Dell remote
RecordedTV 0x00E2 # aka KEY_MEDIA
Guide 0x016A
LiveTV 0x016E # aka KEY_PVR
DVD 0x0185
Music 0x0187 # not on Dell remote # aka KEY_MP3
Videos 0x0189 # not on Dell remote
ChanUp 0x0192
ChanDown 0x0193
DVDMenu 0x019A # untested. not on Dell remote
Clear 0x0001
One 0x0002
Two 0x0003
Three 0x0004
Four 0x0005
Five 0x0006
Six 0x0007
Seven 0x0008
Eight 0x0009
Nine 0x000A
Zero 0x000B
Enter 0x001C
StarHash 0x002A # Star=0x2a and 0x08; Hash = 0x2a and 0x03
# StarHash 0x002A # Air-music; Star=0x2a and 0x09; Hash = 0x2a and 0x04
# Camera unknown # Air-music
# Email 0x009E # Air-music
# Browser 0x00AC # Air-music
# Radio unknown # Air-music
# Favorites 0x009C # Air-music
end codes
end remote
# Alternative mappings to try if some of the above don't work
# (please report any findings back to http://www.mythtv.org/wiki/Gyration-based_MCE_Remotes)
# Up 0x0062
# Left 0x0064
# Right 0x0066
# Down 0x0068
# Pause 0x0075
# Power 0x008E
# Halt 0x019C
# Lights 0x0111
# Clear 0x0016
# Enter 0x0024
# DVDMenu 0x0029
- Step 7: Add the following text to /usr/share/xbmc/system/Lircmap.xml, anywhere BETWEEN <lircmap></lircmap> tags:
Code:<remote device="gyration">
<pause>Pause</pause>
<pause>Play</pause>
<stop>Stop</stop>
<forward>Forward</forward>
<reverse>Rewind</reverse>
<left>Left</left>
<right>Right</right>
<up>Up</up>
<down>Down</down>
<select>Enter</select>
<pageplus>ChanUp</pageplus>
<pageminus>ChanDown</pageminus>
<back>Back</back>
<menu>PreviousMenu</menu>
<info>More</info>
<skipplus>Skip</skipplus>
<skipminus>Replay</skipminus>
<display>Teletext</display>
<start>Home</start>
<record>Record</record>
<volumeplus>VolUp</volumeplus>
<volumeminus>VolDown</volumeminus>
<mute>Mute</mute>
<power>Power</power>
<myvideo>Videos</myvideo>
<mymusic>Music</mymusic>
<mypictures>Pictures</mypictures>
<mytv>TV</mytv>
<one>One</one>
<two>Two</two>
<three>Three</three>
<four>Four</four>
<five>Five</five>
<six>Six</six>
<seven>Seven</seven>
<eight>Eight</eight>
<nine>Nine</nine>
<zero>Zero</zero>
<mytv>Red</mytv>
<mymusic>Green</mymusic>
<mypictures>Yellow</mypictures>
<myvideo>Blue</myvideo>
</remote>
- Step 8: Reboot your HTPC.
- Step 9: Enjoy!
Thanks again to bbegin for helping me out with all this!