[Solved] Help determining the pinout of a bastardized RS-232 cable (Now with photos!)

Discussion in 'Electronics & Electrics' started by trackhappy, May 25, 2014.

  1. trackhappy

    trackhappy Member

    Joined:
    Dec 29, 2009
    Messages:
    2,356
    Location:
    Caboolture, QLD, 4510
    So about a year ago I picked up an Aten CS1734B KVM switch out of an old parts bin with all the cables (sans one) attached, and thought it'd be dead. Got home, plugged it in, nope, it works fine. I just scored nearly $200 worth of KVM for nothing. Sick!

    However, the keyboard I use mostly with it, my Logitech K400, doesn't work with it properly. This may have been fixed with a firmware update, and using a standard keyboard, I know that the firmware on this particular KVM is quite a few versions out of date.

    I need a firmware upgrade cable. Here's the problem. There are actually two hardware revisions of this KVM switch. One which uses a bastardized RJ-11/12 cable, which you can find aftermarket cables for, I think I even found a pinout somewhere (this was months ago), and one which uses a bastardized 3.5mm TRRS (I believe) headphone jack. Guess which one I've got. :rolleyes:

    I emailed Aten asking if they provided cables aftermarket, and the response was "I'll get our supplier to contact you". Never thought I'd see the day until a week later when the supplier emails me. "We don't normally do this, but I can sell you a cable for $20" or $25 or whatever it was. $20 for a cable I'm only going to use once, maybe twice? Felt like telling him to take a running jump.

    ANYWAY on to the question.

    Is there a way I can determine the pinout of the headphone jack so I can make my own cable? I know it talks RS-232, but that's about it. I think it has 4 conductors, 5 if you count the grounding plane.

    Can I hook a TRRS headphone cable up to a breadboard and have the breadboard also hook up with the COM port on the computer? More importantly, can I do this without killing something? Is the worst thing that can happen "it won't work until you find the right pinout?"

    I can take the KVM apart for photos if anyone needs a reference to what I'm talking about, fortunately this KVM is easy to pull apart (and put back together).

    Cheers.
     
    Last edited: May 28, 2014
  2. @rt

    @rt Member

    Joined:
    Nov 30, 2005
    Messages:
    2,311
    Ideally, yes, real RS232 is supposed to be short tolerant, and in my experience
    since Amiga days, don't remember ruining any serial port with breakout boards.
    Don't cry to me if you break something though :D

    If it really is a RSST 3.5mm, that only has 4 conductors.
    One of them will be ground, one will be Rx, another possibly Tx, and if the other (if used), it could possibly be a guesswork pin.
    If the device is any good it will need to communicate checksums back to the programmer to verify data for a firmware upgrade I'd say.

    The programmer will likely be the thing that initiates communication,
    and the KVM likely not transmit anything until it receives something from the programmer or programming software.
     
  3. aXis

    aXis Member

    Joined:
    Jun 27, 2001
    Messages:
    5,085
    Location:
    Kalgoorlie, WA
    If you can pop the case on the KVM it would help heaps. That will let you see if it's a 3, 4 or 5 conductor jack.

    My bet is it's a 3 conductor, with RX, TX and gnd.

    The GND will be easy, it will have close to 0 ohms to any other metal part on the KVM. The TX pin will also be easy, it will sit at logic level 0 which should be +3 to +15V, and will be capable of supply a few milliamps short circuit current (e.g. it can light an LED dimly). The last remaining pin will then be RX.
     
    Last edited: May 26, 2014
  4. Life_Essence

    Life_Essence Member

    Joined:
    Mar 4, 2010
    Messages:
    1,495
    I find it strange that it would be 4 conductor. 3 and 5 yeah. 3 being Rx Tx and Signal Ground and 5 would be Rx Tx Signal Ground with the addition of CTS and RTS.
    I've never seen destroyed devices by wiring serial ports wrong. Even CAN and +12V wiring through Rx and Tx.
     
    Last edited: May 26, 2014
  5. SLATYE

    SLATYE SLATYE, not SLAYTE

    Joined:
    Nov 11, 2002
    Messages:
    26,810
    Location:
    Canberra
    Have you opened up the KVM? There might just be a standard chip in there (eg. an ATMega controlling a mux). If there is then you can just grab the chip pinout and find the TX/RX pins directly.

    Edit: you may well find that the pins are something like TX, RX, RTS, CTS with RTS being used as a reset line to get the chip into bootloader mode.
     
    Last edited: May 26, 2014
  6. OP
    OP
    trackhappy

    trackhappy Member

    Joined:
    Dec 29, 2009
    Messages:
    2,356
    Location:
    Caboolture, QLD, 4510
    Hey guys. I've stripped it down, and the closest thing is a GAL16V8D-15LJN, which looks like a CMOS chip. There's a 74HC on the back, but both of these ICs are rather remote.

    I'll take a few photos tomorrow once I've had some sleep. There are 5 joints in a sort of horseshoe shape, I think 2 go to the grounding plane, so it looks like there are maybe only 3 pins, TX, RX and GND.

    I'll have a probe around tomorrow but I only have a multimeter, so I guess the best I can do right now is just find out where the grounds are. I can't really see where the traces go, but I am rather tired. Also not helped by the fact that there's a board-to-board header right next to the jack in question...

    Cheers.
     
    Last edited: May 27, 2014
  7. OP
    OP
    trackhappy

    trackhappy Member

    Joined:
    Dec 29, 2009
    Messages:
    2,356
    Location:
    Caboolture, QLD, 4510
    Photos! Click for full size! This is about the best I could do with the best macro lens I've got, the kit lens. :sick:

    A quick probe has revealed that:

    I had a probe around and the pinout is odd. Look at the third photo: there appear to be two ground contacts, one is the middle, with J16 silkscreened on top, and to the right of that. The bottom two contacts go to one pin (not ground, and the left-of-centre contact goes to another pin (not ground).

    So I think TX/RX are the top left contact, and the bottom two contacts, when looking at the plug from the photo's angle. The only thing now is finding out which is which. Apply power and check voltage?

    As for a discrete serial interface, I can't see one anywhere. I haven't looked up every single part number, but there aren't many different ICs.

    P.S. don't worry about what looks like a burn mark. That's actually flux that's been made sticky by some IPA I cleaned the board with, but haven't yet removed.

    [​IMG]

    Slightly more detailed look.

    [​IMG]

    The back of the board

    [​IMG]

    A quick look at the other board. There's nothing on the other side of this one.

    [​IMG]
     
    Last edited: May 27, 2014
  8. OP
    OP
    trackhappy

    trackhappy Member

    Joined:
    Dec 29, 2009
    Messages:
    2,356
    Location:
    Caboolture, QLD, 4510
    Hey aXis, I tried probing each pin at the end of the headphone cable and I'm only getting about 300-400mV out of TX/RX. What would this mean?
     
  9. alexi02

    alexi02 Member

    Joined:
    Jan 4, 2006
    Messages:
    30
    Location:
    Brisbane
    I knew I saw that PCB before and yep I have it my pile of boards - I have the 4 port version - don't know if it still works.

    There should be a 3 pin male header with a 2 pin shorting block between the second and third switches at the front - labelled J14, there is a FW upgrade selection on it. Maybe doing that will enable the signal output on the headphone jack?

    There are 3 outputs and the ground to the audio jack so a 4 pin jack, as you said the ground is the middle pin. The others can be found on the resistors ends R1, R2, R6 which link up to the audio jack.
     
  10. OP
    OP
    trackhappy

    trackhappy Member

    Joined:
    Dec 29, 2009
    Messages:
    2,356
    Location:
    Caboolture, QLD, 4510
    Well, this is interesting. It doesn't appear to be a standard 3.5mm TRS socket. If it was, why would Tx and Rx be bridging and creating a loopback when the cable is plugged into the KVM?
     
  11. alexi02

    alexi02 Member

    Joined:
    Jan 4, 2006
    Messages:
    30
    Location:
    Brisbane
    Actually ignore this, the manual says you should only do this if the firmware upgrade failed.

    It wouldn't be a TRS, it would be like the iPhone headset has, 3.5 mm 4-conductor TRRS.
     
  12. OP
    OP
    trackhappy

    trackhappy Member

    Joined:
    Dec 29, 2009
    Messages:
    2,356
    Location:
    Caboolture, QLD, 4510
    Yeah, I'm thinking it's a TRRS, which is what iPhones use.

    I've done more probing.

    Referring to photo 3 again:

    Bottom two contacts go to R2
    Top middle is ground
    Top right goes to R6
    Top left goes to R1

    A pure guess is that R1 and R2 would be Tx/Rx or vice versa, because those resistors are next to eachother. Now I just have to find out what R16 goes to. How can I go about doing that? Keep trying until something works, or is there a signal that's likely to be used, like DCD or DTR etc? I can't just follow the trace somewhere with my multimeter because continuity stops working after the first resistor.

    Oh, and I need to find a TRRS jack. Also having a look at the other audio jacks, they all have only 3 contacts, this one has 5. But what's confusing me is the fact that two of the contacts form a shroud, and that this shroud passes a data signal - it is not ground.

    Thanks guys.
     
    Last edited: May 27, 2014
  13. alexi02

    alexi02 Member

    Joined:
    Jan 4, 2006
    Messages:
    30
    Location:
    Brisbane
    It's possible but you shouldn't make any assumptions.

    Not too sure what R16 has to do with this, maybe you mean R6?
    Can you measure the 1 pin that you didn't before and see what you receive? (maybe easier to re-measure all of them, like R1 - 300mV)

    I think it's that way just to hold the top half of the jack securely on the board.

    Edit: Something is a bit odd here, measure the other side of R1 and R2, they are linked together.
    Edit 2: The manual says that on the OSD there is a firmware mode setting to select to start the firmware updating mode? Page 33, maybe give that a try and see if you see any signals?
    I think R1 ends up to Sig8021 TX (so RS232 RX) and R6 ends up to Sig8021 RX (so RS232 TX) but I could be wrong. R6 has the diode connected to it and seems to line up with this picture - http://www.coolcircuit.com/circuit/rs232_driver/2tr.gif
     
    Last edited: May 28, 2014
  14. kjparker

    kjparker Member

    Joined:
    Jun 28, 2001
    Messages:
    1,370
    Location:
    Sydney
  15. OP
    OP
    trackhappy

    trackhappy Member

    Joined:
    Dec 29, 2009
    Messages:
    2,356
    Location:
    Caboolture, QLD, 4510
    YOU DA MAN!

    I did mean R6, sorry. I had also corrected but I think you were onto me before I edited my last post.

    Anyway, I soldered leads directly to the port...

    [​IMG]

    And wouldn't you know...

    [​IMG]

    I'm pretty sure you had it the right way around. I don't know what R2 does, but apparently it wasn't needed. Just R1, R6 and GND.

    Thanks for all the help guys. My K400 now works properly and I can invoke the OSD!
     
    Last edited: May 28, 2014
  16. DAVIDYORK

    DAVIDYORK New Member

    Joined:
    Mar 13, 2018
    Messages:
    1
    @trackhappy
    Can you tell us wheres colors go to RS232 pinout interface?

    Black is GND. to 5 of BD9
    AND ...Red,Green, and white ?
     

Share This Page