Thread Rating:
  • 0 Vote(s) - 0 Average
[LINUX] Gyration Remote How to - ALL BUTTONS WORK!
#1
Lightbulb 
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 Smile Future versions may fix this.

  1. 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.

  2. 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

  3. Step 3: Backup your hardware.conf file
    Code:
    mv /etc/lirc/hardware.conf /etc/lirc/hardware.conf.backup

  4. Step 4: Create a new hardware.conf file:
    Code:
    nano /etc/lirc/hardware.conf
    contents:
    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=""
    press CTRL-O to save, CTRL-X to quit.


  5. 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"

  6. Step 6: Create gyration/lircd.conf.gyration file
    Code:
    mkdir /usr/share/lirc/remotes/gyration

    nano /usr/share/lirc/remotes/gyration/lircd.conf.gyration
    contents:
    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

  7. 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>

  8. Step 8: Reboot your HTPC.

  9. Step 9: Enjoy!

    Thanks again to bbegin for helping me out with all this!
Reply
#2
The entire idea about gyration is the air mouse, and if that function is disabled, then what use is this ?

I love my gyration with XBMC. I can get the basic buttons to work such as play pause, forward and rewind. and back button etc. all this was possible with plug and play for me.

However one critical feature i am missing is the ability to use the Letters on the remote :-(
Reply
#3
I have the Gyration keyboard/remote combo, do you suppose the keyboard will work as well?
Reply
#4
I don't understand why the gyration should be turned off. In Ubuntu 10.04, all buttons seem to work well from the desktop.

However, the back and power button for example do nothing in xbmc. Using Xkeybinds I figured out that the back buttons outputs XF86Back. modifying the remote.xml keymap to include <XF86Back>PreviousMenu</XF86Back> however seems not to do anything.

Can anybody explain to me why this is?
Reply
#5
Deosneos Wrote:I don't understand why the gyration should be turned off. In Ubuntu 10.04, all buttons seem to work well from the desktop.

However, the back and power button for example do nothing in xbmc. Using Xkeybinds I figured out that the back buttons outputs XF86Back. modifying the remote.xml keymap to include <XF86Back>PreviousMenu</XF86Back> however seems not to do anything.

Can anybody explain to me why this is?

Yes. The issue is that some of the keys on the remote are registered as one device, and other keys are another. In order to get it all working, I had to set up two instances of lircd: one for each device. Once that was working, irw was showing every single button push. I had to do some hacking using hexdump on the devices to figure out a working lircd.conf file, but I finally did it.

I am at home and do not have access to how I did it, but I know I posted about it before here.

I do not understand why lircd kills the mouse function.
Reply
#6
Here it is. The last reply is news to me. I hadn't seen it before now, so I'm going to do some investigation.

http://forum.xbmc.org/showthread.php?tid=65772
Reply
#7
Thank you OP

Perfect and easy to follow guide.
Reply
#8
I think this pretty much works out of the box with the newer Live distros now, i can't remember Smile
Reply
#9
thatjoshguy Wrote:I think this pretty much works out of the box with the newer Live distros now, i can't remember Smile

Not on 10.10

I had to install the Gyration conf as per your guide. Disabled the package maintainers /etc/init.d/lirc in favour of your init script and fired it up.

BTW Whilst I'm here is there debug toggle that I can throw into lircd.conf - The last time I installed Lirc was more than 10 years ago Rofl
Reply
#10
Thanks very much for this!

I'm on Linux Mint 17 and my init.d scripts are named differently so I had to rename the lird.init.d script to lirc and everything worked great!
/ OSMC on Raspberry Pi 3 / Kodi 17 RC / FireTV Stick /
Reply
#11
On a different computer I ended up having to use this guide to get the buttons associated with the mouse working (Home/Green Button & LiveTV).

Archive:HOW-TO:Gyration_USB_remote_in_Ubuntu_for_XBMC_using_Lirc (wiki)
/ OSMC on Raspberry Pi 3 / Kodi 17 RC / FireTV Stick /
Reply
#12
(2016-01-01, 06:48)leetwanker Wrote: On a different computer I ended up having to use this guide to get the buttons associated with the mouse working (Home/Green Button & LiveTV).

Archive:HOW-TO:Gyration_USB_remote_in_Ubuntu_for_XBMC_using_Lirc (wiki)

If that guide still works then I'll remove the archive/outdated tag (replaced by a "cleanup" tag).
Reply



[LINUX] Gyration Remote How to - ALL BUTTONS WORK!00