Question

I'm trying to get a simple serial reader going in C# to read info from an rs232. I'm using VS2008. I can receive data fine with HyperTerminal and python but I keep getting parity errors every time I try to transmit a character to C#. Number's work fine, it's just the characters. It's configured exactly the same as HyperTerminal: 9600baud, 1 stopbits, no parity, no handshakes. What could be causing only the characters to mess up and not the numbers?

Was it helpful?

Solution

How can you have parity errors when the configuration is "no parity"?

Are you seeing failures of a checksum stored in the data stream (as opposed to RS-232 parity bits)? Are you getting exceptions when using the C# serial port class?

Show some data dumps.

You might also try realterm, which can show you the hexadecimal value of raw characters received. It's also easy to convert C# byte arrays into hex. Then compare both to see if characters are missing or changed or what the actual problem is.

We can't suggest any solutions until the failure is described a little better.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top