Difference between revisions of "TopSeed TSBX-2404 Remote"

From MythTV Official Wiki
Jump to: navigation, search
(Add details of TopSeed TSBX-2404 remote control.)
 
(Moved details of event_key_remap to its own page.)
 
Line 18: Line 18:
 
== Key code generation ==
 
== Key code generation ==
  
Many of the buttons on the handset generate key codes greater than 255 - such as the channel up and channel down buttons which generate key codes 402 and 403 respectively. Version 11 of the X protocol only supports single-byte key codes - so codes above 255 are ignored.
+
Many of the buttons on the handset generate key codes greater than 255 - such as the channel up and channel down buttons which generate key codes 402 and 403 respectively. In order to make these buttons work, you need to remap the key codes to values lower than 255 so that X can process them. This can be achieved using [[event_key_remap]].
  
Until version 12 of X is released (support for more key codes is on the wish list, but not guaranteed), Gianni Ceccarelli has created a patched version of the 'evdev' driver which allows key codes to be remapped from one value another. Details are on his page [http://www.thenautilus.net/SW/xf86-input-evdev/en here]. This issue has been raised as a bug at [http://bugs.freedesktop.org/show_bug.cgi?id=11227 bugs.freedesktop.org].
 
  
 +
==== Configuring event_key_remap ====
  
=== event_key_remap ===
+
Once you have the patched 'xf86-input-evdev' driver loaded (see [[event_key_remap]] for example instructions), the configuration required in your 'xorg.conf' file for this remote control is:
  
Gianni describes how to use [[event_key_remap]] with HAL configuration on his web page; an alternative method is to add the following entries to your xorg.conf file:
+
<pre>Option      "event_key_remap" "130=31 158=9 362=58 402=111 403=116"</pre>
  
     Section "ServerLayout"
+
This maps:
        Identifier      "your-layout-name"
+
     code 130 (Props - the 'i' button) to 31 (i)
        ... add the following line to the existing lines in this section ...
+
    code 158 (Back) to code 9 (Escape)
        InputDevice     "RF remote" "SendCoreEvents"
+
    code 362 (Program) to code 58 (m)
     EndSection
+
     code 402 (ChannelUp) to code 111 (Up)
 +
     code 403 (ChannelDown) to code 116 (Down)
  
    Section "InputDevice"
 
        Identifier  "RF remote"
 
        Driver      "evdev"
 
        Option     "Name" "TopSeed RF Receiver"
 
        Option      "event_key_remap" "130=31 158=9 362=58 402=111 403=116"
 
        Option     "xkb_rules" "xorg"
 
        Option     "xkb_model" "evdev"
 
        Option      "Device" "your-device-id"
 
        Option     "Protocol" "evdev"
 
    EndSection
 
  
The magic line is the 'event_key_remap' option which has been added to the evdev driver by the patches. In the example above, code 402 (ChannelUp) is mapped to 111 (Up), code 403 (ChannelDown) is mapped to 116 (Down) and code 362 (Program) is mapped to 58 (m).
+
==== Unusable keys ====
 
 
 
 
=== xmodmap ===
 
 
 
Although primarily intended to help you access can codes above 255, the 'event_key_remap' feature is a handy way to re-assign buttons on the remote control to the functions you want as an alternative to using [[xmodmap]]. In the example above, code 130 (Props - the 'i' button) is mapped to 31 (i) and code 158 (Back) becomes code 9 (Escape).
 
 
 
The advantage of this is that it keeps all your key mappings together in one place rather than having some done by HAL or xorg.conf, and some by [[xmodmap]].
 
 
 
 
 
=== Unusable keys ===
 
  
 
The top of the remote handset has two rows of four buttons marked with symbols for various devices such as PC, TV, Camera, DVD and Radio. Of these eight buttons, only the Program button appears to generate a usable code - which is used as the Menu button for MythTV.  
 
The top of the remote handset has two rows of four buttons marked with symbols for various devices such as PC, TV, Camera, DVD and Radio. Of these eight buttons, only the Program button appears to generate a usable code - which is used as the Menu button for MythTV.  
Line 63: Line 44:
  
  
=== PC power control ===
+
== PC power control ==
  
The left hand power button and the TV button (both with red symbols on them) are intercepted by the receiver board and are used to power the entire PC on and shut it down again. These key presses are handled directly by X and are unusable for MythTV functions.
+
The TopSeed receiver board (as supplied with the Lian-Li PC-C39B case) intercepts the left hand power button and the TV button (both with red symbols on them) to enable them to be used to power the entire PC on and shut it down again if the receiver board is connected according to the installation instructions which come with the case (which is optional). These buttons are therefore unusable for MythTV functions.
  
  

Latest revision as of 19:06, 12 June 2010

TopSeed TSBX-2404 Remote

TSBX-2404 remote.png

A Media-Center (MCE) style RF remote control.

Tested with: Mythbuntu 10.04 (Ubuntu 10.04 LTS - Lucid Lynx)

Support Status: Many keys work 'out of the box'. Requires some workarounds to get more keys working.


Description

This remote control differs from the majority of remote controls in that it uses radio frequency (RF) communication rather than Infra-Red (IR) between the handset and the receiver. This has the advantage that the remote handset does not need a line of sight to the receiver; the handset can sometimes even be used from a different room.

This remote control is supplied with the Lian-Li PC-C39B HTPC case along with a companion receiver module mounted inside the case.


Key code generation

Many of the buttons on the handset generate key codes greater than 255 - such as the channel up and channel down buttons which generate key codes 402 and 403 respectively. In order to make these buttons work, you need to remap the key codes to values lower than 255 so that X can process them. This can be achieved using event_key_remap.


Configuring event_key_remap

Once you have the patched 'xf86-input-evdev' driver loaded (see event_key_remap for example instructions), the configuration required in your 'xorg.conf' file for this remote control is:

Option      "event_key_remap" "130=31 158=9 362=58 402=111 403=116"

This maps:

   code 130 (Props - the 'i' button) to 31 (i) 
   code 158 (Back) to code 9 (Escape)
   code 362 (Program) to code 58 (m)
   code 402 (ChannelUp) to code 111 (Up)
   code 403 (ChannelDown) to code 116 (Down)


Unusable keys

The top of the remote handset has two rows of four buttons marked with symbols for various devices such as PC, TV, Camera, DVD and Radio. Of these eight buttons, only the Program button appears to generate a usable code - which is used as the Menu button for MythTV.

The PC button (with the red icon) is automatically intercepted by the receiver board - see the next section.

Also, the Red, Green, Yellow and Blue buttons do not seem to generate receivable key codes and therefore these buttons cannot be used for MythTV.


PC power control

The TopSeed receiver board (as supplied with the Lian-Li PC-C39B case) intercepts the left hand power button and the TV button (both with red symbols on them) to enable them to be used to power the entire PC on and shut it down again if the receiver board is connected according to the installation instructions which come with the case (which is optional). These buttons are therefore unusable for MythTV functions.


Receiver location

When supplied with the Lian-Li PC-C39B case, the receiver for the TSBX-2404 is mounted inside the front panel of the case in a location where the receiving antenna is behind the transparent window in the front panel. The big problem with this is that the PC-C39B is a metal case - and RF reception does not work well inside a metal case.

Leaving the lid of the case open by a couple of centimetres vastly improves the performance of the remote control. The alternative is to dismount the receiver board from inside the front panel, extend the connector with a piece of 8-core wire (with careful soldering) and allow the receiver board to dangle outside the rear or side of the case. Remember to insulate the receiver board either with plastic tape, or place it in a small plastic box to protect the connector from short circuits. As the communication is by RF and not IR, the receiver does not have to be visually visible from the front.