[VIEWED 5523
TIMES]
|
SAVE! for ease of future access.
|
|
|
phantom
Please log in to subscribe to phantom's postings.
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.
|
|
|
|
DC_virus
Please log in to subscribe to DC_virus's postings.
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....!!!
|
|
|
phantom
Please log in to subscribe to phantom's postings.
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.
|
|
|
DC_virus
Please log in to subscribe to DC_virus's postings.
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.
|
|
|
DC_virus
Please log in to subscribe to DC_virus's postings.
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 1 | Protective Ground | Pin 2 | Transmit Data | Pin 3 | Received Data | Pin 4 | Request To Send | Pin 5 | Clear To Send | Pin 6 | Data Set Ready | Pin 7 | Signal Ground | Pin 8 | Received Line Signal Detector (Data Carrier Detect) | Pin 20 | Data Terminal Ready | Pin 22 | Ring Indicator |
|
|
|
phantom
Please log in to subscribe to phantom's postings.
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.
|
|
|
DC_virus
Please log in to subscribe to DC_virus's postings.
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
|
|
|
DC_virus
Please log in to subscribe to DC_virus's postings.
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???
|
|
|
phantom
Please log in to subscribe to phantom's postings.
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.
|
|
|
DC_virus
Please log in to subscribe to DC_virus's postings.
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.
|
|
|
koney
Please log in to subscribe to koney's postings.
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......
|
|
|
oldmaven
Please log in to subscribe to oldmaven's postings.
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!
|
|