[Show all top banners]

phantom
Replies to this thread:

More by phantom
What people are reading
Subscribers
:: Subscribe
Back to: Kurakani General Refresh page to view new replies
 linux machine to linux machine
[VIEWED 5523 TIMES]
SAVE! for ease of future access.
Posted on 03-08-07 10:38 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

I am connecting two linux machines via serial ports (RS232). How do I make sure the two are communicating? This is what I did:

Machine 1:
[root]# cat ttyS0

Machine 2:
[root]# echo "test" > ttyS0

Machine 1 would not display the content though. Are their other ways to test if the connection is working? Any insight will be much appreciated.
 
Posted on 03-09-07 12:10 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Im not sure ....but I think you might need a twisted wire for that....twist two pairs of connections in the serial cables....the receiving of one should go to the sending port of the other and vice versa......

mount the two ports and see if that works.....

never tried it myself....!!!
 
Posted on 03-09-07 12:28 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Thanks for the reply. I have the hardware set up already. I used a female-female DB-9 serial connector to connect the two machines. I just wanted to see if they communicate.
 
Posted on 03-09-07 12:40 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

You might need to fix the cables you have to communicate to each other....the pin setting on a DB9 connector is set in such a way that one of the pin (pin2) is set for transmitting signal and one pin (pin3) for receiving signal which goes directly to the other side of the cable.....But you want the receiving end of one of the computers to go to the transmitting pin of the other and vice versa for the sending pin.

So you might need to switch the pin setting on the cable if you're using a straight through db9 cable.....I think!!!!

At least thats how it works in the ethernet RJ45 cable.
 
Posted on 03-09-07 12:45 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Here is a figure of the pin setting:





RS232 Connections, and wiring up serial devices


















RS232 Pin Assignments (DB25 PC signal set)
Pin 1Protective Ground
Pin 2Transmit Data
Pin 3Received Data
Pin 4Request To Send
Pin 5Clear To Send
Pin 6Data Set Ready
Pin 7Signal Ground
Pin 8Received Line Signal Detector
(Data Carrier Detect)
Pin 20Data Terminal Ready
Pin 22Ring Indicator

 
Posted on 03-09-07 12:51 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Ok may be I was not clear in explaining my problem. I have connected the two PCs already via RS232. All I need to see now is if the two PC's communicate. Like in XP machines, we can use ''Hyperterminal" to send or receive files. How do I send information from one linux machine and see if the other linux machine gets it or vice versa.
 
Posted on 03-09-07 12:52 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

actually...I might be totally wrong......
Here is something I just got online....

http://www.dcbnet.com/notes/0006etherpathredirect.html
 
Posted on 03-09-07 12:57 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

just a thought:

the 'COM' ports are /dev/ttyS0 through /dev/ttyS3, corresponding to COM1
through COM4 ...so maybe try the other three ports too???
 
Posted on 03-09-07 1:00 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

I made it sure through the motherboard manual that the ports I am using to connect the two PCs are COM1 ie. ttyS0. Thanks anyways.
 
Posted on 03-09-07 1:10 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

let me know if you manage to fix it....Id be interested in the solution!!!

Something i'd really be interested in is to send a signal through the serial port to a linux box instead of the keyboard.
 
Posted on 03-09-07 3:32 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

the best way to hack linux/unix is RTFM ...

also If u haven't tried this [http://tldp.org/HOWTO/html_single/Serial-HOWTO/] yet,
take a look at it......
 
Posted on 03-09-07 8:52 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

.

Probably you were looking for a code as such ?
http://www.comptechdoc.org/os/linux/programming/c/linux_pgcserial.html
____________________________________________________________

If i were you, i would try with few things first!

Machine 1:
[root]# cat /dev/ttyS0

Machine 2:
[root]# echo "test" > /dev/ttyS0

for COM1 ,that is! on both machines!

and i would vary the BAUD RATE with the stty -F /dev/ttyS0 9600 and so forth to verify as well!

# man stty
[ You'd love this Page! ]

Do let us know , how you did that as well once you are done!
 


Please Log in! to be able to reply! If you don't have a login, please register here.

YOU CAN ALSO



IN ORDER TO POST!




Within last 7 days
Recommended Popular Threads Controvertial Threads
I hope all the fake Nepali refugee get deported
All the Qatar ailines from Nepal canceled to USA
MAGA मार्का कुरा पढेर दिमाग नखपाउनुस !
Travel Document for TPS (approved)
MAGA and all how do you feel about Trumps cabinet pick?
Those who are in TPS, what’s your backup plan?
NOTE: The opinions here represent the opinions of the individual posters, and not of Sajha.com. It is not possible for sajha.com to monitor all the postings, since sajha.com merely seeks to provide a cyber location for discussing ideas and concerns related to Nepal and the Nepalis. Please send an email to admin@sajha.com using a valid email address if you want any posting to be considered for deletion. Your request will be handled on a one to one basis. Sajha.com is a service please don't abuse it. - Thanks.

Sajha.com Privacy Policy

Like us in Facebook!

↑ Back to Top
free counters