views:

285

answers:

3

Hi,

I have plugged in a RS-232 cable to my PC to do a C# program to read from the port. If i open the 'HHD Free Serial Port Monitor' and try to monitor the Serial Ports, it does not show any activity for that port. If i run 'Terminal.exe', and point to that port, it shows me data flowing in.

Is there some difference between Terminal port and Serial port ? Why this difference ? Can i use the .NET SerialPort class to open this port ?

Thanks, Chak.

+2  A: 

I think the Terminal.exe program raises the RTS/CTS pin in the connector, signaling that it has opened the port to the outside data source. (Or maybe your serial port monitor program is not working.)

To answer your other more general questions: An RS-232 port is a "Serial Port". A "Terminal" is what was historically plugged into a serial port, so another common name for it was, indeed, "Terminal port".

Teddy
+1  A: 

Yes, you can use .NET's SerialPort to access the COM Port (RS232). I assume you can monitor activities via "terminal.exe" and none via your own C# program?

Will be good to post your codes.

Meanwhile there are lots of sample codes on this topic, e.g.:
Communicating with Serial Port in C#

o.k.w
+1  A: 

There is no difference between the two, RS232 in fact, if you read the definition here on Wikipedia, note 'RS-232 (Recommended Standard 232) is a standard for serial binary data signals connecting between a DTE (Data Terminal Equipment) and a DCE (Data Circuit-terminating Equipment)'

This would explain your confusion over terminal port and serial port.

Serial means sequential, i.e. when you send data over a serial port via serial cable, one bit at a time is being transmitted. The protocol uses Ready To Send and Clear To Send handshake protocol.

Nowadays, serial is superseded in decline, but still used, as the result of USB which has taken over by popularity. (Thanks Adam Robinson for his point out). There are some devices that are serial such as an Electromagnetic Card Reader, to name but a few. The reason there is a serial comms control was that the workaround to serial communications under .NET Framework 1.1 was kludgy and horrible - it involved a lot of p/Invokes to get it to work. There are still some oddities with the Serial port control in .NET 2.0 in that sometimes it does not fire an event when data is received. Sadly, it has not being fixed or that I know of.

Hope this helps, Best regards, Tom.

tommieb75
Not to be pedantic, but "serial" has not been superseded by USB (indeed, USB stands for "universial serial bus" and all devices that communicate over that bus do so in a serial fasion), RS232/COM ports have been.
Adam Robinson