cheking RS232 - Page 1
Forum section: electronics / repair

author: Eliza
author_rank: Contributor
timestamp: January 07, 2021, 03:53:00 pm
content: Hello,I want to check my computer 's RS232 to know it works properly or not.What are the ways to test it?

author: drvtech
author_rank: Regular Contributor
timestamp: January 07, 2021, 05:21:11 pm
content: Get yourself a serial terminal program such as Realterm. Make sure it is configured for no software flow control and no hardware flow control. Connect together TxD and RxD (pins 2 and 3 on a 9 pin D connector). Anything you type into the Realterm window (you need to click in it first) should appear on the screen.

author: Eliza
author_rank: Contributor
timestamp: January 07, 2021, 09:45:49 pm
content: Thanks a lot dear drvtechBut should I connect RX and TX together by a wire?Dones't RS232 need to be connected to other device like switch that Realterm can send and receive data?Because i used another software befor , that it didn't send any data when RS232 didn't connect to another device

author: HB9EVI
author_rank: Frequent Contributor
timestamp: January 07, 2021, 09:47:57 pm
content: such a TXD-RXD connection is called loopback; you can solder a d-sub connector where RXD-TXD, CTS-RTS and DTR-DSR are joined together so that you can check hardware handshake too. Such a connector allows you to test the local serial port without having a DCE connected (what normally doesn't help in diagnostic of the serial port)

author: Eliza
author_rank: Contributor
timestamp: January 08, 2021, 09:13:38 am
content: If I want to check another RS232 that use in other device like switch, how can I test it? Should I connect those pin together and connect it to computer to see send and receive data in Realterm software?

author: innkeeper
author_rank: Unknown
timestamp: January 08, 2021, 09:45:40 am
content: that gets a bit more complex.some devices need rts/cts and dsr/dtr others do not.some use xon/xoff protocol for flow control.you can first spoof the hardware flow control to test it like this:you can connect rts to cts and dsr to dtr on the device side and on the terminal side ... that will spoof the hardware flow control on both sides if it is using it.. then connect tx on the device to rx on the terminal and rx on the device to tx on the terminal. some devices use the CDC line so you might need to tie the DCD to DSR/DTR also.later you should figure out if the device uses hardware or software flow control.some devices do not use rts/cts and/or dsr/dtr and/or dcd. some use hardware flow control, some software flow control some both. and some neither.there is a device called an rs232 breakout box, which gives you pins to jumper on it to help you figure all this out when testing. the fancier ones have led's so you can see what's active.

author: Eliza
author_rank: Contributor
timestamp: January 08, 2021, 12:28:11 pm
content: i am really confused.I have a switch that it use RS232. And the computer have RS232 too. You mean I should connect the RX of switch to TX of computer with a wire?can't I use the RS232 cable to connect these pins together? Instead of connect them with a wire?

author: drvtech
author_rank: Regular Contributor
timestamp: January 08, 2021, 04:12:44 pm
content: My initial reply was to show you how to check that the RS232 port on your computer was working ok. To explain that a little more - with a serial connection like RS232 you have two almost completely separate devices in your computer : 1) there is the keyboard which converts key presses into RS232 signals ; 2) the display which converts RS232 signals into visible characters. The easiest way to check that they are both working is to connect them to each other. When you press a key, that gets converted into an RS232 signal as in 1) above. Because the RS232 output is connected to the input, this gets fed back into the display where it is converted from an RS232 signal into a displayed character. So in summary, if you press the 'A' key and everything is working, you will see an 'A' or an 'a' on the display.The whole purpose of all of the above is just to check that the RS232 port on your computer is working properly.Of course, just using the RS232 port to see characters that you are typing is pretty useless. What you need the RS232 port to do is to send characters to another device (in your case this is a switch) and to be able to see what the switch sends back to you. So, instead of connecting the computer's TxD pin to its RxD pin you connect the TxD pin from the computer to the RxD pin of the switch and connect the TxD pin from the switch to the RxD pin of the computer. Now your key presses get sent to the switch and the switch's response appears on your computer.Unfortunately this is not all you have to consider when connecting two devices. The other main one is the speed at which the two devices expect to communicate. This is referred to as the Baud rate. Typically it will be 9600 but could be anything from 300 to 115200. Actually it could be even higher or lower but this is very unlikely for a switch. If the two devices are not set the same then you will get either nothing at all or complete gibberish. The manual for the switch will tell you what speed it uses and you can change the speed of your computer to match this.Sorry if this is very simplistic but you seemed to be having difficulty understanding. Hope this helps. You might want to tell us what switch you are trying to connect with.

author: Eliza
author_rank: Contributor
timestamp: January 08, 2021, 04:49:50 pm
content: I realized finally.Thanks all to help me

author: innkeeper
author_rank: Unknown
timestamp: January 13, 2021, 07:33:20 am
content: to keep things simple, you can look for something called a null modem cable.