Wednesday, May 7, 2008

C# RS232 Weather stations and com0com

Not being able to leave well enough aalone, i had to try and build some software to talk to the Weather station.
First Things first - I know C# - so i had to track down some example code.
Found http://www.codeproject.com/KB/system/rs232ThreadSafe.aspx
Installed com0com a virtual null modem cable driver.
It installs CNCA0 and CNCB0 ports - Turns out C# doesn't like ports named like that.
I ran the cocm0com setup and reamed the ports com15 and 16.

Ran two instances of the software and voila both instances talked to each other.
Now I have to go home and plug into the weather station and see what I can see.

Other code i found
http://www.codeproject.com/KB/dotnet/DotNetComPorts.aspx
http://www.codeproject.com/KB/cs/weatherlink.aspx
http://www.codeproject.com/KB/cs/serialcommunication.aspx
http://www.codeproject.com/KB/cs/GpsMapping.aspx
http://www.codeproject.com/KB/cs/Serial_port_tester.aspx
http://www.codeproject.com/KB/IP/SerialCommunication.aspx

Have to install the coc0com hub and try talking to the WS with a couple of programs... more info and code to follow.


No comments: