TopSeed TSBX-2404 Remote

From MythTV Official Wiki
Revision as of 20:33, 5 June 2010 by Kevlar (talk | contribs) (Add details of TopSeed TSBX-2404 remote control.)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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. Version 11 of the X protocol only supports single-byte key codes - so codes above 255 are ignored.

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 here. This issue has been raised as a bug at bugs.freedesktop.org.


event_key_remap

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:

   Section "ServerLayout"
       Identifier      "your-layout-name"
       ... add the following line to the existing lines in this section ...
       InputDevice     "RF remote" "SendCoreEvents"
   EndSection
   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).


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


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.