Hello,
I'm using OpenNETCF.IO.Serial.GPS on a Pharos Windows Mobile 5 device, with C#, .NET 2.0, and Visual Studio 2008.
I had a problem connecting to any devices. Whenever I tried to open a COM port, I would get an error. I tracked the problem down to the devices() method in GPS.cs. It has this line:
// fudge to remove rubbish off the end of the string
strport = strport.Substring(0,strport.IndexOf("'"));
If the port name in the registry doesn't contain an apostrophe, this causes an exception. On my platform devices did not have any rubbish at the end of the string, so it could never find any devices. I changed it to this:
// fudge to remove rubbish off the end of the string
if (strport.IndexOf('\'') != -1)
{
strport = strport.Substring(0,strport.IndexOf('\''));
}
and now the code works perfectly. Thanks!
Also, are there plans to include GPS/NMEA functionality in OpenNetCF 2.x?
Thanks again!
----Scott.