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.
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
i bought a null modem serial cable and tried to use it but it doesn't work (i tried minicom in linux-to-linux and hyperterminal in windows-to-windows setup).
so i was googling and found virtual null modems. anyone knows if theres a reliable and free implementation?
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.
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195
Rep:
What exactly are you trying to achieve? What devices do you try to connect. What kind of data you are trying to send? What are the connectors on both sides? (9-pin F, 9-pin M, 25 pin F/M? etc)
This might be both an application problem (the program which talks to the other program) or a hardware problem with missing handshake signals, or crossed Rx and Tx lines.
If you say you bought a null modem cable, I assume no handshake is needed (therefor it is called null modem) which leaves the eternal Tx/Rx line problem.
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.
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.
Between two Linux PCs I normally start a getty in inittab to allow a serial login on one PC and use whatever I wish to connect from the other.
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.
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.
Also since one computer has 3 serial ports are you sure you are using the correct connector?
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:
cat </dev/ttyS0
On the other node, type,:
echo hello >/dev/ttyS0
You should see the text on the receiver node.
Quote:
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.