TuX as LLG logo
Driver Suite for Linux
csv2iif.pl suite
convert PayPal transactions to IIF, OFX, QIF
DMX30 Interface
128Ch SPP
DMX43 Interface
2out 2in EPP
LED Hardware
for Linux and Windows
EPROM Sampler
for 8 bits of sound
Linux drivers for MK3/4 PCI
PostgreSQL replication
C exception/signal handling lib
to various software
and small scripts
misc documents
to lighting stuff
Sony RM-X2S

Sony RM-X2S XMMS driver

A XMMS plugin, which lets you control XMMS with a Sony RM-X2S control joystick. These are/were shipped with car radios.

Download Source

Version 1.2 from 2003-02-14 xmms-sonyrmx2s-1.2.tar.gz configurations for Linux 2.2 and 2.4.
Version 1.3 from 2006-05-05 xmms-sonyrmx2s-1.3.tar.gz for Linux 2.6.



The joystick is connected to the game port. You can connect it directly to the gameport. However if you wish to use the joystick button a small circuit is needed.
You can fit it into the gameport connector, as shown in this picture.

The following ASCII art shows the circuit.

Pin                                    Pin              J
---                                    ---              O
S   GND 1 o---+------------------------------o 1 +5V    Y
O             |                                         S
N             |                         ,----o 2 BTN    T
Y             |           +------+   | /                I
S SHIFT 2 o---|-----------|4.73KO|---|/ BC547           C
T             |           +------+   |\                 K
I             |  +-----+             | >                P
C             +--|120KO|--+             `----o 4 GND    O
K                +-----+  |         	                R
     AD 3 o---------------+------------------o 3 X-AXIS T

The Joystick Port is a 15pin male Sub-D connector. The Sonystick is connected to a 3.5mm stereo jack. The AD pin of the joystick will apply resistances between 0 and 150KOhm compared to GND.

3.5mm stereo jack pinout

---___     |
      \    |
      |_  _|
        ||  Pin 1 GND   - black wire
        ||  Pin 2 Shift - white wire
        ||  Pin 3 AD    - red wire


You have to install the analog joystick driver. I would recommend installing it as a module. Then load the following modules:

modprobe joydev
modprobe ns558
modprobe analog

If the above lines work, you can place them in a system startup file like /etc/rc.d/rc.local.

If you have troubles with the kernel joystick modules read /usr/src/linux/Documentation/joystick.txt.


Compile and install the plugin source with:

make install

You can supply the following options to configure:

enable debugging prints
enable localization

You can insert module options into /etc/modules.conf to load the joystick module automatically by make installmodule.
If you are not root, or don't want to install into the global plugin directory use make install-home to install the plugin to your private xmms directory (~/.xmms).

Setup in XMMS

Now start xmms and get the plugin configuration panel with CTRL+p. Select the plugin and click the Configure button (picture).

  1. Check the device setting. If you have only one joystick port, the default of /dev/js0 should be fine. (picture)
  2. Calibrate the joystick. The systems needs to perform 4 measurements each lasting 2 seconds. If you press the calibration button the first measure will start and a popup window will appear after 2 seconds. (picture)
    1. Press the OFF Button on your Sonystick on click OK. Leave the button pressed during the measurement (2 seconds) until the text in the popup window changes
    2. Now the same procedure with the MUTE Button
    3. Now press no button on the sonystick
  3. Now set the precision to 5. If you experience difficulties when using the joystick (events without touching the joystick or some buttons having the same event) you can alter this setting. Lower values make the joystick more precise, thus harder to control.
  4. Configure the buttons. A beep indicates that an event was successfully recorded.
  5. Pressing the OK Button to save the configuration. Cancel will not save any changes made to the configuration.

Finally you can enable the plugin in the XMMS preferences window.


I have scanned the circuit of the rm-x2s. The resistance values of the different buttons:

0 ΩOff
2.2k ΩSource
4.4k ΩMute
6.6k ΩList(Disp)
8.8k ΩSeek up
12.1k ΩSeek down
16.8k ΩVolume up
23.6k ΩVolume down
33.6k ΩSelect
48.6k ΩMode

Other devices

Markus Strangl gave me the following information.
The RM-X1S is not compatible to the X2S. It does not use resistors to diversify the buttons, but an IC chip. You can not use this driver software with the RM-X1S. However look at out RM-X1S conversion page how to modify this a a full fledged infra-red remote control.
The RM-X2/3/4S are absolutely identical, they only come with different text labels because they were designed for different radios. The two trapezoid and the one rectangular button on the bottom half later came with adhesive labels to save production costs, the top twist knob on the x3s is labelled for an autoreverse cassette deck.
The X5S is technically the predecessor of the X6S and interchangeable for most radios. Both the 5 and the 6 are using high-speed infrared codes, and are not usable with lirc (serial link is too slow). Though there might be a chance to get them to work through an IR-DA port (4 Mbit). While the X6S looks like a hockey puck, the X5S' design is identical to the X2/3/4S, just with a 2cm high base for the transmitter.


Charlie Payne has informations how to wire an RM-X6S to an empeg car radio.


You can write me emails on all topics including Sony remote commands. Dirk Jagdmann <doj@cubic.org>

https://llg.cubic.org © 2001-2024 by Dirk Jagdmann