Serial Port ?bug?
I am not sure if this is a bug or something mishandled, but here is my problem:
I have the framework2 using IO.Ports in C# VS2k5
It seems that any byte sent from my device to the PC larger then 4 bits gets turned into a decimal 63(or a hex 3F, "?")
i have no idea why its doing this, or how to go about fixing this...
any thoughts?
[352 byte] By [
Bei] at [2007-12-17]
Hello.
BaudRate mismatch?
You need to match the settings on your to end points. This is almost certainly the result of wrong BaudRate (in fact, doubling or quadrupling it on the PC is likely to do the trick in this case).
The constructor you should use for your SerialPort object is SerialPort (String, Int32, Parity, Int32, StopBits) to clarify your settings. If you do a bit of programming against the serial port, you should use PortMon (www.sysinternals.com/Utilities/Portmon.html) or another port monitoring program (remember to start it before your own app).
"from my device to the PC": In this scenario, I have the best experience with 38400 baud, but higher might be fine, too.Remember that any program communicating via serial ports should do this in a seperate thread. Serial communication is higly blocking by nature.
Hope this helps
Gorm Braarvig