Gyration-based MCE Remotes

From MythTV Official Wiki
Revision as of 13:51, 21 December 2009 by Mrand (talk | contribs) (lircd.conf: fix intention)

Jump to: navigation, search

Gyration-based remotes operate over long distances (more than a room away) via RF. No line of site or IR is required. They can be programmed to control IR devices as well (push a button to switch mode).

They are sold under the following branding: Gyration, Dell Premium, and Fiire Chief.

Models

Gyration GYR3101 MCE Remote Fiirechief (GYR3101-based)MCE Remote MCE Dell m2010 WJ151 (WinXP) RY496 (Vista) Remote Dell WJ151 Remote Gyration GYR4101 MCE Remote
Gyration Product Number
2
2
3
3
8
Model
Gyration GYR3101
Fiire Chief
Dell Premium/M2010 remote
WJ151 (WinXP) / RY496 (Vista)
European version of Dell
Gyration GYR4101
Features
Different firmware. Follow-me
Black body. LCD. Missing five colored buttons
Black body. LCD
LCD
Click on a Remote to see the full size image

Description

Product Type 2 is officially supported starting in Linux kernel 2.6.27, while Type 3 is officially supported starting with 2.6.28.[1] Also some of the buttons (SETUP MENU and INPUT) are not intended to send RF codes, according to someone that has spoken with Gyration.[2] The LAST button may only send IR codes on type 2 products, but has been confirmed to send RF code on type 3.

Gyration GYR3101

An "in-the-air" gyroscopic mouse + media center remote, without LCD.

$ cat /proc/bus/input/devices
I: Bus=0003 Vendor=0c16 Product=0002 Version=0110
N: Name="Gyration Gyration RF Technology Receiver"
P: Phys=usb-0000:00:0b.0-7/input0
S: Sysfs=/class/input/input2
U: Uniq=
H: Handlers=kbd event2
B: EV=10000f
B: KEY=7fff 2c3027 bf004440 0 0 1 c00 837c000 267bfa d941dfed e09effdf 1cfffff ffffffff fffffffe
B: REL=40
B: ABS=1 0

I: Bus=0003 Vendor=0c16 Product=0002 Version=0120
N: Name="Gyration Gyration RF Technology Receiver"
P: Phys=usb-0000:00:0b.0-7/input1
S: Sysfs=/class/input/input3
U: Uniq=
H: Handlers=kbd mouse1 event3
B: EV=10000f
B: KEY=7fff 42c73b7 bf0d4440 0 0 1f0001 c04 837c007 ffa67bfa d941dfff 80beffcd 1cfffff febffbff dffffffe
B: REL=143
B: ABS=1 0
$ cat /proc/bus/usb/devices
T: Bus=05 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 2 Spd=1.5 MxCh= 0
D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=0c16 ProdID=0002 Rev= 2.20
S: Manufacturer=Gyration
S: Product=Gyration RF Technology Receiver
C:* #Ifs= 2 Cfg#= 1 Atr=a0 MxPwr= 98mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=01 Driver=(none)
E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=10ms
I:* If#= 1 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=02 Driver=(none)
E: Ad=82(I) Atr=03(Int.) MxPS= 8 Ivl=10ms

Fiire Chief

A re-branded GYR3101, called the Fiire Chief, is offered by Fiire with custom firmware that adds a "follow-me" feature when used with LinuxMCE.


Gyration GYR4101

Also referred to as the Air Music Remote, this unit was originally called the Gyration Ultra R4000, and was actually released after the below mentioned Dell remote that was designed for their M2010 system. It has an LCD read-out.

LinuxMCE now supports this device.[3][4]

$ cat /proc/bus/input/devices
I: Bus=0003 Vendor=0c16 Product=0008 Version=0110
N: Name="Gyration Gyration RF Technology Receiver"
P: Phys=usb-0000:00:1d.3-2/input0
S: Sysfs=/devices/pci0000:00/0000:00:1d.3/usb5/5-2/5-2:1.0/input/input6
U: Uniq=
H: Handlers=kbd event6 
B: EV=10001f
B: KEY=837fff 2c3027 bf004444 0 0 1 c04 a27c000 267bfa d941dfed e09effdf 1cfffff ffffffff fffffffe
B: REL=40
B: ABS=101 0
B: MSC=10
I: Bus=0003 Vendor=0c16 Product=0008 Version=0120
N: Name="Gyration Gyration RF Technology Receiver"
P: Phys=usb-0000:00:1d.3-2/input1
S: Sysfs=/devices/pci0000:00/0000:00:1d.3/usb5/5-2/5-2:1.1/input/input7
U: Uniq=
H: Handlers=kbd mouse3 event7 
B: EV=10001f
B: KEY=837fff 2c3027 bf004444 0 0 1f0001 c04 a27c007 ffa67bfa d941dfff 80beffcd 1cfffff febffbff dffffffe
B: REL=143
B: ABS=1 0
B: MSC=10

Dell Premium/M2010 Media Center Remote

A Dell-branded Gyration remote with small LCD is optional with the Dell M2010 computer system. The remote is p/n WJ151 or RY496. The USB portion is contained on a custom PCB (p/n RH515) which has a non-standard USB pinout. RH515 is no longer available, and instead, a package containing both the remote and a real USB dongle with standard USB pinout can found via Dell p/n CX071.

The unit uses the Cypress CYWUSB6934-48LFXC for RF communications, which is NOT compliant with wireless USB. The microcontroller and USB interface is handled by a CY7C63743-QXC "enCoRe USB" device.

$ cat /proc/bus/input/devices

I: Bus=0003 Vendor=0c16 Product=0003 Version=0110
N: Name="Gyration Gyration RF Technology Receiver"
P: Phys=usb-0000:00:1d.1-1/input0
S: Sysfs=/devices/pci0000:00/0000:00:1d.1/usb2/2-1/2-1:1.0/input/input5
U: Uniq=
H: Handlers=kbd event5 
B: EV=10001f
B: KEY=37fff ac3027 bf004444 0 0 1 c04 a37c000 267bfa d941dfed e09effdf 1cfffff ffffffff fffffffe
B: REL=40
B: ABS=101 0
B: MSC=10

I: Bus=0003 Vendor=0c16 Product=0003 Version=0120
N: Name="Gyration Gyration RF Technology Receiver"
P: Phys=usb-0000:00:1d.1-1/input1
S: Sysfs=/devices/pci0000:00/0000:00:1d.1/usb2/2-1/2-1:1.1/input/input6
U: Uniq=
H: Handlers=kbd mouse1 event6 
B: EV=10001f
B: KEY=37fff 4aff3b7 bf0d4444 0 0 1f0001 c04 a37c007 ffa67bfa d941dfff 80beffcd 1cfffff febffbff dffffffe
B: REL=143
B: ABS=1 0
B: MSC=10
$ cat /proc/bus/usb/devices
T:  Bus=05 Lev=02 Prnt=03 Port=02 Cnt=02 Dev#=  6 Spd=1.5 MxCh= 0
D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0c16 ProdID=0003 Rev= 2.20
S:  Manufacturer=Gyration
S:  Product=Gyration RF Technology Receiver
C:* #Ifs= 2 Cfg#= 1 Atr=a0 MxPwr= 98mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=01 Prot=01 Driver=usbhid
E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=10ms
I:  If#= 1 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=01 Prot=02 Driver=usbhid
E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=10ms

Linux Installation

There are a number of ways to get the remote working on Linux: xmodmap, xbindkeys, evrouter, and lirc.

Note that some of the keys work out of the box. These include the arrows and number keys. The mouse functionality also works out of the box.

xmodmap

Some keys work out of the box. Other keys send standard sequences that mythtv really ought to understand out of the box, but doesn't. Using [xmodmap] is a simple way to work around that.

  • Put this in your [~/.Xmodmap] file:
keysym XF86AudioPrev = Prior
keysym XF86AudioNext = Next
keysym XF86AudioRewind = Left
keysym XF86Forward = Right
keysym XF86AudioRecord = R
keysym XF86AudioStop = Escape
keysym XF86AudioPlay = P
keysym XF86Back = Escape
keysym Pause = P
keysym SunProps = I

Apparently, only the standard MCE keys send out an RF signal - for example the menu key doesn't do anything in PC mode, so you can't re-program it.

A downside of this approach is that you're changing the bindings for *all* applications, not just mythtv. This mapping really should be handled at the mythtv level.

evrouter

We should probably copy the solution described in the Ubuntu forum.

evrouter seems to be unsupported (dead) and may not work on newer systems. Word to the contrary would be welcome.

xbindkeys

Don't know...

LIRC

There appears to be two ways to point LIRC to the device, at least with Ubuntu:

by-id method

  • Verify that the name of the device is as show below:
$ ls -l /dev/input/by-id/
total 0
lrwxrwxrwx 1 root root 9 2008-08-11 21:48 usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd -> ../event6
lrwxrwxrwx 1 root root 9 2008-08-11 21:48 usb-Gyration_Gyration_RF_Technology_Receiver-event-mouse -> ../event7
lrwxrwxrwx 1 root root 9 2008-08-11 21:48 usb-Gyration_Gyration_RF_Technology_Receiver-mouse -> ../mouse2
  • Edit /etc/lirc/hardware.conf:
REMOTE_DRIVER="devinput"
REMOTE_DEVICE="/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd"

udev method

(steps are based upon the info from Adam Pierce's blog).

  • Perform udevinfo -a -p [sysfs_from_/proc/bus/input/devices]. For example:
$ udevinfo -a -p /devices/pci0000:00/0000:00:1d.1/usb2/2-1/2-1:1.0/input/input5 
          <lots of output - look for the first occurance of modalias>
 looking at parent device '/devices/pci0000:00/0000:00:1d.1/usb2/2-1/2-1:1.0':
   KERNELS=="2-1:1.0"
   SUBSYSTEMS=="usb"
   DRIVERS=="usbhid"
   ATTRS{bInterfaceNumber}=="00"
   ATTRS{bAlternateSetting}==" 0"
   ATTRS{bNumEndpoints}=="01"
   ATTRS{bInterfaceClass}=="03"
   ATTRS{bInterfaceSubClass}=="01"
   ATTRS{bInterfaceProtocol}=="01"
   ATTRS{modalias}=="usb:v0C16p0003d0220dc00dsc00dp00ic03isc01ip01"
  • Create symlink for device using modalias:
$ cat >> /etc/udev/rules.d/10-local.rules 
KERNEL=="event*",ATTRS{modalias}=="usb:v0C16p0003d0220dc00dsc00dp00ic03isc01ip01",SYMLINK="input/gyration-remote"
  • Hit <ctrl-d>
  • If desired, double check that things are working:
$ hexdump -C /dev/input/gyration-remote
  • Edit /etc/lirc/hardware.conf:
REMOTE_DRIVER="devinput"
REMOTE_DEVICE="/dev/input/gyration-remote"

lircd.conf

Preliminary /etc/lirc/lircd.conf for the Gyration remotes follows.

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

LCD

LCD on the Dell unit has been verified to work under Windows with Windows Media Player after installing the driver. Linux and/or Mythtv support has not yet been investigated. Presumably mythlcdserver and lcdproc after some minor code modification somewhere...


External links