0
votes

I need to connect 2 linux PCs via serial port. I used serial connector cable (null modem cable) to connect 2 linux PCs. But now how can I establish the connection I mean how can I test whether they are connected or not. Can anybody Please let me know the procedure.. I have tried screen command and when i run

screen /dev/ttyS0

This command is just opening new screen and i cant do anything on that new screen.

Am using Fedora-20 with kernel version 3.* in one PC and another one with Fedora-27 kernel version is 4.13

1
cat /dev/ttys0 at one end and echo wtf > /dev/ttys0 at the other. - Niall Cosgrove
what is expected output it should print that wtf message in that system where I executed cat command right?? but this is not printing that message ... what went wrong ... - BHANUMATHI H M
Insufficient information to answer that. Cable not connected? Cable not wired properly? Either com port not configured correctly? 8-N-1 is the standard configuration. etc. etc. Google is your friend. This question is probably off topic here. - Niall Cosgrove
Cable is connected, and it is wired properly.. and i haven't done any configuration I am searching but did not get correct procedure .. any ways thanks for your suggestion if you know about configuration please share. - BHANUMATHI H M
minicom is a tool that will help you. run it at both ends, and use it to configure your ports. - Niall Cosgrove

1 Answers

1
votes

Hi finally i found solution to my problem Using this_link.

at both ends tried below steps:

1) yum install minicom

2) Then I configured minicom using minicom -s then using down arrow selected serial port setup then pressed A from keyborad to change that serial device from

/dev/modem

to

/dev/ttyS0

press enter and chose save as dfl option then exit from minicom

After these configuration steps executed the commands suggested by @Niall Cosgrove

at one end executed cat /dev/ttyS0

at other end executed echo hello > /dev/ttyS0

finally i got hello message from one pc to other end using serial port:)