Welcome to
 Welcome to riocar.org! Friday, August 6th 
Main Menu
· Web Links
· Downloads
· BBS/Forums
· Lens Compare
· Boot Logos
· Button Guide
· Developer Info
· Drive Upgrade
· FAQ
· Geek Guide
· Photo Gallery


  
rio car dot org Developer Information



Category: Main -> Mk2 Hardware

 
·   Mk2 & Mk2a Docking Connector Pinouts
·   Tuner Module's Wired Remote Interface
·   More Details on the Tuner Module's Wired Remote Interface

 
·  Mk2 & Mk2a Docking Connector Pinouts
 (Entry last updated on January 3rd, 2007)

Illustration 1, Illustration 2.

1 - permanent power input
2 - amp. remote
3 - tuner
4 - tuner
5 - tuner
6 - tuner
7 - tuner
8 - serial pin 2 (RD)
9 - serial pin 3 (TD)
10 - headlights sense input / serial pin 8 (CTS)
11 - tel. mute input / serial pin 1 (CD)
12 - microhone sleeve
13 - earth
14 - ignition sense input
15 - rear output right
16 - rear output ground
17 - rear output left
18 - front output right
19 - front output ground
20 - front output left
21 - aux input right
22 - aux input ground
23 - aux input left
24 - microphone tip

The ground connections are sometimes tied together at the docking sleeve. Is there any way to indicate which ones are tied (or can you tell by looking)?

The ones that are tied together are pin 10 (headlight sense and serial pin 8) and pin 11 (tel mute and serial pin 1). These don't make sense at all. I also don't see any +12V power going to the serial connector. The manual says that there's 12V on serial pin 4, but there's nothing connected to mine. Am I missing something, or is my connector wired wrongly?

The first 1000 units have unfortunately not got power or ground on the serial connector - somehow, this escaped me when I drew the wiring diagrams. This isn't hard to fix in your wiring for an external device you'll connect to the port, though.

For anyone who is interested, there are some slight differences between the first Mk2 in-car docking cables and the current ones. The main difference is that the serial cable is now a 6 wire cable instead of a 4 wire cable - it now has +12V and GND connections. The extra 2 wires are simply tapped into the blue amp. remote line (for +12V when the empeg is switched on) and the black earth line (for GND). Also the ISO and radio cables are now the same length as the serial cable - longer than before.

(Source from here and here on the BBS.)

Contributed by Borislav Deianov, Hugo Fiennes, and Derek Ward

Back to Top
·  Tuner Module's Wired Remote Interface


Stalk /Tuner is on /dev/ttyS0, at 19200 - the Player needs to send some command(s) to the Tuner before this becomes active, don't know what the 'enable' command is.

Each Stalk button sends a 4 byte packet in the format as per Hugos post.

Format is [in hex] 02 XX YY XX+YY where 02 means Stalk command I guess, XX is the Stalks 'Shift Value' either 00 for 'unshifted' buttons [i.e. Volume knob NOT pushed in] and 01 for Shifted buttons [i.e. Volume knob pushed in].

YY is the ADC value for the button being read and it does hover around the number a little [you need to test for the ADC value being between YY +/-F where F is the Fudge factor [around 5-10 for F is I think ok to cater for most Stalk variations].

The last byte is the Sum of XX+YY.

The Stalk Interface sends two command packets per button, once for Key Down and once for Key Released.
It doesn't send any timing info but you could determine if its a 'long' press by timing how long the down packet arrives before the up packet.

Key Release has FF as the YY value in all cases.

You also get a seperate 'key' release packet whenever the shift key is released [with XX being 01 rather than 00 , but YY is still FF].

You can grab Stalk commands from the Interface once the player has been running by stopping the player, then a
od -t x1 -v -w4 (redirect stdin from /dev/ttyS0)
will dump the 4 byte packets to the console as you fiddle with the Stalk buttons.

For the record heres the dump of the packets my Stalk makes the Tuner send to the empeg
:
[with comments about each button just pressed preceding each bunch of packets]

Note: Stalk is mounted on Steering wheel RHS on this installation [i.e. setting in emplode says RHS Stalk].

Off Button is to the Front [facing driver] and ATT button is behind [facing the dashboard]. The 3 buttons I called Front, Rear and Underneath are facing the Driver, the Dashboard and pointing to the floor of the vehicle respectively.

These 3 buttons are un-named by Sony as their exact Function depends on the Sony head unit the Stalk is plugs into.

On the Empeg these 3 buttons perform the Menu, Cancel and Shuffle on/off toggle in that order [i.e. Front button does Menu, Rear does Cancel and underneath button does Shuffle in my setup].

Note: for LHS of Steering wheel Stalk installations - Menu and Cancel are swapped, Off and ATT stay with the button of the same name and the meaning of Vol+/Seek+ etc is reversed [i.e. Seek+ becomes Seek- and v/v when in the LHS Stalk config].



Heres the dump of each button press then release on od format, ignore the address part at the front of each packet thats od showing the current offset in the stream [shows no packets are missing and little else :-) ]

Source button pressed (& released)
0000000 02 00 17 17
0000004 02 00 ff ff

Vol+ pressed (& released) etc
0000010 02 00 85 85
0000014 02 00 ff ff

Vol- Pressed
0000020 02 00 6f 6f
0000024 02 00 ff ff

Seek+
0000030 02 00 5b 5b
0000034 02 00 ff ff

Seek- [RHS stalk]
0000040 02 00 49 49
0000044 02 00 ff ff

Off
0000050 02 00 01 01
0000054 02 00 ff ff

ATT
0000060 02 00 2c 2c
0000064 02 00 ff ff

Front Button [menu in RHS config]
0000070 02 00 3b 3b
0000074 02 00 ff ff

Rear button [cancel in RHS config]
0000100 02 00 9b 9b
0000104 02 00 ff ff

Underneath button [Shuffle in RHS config]
0000110 02 00 b0 b0
0000114 02 00 ff ff

Shift pressed and released [no other buttons used]
0000120 02 01 ff 00
0000124 02 00 ff ff

Shift+Vol+ (i.e. shifted Vol+)
0000130 02 01 ff 00
0000134 02 01 5b 5c
0000140 02 01 ff 00
0000144 02 00 ff ff

Shift+Vol-
0000150 02 01 ff 00
0000154 02 01 49 4a
0000160 02 01 ff 00
0000164 02 00 ff ff

Shift+Off
0000170 02 01 ff 00
0000174 02 01 02 03
0000200 02 01 ff 00
0000204 02 00 ff ff

Shift+ATT
0000210 02 01 ff 00
0000214 02 01 2b 2c
0000220 02 01 ff 00
0000224 02 00 ff ff

Shift+Front button
0000230 02 01 ff 00
0000234 02 01 3b 3c
0000240 02 01 ff 00
0000244 02 00 ff ff

Shift+Rear Button
0000250 02 01 ff 00
0000254 02 01 9b 9c
0000260 02 01 ff 00
0000264 02 00 ff ff

Shift+underneath button
0000270 02 01 ff 00
0000274 02 01 b0 b1
0000300 02 01 ff 00
0000304 02 00 ff ff

Shift+Source Button
0000310 02 01 ff 00
0000314 02 01 17 18
0000320 02 01 ff 00
0000324 02 00 ff ff


Note: there is no shifted Seek+/Seek- as due to the way the Stalk is made Shifted Vol+ is the same as Shifted Seek+. On the Sony Stalk device when the Volume knob is pushed in [i.e. shifted], it physically engages with the inner ring next to the Volume up/down knob which has the Seek +/- buttons on it and the volume +/- button and the Seek+/- button turn as one button until the volume knob is no longer pushed in. The Shifted Seek/Vol+ actually reports as a shifted Seek+/- button even though I call it Shift Vol+/Vol- This design of the Sony Stalk means that there are 10 unshifted keys [count them] on the Sony Stalk, but only 8 shifted keys. Still 18 useable keys plus a modifier [push and release shift button] makes for more potential buttons functions on the Stalk Interface than the original Kenwood remote has/had. Believe me, the Stalk Interface is just as good as, if not *better* than the remote [even the new Rio one] and I hardly ever use the remote anymore. There are a couple of things the Remote can do that the Stalk can't but we hope to rectify that real soon now - hence this post and the earlier one.
Note that the Shifted buttons produce 4 packets, one for the shift, one for the Button pressed, one for the button release and one for the shift release.

The order of these 4 packets could vary, e.g. if you did the following:
Front button press,shift press,release Front button, release shift you would get 4 packets like this:


0000330 02 00 3b 3b
0000334 02 01 3b 3c
0000340 02 01 ff 00
0000344 02 00 ff ff

Back to Top
·  More Details on the Tuner Module's Wired Remote Interface
 (Entry last updated on July 14th, 2005)

The wired remote interface is being introduced with the MkII tuner module that started shipping in August/September 2001. The wired remote itself is basically an array of resistors with certain (different) values that are linked to each button press. The tuner module interfaces to this remote by applying 5V through a 22kOhm resistor to its tip and reading the actual voltage that could be measured at the tip. Here is a basic diagram how it works:

stalk interface circuit diagram

And here is a schematic of the innards of an RM-X2S wired remote:

RM-X2S Remote Schematic

While this seems to be pretty basic, this is usually working quite well. However, some people had problems with their in-car remotes that where using an additional adapter to make them compatible with the Sony interface (e.g. GM remotes with a GM-to-Sony adapter connected to the tuner module which itself interfaces with the empeg). The tuner module reads the voltage at the "ADC input" marked point and reports it to the empeg once it gets a stable read. It sends a 4 byte data packet to the empeg's first serial port (/dev/ttyS0, the port that is accessible through the 9pin-port on the back of the empeg is /dev/ttyS1) that looks like this:

Data byte
value
description
1 0x02 indicator for a stalk interface command
2 0x00 or 0x01 0x00 indicates no use of the shift modifier
0x01 indicates shift used
3 ADC value Vadc*255/5 with Vadc being the actual voltage at the ADC input point
4 checksum the sum of Bytes 2 and 3

Here is a table with the expected values for the different buttons. The 1.03 software uses a tolerance level of 2 while the upcoming 1.04 software and the 2.0 software are less demanding and use a tolerance level of at least 6. So 1.03 accepts values 0x14-0x18 for source, while 1.04 would accept 0x10 to 0x1C.

Value 1.03 range 1.04/2.0 range Button
0x3A 0x38-0x3C 0x34-0x40 back/front
0xAF 0xAD-0xB1 0xA0-0xB5 middle
0x9A 0x98-0x9C 0x94-0xA0 front/back
0x2A 0x28-0x2C 0x24-0x30 attenuate
0x5A 0x58-0x5C 0x54-0x60 back track
0x48 0x46-0x4A 0x42-0x4E forward track
0x16 0x14-0x18 0x10-0x1C source
0x84 0x82-0x86 0x7E-0x8A vol back (preset back with shift on)
0x6e 0x6C-0x70 0x68-0x74 vol forward (preset forward with shift on)

Or, sorted by readback values:

Value 1.03 range 1.04/2.0 range Button
0x16 0x14-0x18 0x10-0x1C source
0x2A 0x28-0x2C 0x24-0x30 attenuate
0x3A 0x38-0x3C 0x34-0x40 back/front
0x48 0x46-0x4A 0x42-0x4E forward track
0x5A 0x58-0x5C 0x54-0x60 back track
0x6e 0x6C-0x70 0x68-0x74 vol forward (preset forward with shift on)
0x84 0x82-0x86 0x7E-0x8A vol back (preset back with shift on)
0x9A 0x98-0x9C 0x94-0xA0 front/back
0xAF 0xAD-0xB1 0xA0-0xB5 middle

You can read these values by issueing the following commands while in the shell (with the player not running):

stty -echo raw 19200 < /dev/ttyS0
od -txC -v -w4 /dev/ttyS0 
command byte optimal R minimal R maximal R button
hex dec
3a 58 6477 5635 7372 back/front
af 175 48125 43233 53811 middle
9a 154 33545 30430 37053 front/back
2a 42 4338 3616 5101 att
5a 90 12000 10807 13283 back track
48 72 8656 7683 9695 fwd track
16 22 2077 1473 2714 source
84 132 23610 21488 25949 vol back
6e 110 16690 15152 18360 vol fwd


The minimal/maximal figures are for 2.* software, 1.* is more restrictive.

Using standard resistor values to get as near as possible to the optimal values, you can use the following circuits:

Series
function ideal resistors actual
vol+ 16690 12K + 4K7 16700
vol- 23610 18K + 5K6 23600
track+ 8656 8K2 + 470 8670
track- 12000 12K 12000
front/back 33545 33K + 560 33560
middle 48125 47K + 1K2 48200

Parallel
function ideal resistors actual
source 2077 5K6, 3K3 2076
att 4338 56K, 4K7 4336
back/front 6477 18K, 10K 6429

The plug itself is simply a standard 3.5mm stereo plug with the following connections:

Tip ("right"): resistor sense
middle sleeve ("left"): shift sense
ring ("common"): ground.

Pretty simple interface, right?


Contributed by Sven Müller (www.incase.de)

Back to Top


Copyright © 2001-2018 riocar.org
All logos and trademarks on this site are property of their respective owners. The comments are property of their posters.