I'm not an expert in serial communication, and it was a long time ago I tried it. My immediate goal was to connect to the service processor on a SUN Sparc T5140, but since this I have tried to connect to multiple devices, and same results every time. I get a blank screen/terminal, the cursor is not moving, nothing happens on the screen/terminal.

I got a strait connection cable(null modem cable) between the host (also tried different hosts) and the target, connected to a 9-pin serial port.

I have checked which port it is I'm using, in this way:

0: uart:16550A port:000003F8 irq:4 tx:0 rx:0 RTS|DTR
1: uart:16550A port:000002F8 irq:3 tx:0 rx:0

Through this I can see that it is the ttyS0 that has an electrical connection.

I have also, of coarse, tried different modes/speeds, etc.

I have tried different clients, like minicom, screen and putty, and all end up in this empty screen/terminal, that is showing nothing and doesn't take any input. There are more clients I haven't tried, but I feel there is no need for that, the problem is elsewhere.

I have considered the cable, but I bought it today, from a store I trust, and I think that since it is showing electrical connection, it should be right...? But here I am unsure...

If I use something else than ttyS0 or ttyS1, screen says this:

[root@tc1 ~]# screen /dev/ttyS2
[screen is terminating]

Which I guess must mean there is no communication or no device configured.

Just a screenshot from my empty terminal

closed as too broad by Rui F Ribeiro, Isaac, Archemar, RalfFriedl, schily Oct 24 '18 at 9:41

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    Note that a straight cable is NOT a null modem cable. A null modem cable has at the least the Rx and Tx lines crossed, perferably also DTR to DSR and vice versa, ditto for RTS / CTS. I also don't see why you think that line (where does it come from?) is telling you that you have a connection; DTR and RTS are outgoing signals (data terminal ready, ready to send). – wurtel Oct 23 '18 at 14:01
  • Sorry for using the word "strait cable", what I meant was a simple cable with 9-pin connector on both sides. It is a null modem cable, according to the shop, which I trust. – Jokra Oct 23 '18 at 14:35
  • The RTS | DTR is significant, because I can see which one is connected. I compare the output from when it is connected and when it is NOT connected, and in that way I can see that I use the right ttyS0 or ttyS1. [root@tc1 ~]# cat /proc/tty/driver/serial serinfo:1.0 driver revision: 0: uart:16550A port:000003F8 irq:4 tx:0 rx:0 RTS|DTR 1: uart:16550A port:000002F8 irq:3 tx:0 rx:0 So here I can see the "port:000003F8" is the right port, which is ttyS0. Did you have anything to contribute to help me...? Or did you just wanted to pinpoint my eventual mistakes...? – Jokra Oct 23 '18 at 14:43
  • Are you connecting serial port 0 to serial port 0 on two Linux systems and running minicom to connect to /dev/ttyS0 on each, or some other configuration? – Mark Plotnick Oct 23 '18 at 15:26
  • I have TRIED to connect to the service processor(through the serial port) to a SUN Sparc T5140, and tried also an EMC SAN switch as well as a router and an ethernet switch. – Jokra Oct 23 '18 at 15:56

Through this I can see that it is the ttyS0 that has an electrical connection.

I'm sorry, but you're mistaken here.

The RTS and DTR signals only indicate that something is activating the port on the local side, i.e. that there is screen, minicom, ModemManager, agetty or a similar program running on the port on your computer. They tell nothing at all about the remote side, since both are outgoing signals. Use fuser -u /dev/ttyS0 as root to get the PID of the local process that is activating the port.

If you don't believe me, run screen /dev/ttyS1 and while it's running, run cat /proc/tty/driver/serial again in another window. You should now see the ttyS1 RTS and DTR signals active too.

The CTS and DSR signals, on the other hand, would indicate two things:

  • the cable actually has those lines connected (some serial cables only have three wires: incoming data, outgoing data and ground) in some way
  • if the CTS and DSR signals appear alone, without RTS and DTR, then and only then it would indicate there is something on the other end for sure. Some null modem cables connect local DTR to local DSR and local RTS to local CTS in each connector, as a workaround for the situation where the device at one end must use hardware handshaking, and the device at the other end cannot do that. In that case, the incoming CTS and DSR signals would always appear as soon as the port is powered up and the outgoing RTS and DTR signals are asserted, even if the other end of the cable was not connected at all.

Frequently, you must also have the parameters of the serial connection right before it works at all. The most common variable is the baud rate (speed) of the connection: on a console port of a T5140 I'd first try 9600 bps. Other devices might also use 38400 or even 115200 bps; those are the most common values in my experience.

The other parameters are the number of data bits (8 is the most common value today), parity ("none" is the most common), and the number of stop bits (1 is the most common).

Even if you have all the parameters correct, the other end might not send anything until it gets some valid characters as input. So, once you've started your screen or minicom, press Enter once or twice.

Most serial console connections work on the "remote echo" principle: when you type something, the characters typed are just sent out the serial port without displaying them on the screen. Only when the remote end echoes the characters back will they be displayed. This allows for things like entering passwords without them being visible on the screen (as the remote end just disables the echo function for password input), and tells you that the characters you typed are correctly received.

On serial connections that are not intended for human use, this remote echo function may be omitted: if you are troubleshooting such a connection, you might want to activate the "local echo" function in your terminal emulator program (Q in the "screen and keyboard" settings section in minicom, for example). If you have both local and remote echo in effect simultaneously, anything you type appears ddoouubblleedd on your screen.

  • That was VERY good informations....THANKS! I'll follow that up.... – Jokra Oct 24 '18 at 6:47
  • Yes, the console port of the T5140 wants 9600bps/8 data bits/no parity/1 stopbit. Since this is the most common config, it surprise me that I don't get a connection. – Jokra Oct 24 '18 at 6:59

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