Bug on GPS.NET 3.0.1

May 11, 2010 at 5:10 AM

Hi there,

I just discovered a bug in detecting serial devices in GPS.net latest version, which the getregistry key for devices COM port ends with the character ':' that resulting unable to detect serial devices. I used the source code and recompile using string TrimEnd function to trim out the character ':' and successfully detect my device without error. So someone in charge may can correct this issue soon.

 

Thanks

Bernad

Developer
May 11, 2010 at 2:38 PM

This behavior is by design.  Some systems require the colon suffix on COM port names, while other systems don't allow it.  So, GPS.Net uses a two-pass approach when detecting serial devices.  On the first pass, it omits the colon suffix.  If the first pass completes without discovering any devices, then a second pass is made, this time with the colon suffix added.

You can see this in the BeginSerialDetection method of the Devices class.  The method accepts a boolean parameter named omitColonSuffix that determines whether the colon is appended or not.

 

May 11, 2010 at 5:00 PM

Hi there,

I see, thanks for enlightening. But the version i downloaded, either with the source code or the compiled release binaries, I faced the error without the logic of switching the colon suffix. Means that everytime i try out Devices.BeginDetection() it will return error, as well as SerialDevices instance, the Devices.SerialDevices[i] cannot be parsed into the SerialDevice. I think the bug might be somewhere at the logic you mentioned..

 

Thanks,

Bernad

May 11, 2010 at 5:02 PM

By the way I am using GeoFramework and GPS.NET Desktop version. It appears that the Devices.BeginSerialDetection() is not one of the member in this class.. Maybe you were refering to GeoFramework PocketPC version?

 

Thanks,

Bernad

Developer
May 11, 2010 at 5:22 PM

It sounds like you may be running an old version of the code.  Try downloading the latest version (changeset 58665) here:

http://gps3.codeplex.com/SourceControl/list/changesets

 

 

May 12, 2010 at 2:46 AM

No wonder, I downloaded from the Download page. Thanks, I will use the newer version and test it then

Best Regards,

Bernad