2
\$\begingroup\$

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.

\$\endgroup\$
6
  • \$\begingroup\$ 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 \$\endgroup\$ – AJN Jul 7 '20 at 15:54
  • \$\begingroup\$ 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/… \$\endgroup\$ – AJN Jul 7 '20 at 15:55
  • \$\begingroup\$ 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. \$\endgroup\$ – Tony Stewart EE75 Jul 7 '20 at 16:00
  • \$\begingroup\$ 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. \$\endgroup\$ – jonk Jul 7 '20 at 16:25
  • \$\begingroup\$ 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. \$\endgroup\$ – jonk Jul 7 '20 at 16:33
2
\$\begingroup\$

Based on the voltages being +/- 6V, you need a USB to serial cable that uses RS232 levels (not TTL) and 3.5mm plug. There are several ways you can achieve that, which might include adding RS232 tranceiver to your TTL interface, or direct USB-RS232 adapter that has one buit it. The remaining task is to interface the right connector.

\$\endgroup\$
3
  • \$\begingroup\$ What I was about to say. Getting one which has a DB-9 connector should (I think) ensure proper levels, as it would be expected to work when connected to a PC with proper RS232 voltages (of up to +/- 18V) \$\endgroup\$ – SiHa Jul 7 '20 at 15:56
  • \$\begingroup\$ Do USB->3.5mm cables with RS232 levels even exist? All I'm finding are TTL ones at either 3.3 or 5V. I might go with the 2-cable approach just to be sure. \$\endgroup\$ – Wuubb Jul 7 '20 at 18:11
  • \$\begingroup\$ It's quite common to have RS232 over 3.5mm, but generally they're meant for manufacturer debug / service, rather than for consumer use, so it's unlikely you'll find a pre-made cable. \$\endgroup\$ – SiHa Jul 8 '20 at 5:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.