Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I'm not familiar with the RS-232 other than seeing them on some machines - I consider this and terminology like DTE/DCE somewhat obsolete. Are you trying to connect to a network device like a switch or router? You do use minicom for that and I can tell you how.
Basically a NULL modem cable cross links the TX and RX lines (and depending on the cable hardware handshaking). It is need when DTEs i.e. computers are connected together. You need to make sure the serial port settings on each computer are configured the same i.e baud rate, stop bits, parity etc. No hardware handshaking is required. What you type on one computer will be displayed on the other. Unless you enable echo you will not see what you type.
A virtual serial port in a nut shell emulates hardware for communication between applications on the same computer.
As already post what are you trying to achieve?
Even though it is considered a legacy port in the desktop computer world I find it far from dead in the embedded and test equipment world.
I'm not sure about the virtual thing but I can tell you this. I connect a PL-2303 usb-to-serial connector into my laptop and use that to communicate with network devices. It is a male-ending connection. When I plug in the PL-2303 there will be a message in syslog saying where it is assigned in /dev. The PL-2303 usually takes /dev/ttyS0. So I start minicom with root permissions and the -s option. I go to "Serial Modem Setup" and change the /dev/tty8 to /dev/ttyS0 and I change the baud rate to 9600.
Is that the type of information you're looking for? I hope it is.
so i was trying to connect 2 PCs together via a null modem serial cable. the reason i need to get this to work is because some other person's research code i'm looking at produces debugging output on the serial port. but before that, i'm trying to get minicom to work on both computers. the connectors on both ends of the null modem serial cable are 9-pin F.
so, i made sure my serial ports are on in the BIOS, my dmesg | grep ttyS output from one side is :
serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
serial8250: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
00:07: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
00:08: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
0000:00:03.3: ttyS2 at I/O 0xec98 (irq = 201) is a 16550
the other side is similar, just that it has only ttyS0.
i executed minicom on both sides and set both sides with the same settings (baud rate etc) but whatever i type on either side does not appear on the other side.
does it mean that probably the cable i bought is physically broken?
I'm not sure that's what it means. This is going beyond my knowledge so I'm just going to give you some educated suggestions. I'm not sure that when you type on one machine you should see it on the other. For example, when I minicom to a router or switch, I can execute commands but if I have another machine minicom'ed into it I don't see those commands appearing. However, if I execute a command that should produce output, like making a configuration change, the resulting output of that command will appear on any machine that is connected and minicom'ed in. I know you're using another machine and not a router or switch but those are the instances where I have used minicom.
Can you execute a command on one of the machines that will produce output on the other? For example, the wall command?
...so i was trying to connect 2 PCs together via a null modem serial cable. the reason i need to get this to work is because some other person's research code i'm looking at produces debugging output on the serial port...
...i executed minicom on both sides and set both sides with the same settings (baud rate etc) but whatever i type on either side does not appear on the other side.
A serial connection needs a "server" and "client" so to speak.
To connect to one PC with minicom the other needs to be setup to receive serial connections.
If there is supposed to already be output on the serial line, just connect the 2 PCs and try "screen /dev/ttyS0". You may need to install screen, use the serial device of the computer running screen. Maybe that's all you need to see the output.
The cable may or may not be wired for null modem. If you have some type of ohmmeter or cable testing device basically pin 2 on one end will wired to pin 3 on the other. A serial connection does not have to be server client. I use minicom and or hyperterminal between computers all the time and usually it is a no brainer to get working.
Unless you configure the serial port on one of the computers as a console device you will not be able to execute any commands from the other. Routers, managed switches and any similar serial device will echo back type characters but not in this instance unless minicom is configured to do so.
Basically minicom on both computers is configure for the same serial port settings i.e baud rate, parity, stop bits etc (9600,8,N,1). What is typed on one computer should be displayed on the other.
I would probably use echo to test ("ping") a serial port: Next, you need to test your serial connection. On one node, which will be the receiver, type:
On the other node, type,:
echo hello >/dev/ttyS0
You should see the text on the receiver node.
Originally Posted by michaelk
We really do not know this research tool functions but just writing data to the serial port does not mean it has to be configured as a console device.
I am assuming it is not a console but rather somehow just echoing output through the serial port.
Looks like the "cat" command should pick up the debugging output too.