# What kind of serial cable do I need? (TTL vs RS232)

So I have a headless NAS that I'm trying to connect to via a serial console so I can install a different OS. It has a 3.5mm jack on the back I/O labeled COM1.

I had a USB->TTL cable I had used for a raspberry pi that has 5V for the power, and 3.3V for the RX and TX pins. I cobbled together a USB-> 3.5mm cable by splicing a 3.5mm aux cable to the TX,RX,GND pins and while I get stuff printed to the console, it's all gibberish. I've read that this is usually due to an incorrect baud rate, but after checking the serial port settings on the NAS via an SSH connection, I can confirm that I do have the correct baud rate. I've also messed with all of the other settings like the # of bits, parity, stop, etc and haven't been able to get anything legible.

After posting this question over on the UNIX stackexchange, someone suggested measuring the voltages to make sure it's really TTL vs RS232 levels, and seeking advice over here. The voltage of the 3.5mm port on the NAS gives almost -6V (it usually jumps to -6, then drops to 5.9/5.8), which from reading more about RS232 vs TTL leads me to believe that what I need is RS232 levels since RS232 uses negative voltages and TTL doesn't, am I correct in that assumption?

I came across this question on this site regarding serial cables, and although I'm still fairly confused by all of this, I think I either need a USB->3.5mm RS232 cable (if they exist), or 2 cables: USB->RS232(DB9) and RS232(DB9)->3.5mm.

Am I on the right track with this? I appreciate any help anyone can give. Also, if anyone could recommend a good quality cable too I would be most appreciative, since that's another issue that's come up in my searches.

I can also provide pictures of the board if needed. It's a QNAP TS-963X and unfortunately I haven't been able to find any information or schematics or anything on the motherboard online. Searching what appears to be serial or model numbers don't yield anything relevant.

• TTL has negated signal convention compared to actual RS232 convention. A NOT gate may be required between the devices. See the waveforms on this link. In UART standard (on AVR), level 1 corresponds to high voltage (5V, TTL) while for RS232 level 1 corresponds to low voltage (negative voltage, maybe -12V). Clearly there is a need for a "converter" between the two. Fortunately, we do not need to design this bridge ourselves because there are dedicated ICs. MAX232 is one of the most used UART-RS232 switch ICs. virtual-serial-port.org/article/avr-and-pc-communication
– AJN
Jul 7 '20 at 15:54
• The negation may not be applicable if both devices are working in TTL voltage levels. The data sheet of the level shifter shows that inversion is involved. maximintegrated.com/en/products/interface/transceivers/…
– AJN
Jul 7 '20 at 15:55
• By design, the TTL and bipolar RS-232 level signals are inverted yet use the same voltage threshold for binary logic. That level is two diode drops or Vbe drops of 1.3V +/0.1 due to temp. So you could use a MAX232 chip for max baud rate signal integrity which is probably overkill for this or a pair of TTL inverters or any logic inverters practically. Use a suitable series resistor added for current limiting e.g. for CMOS 10K and this is then clamped by the ESD protection diodes to the safe voltage. Any connector and CAT3 phone cable or better will do. Jul 7 '20 at 16:00
• Wuubb, it appears you really do have RS-232 levels. RS-232 uses mark and space. A mark is defined as any line voltage (referenced to the signal ground) from -3 V to -15 V (receivers, though, must tolerate -25 V.) Any line voltage (referenced to the signal ground) from +3 V to +15 V (receivers must tolerate +25 V) is a space. Voltages between -3 V and +3 V are in the transition band and are undefined. Where appropriate for consideration as a data bit, a space is 0 and a mark is 1. The lines idle at mark, initiating by transmitting a space for one bit time.
– jonk
Jul 7 '20 at 16:25
• Wuubb, also see here for a common method used to interface TTL and RS-232. It cheats by depending upon sufficient periods of mark needed to charge/sustain a capacitor's negative voltage used to transmit back to the RS-232 device. But it has served well in many cases. A more professional approach, though, would properly supply the right voltages at all times.
– jonk
Jul 7 '20 at 16:33