Positioning GPS detection problem

Apr 10, 2012 at 12:23 AM

Currently, the DotSpatial.Examples.DemoGPS code and the DotSpatial.Positioning code are quite a way out of sync.  However, with a fair deal of tweaking of the object names, the code can be made to compile and run.  The project produces an executable that has the title "GPS.NET 3.0 Diagnostics", which presents an interface which begs for a button, marked "Detect" to be pressed.   At this point, though, I get a strange error, which says;

An unexpected error has occured.

System.Argumentexception: The portname cannot be empty.

Parameter name: Portname

 

All evidence points to the error originating in the SerialDevices.cs file.  Having looked through the code there, I am none the wiser as to why this would fail in this way.

Any help would be appreciated.

Regards

Mark

Developer
Apr 10, 2012 at 5:59 PM

I'm curious what you needed to modify. DemoGPS compiles and runs fine for me right "out of the box." 

Apr 10, 2012 at 7:28 PM
Edited Apr 10, 2012 at 7:47 PM

The source code for the demo refers to objects like DotSpatial.Positioning.GPS.NmeaInterpreter  in the file MainForm.Designer.vb  - whereas, in the code for DotSpatial 1.1 for the DotSpatial.Positioning component, the same object is referred to as DotSpatial.Positioning.NmeaInterpreter.

Obviously, this is just due to the re-organization of this area of the framework as has been discussed elsewhere on this forum, but it causes about 80 or so compile errors when trying to build the Positioning Example called "GPS Diagnostics" from that branch of the source code bundle.  I noticed that someone had suggested that the branch associated with "Compact" should work - however, when I looked at that code in the repository, it also seemed to have the same issues.

Here is a line, extracted from the file MainForm.Designer.vb from the branch DotSpatial.Positioning.Compact.GPS.Examples.VB.NET.MyProject

  Me.SatelliteViewer2.Effect = DotSpatial.Positioning.Drawing.PolarControlEffect.Glass

The same object, as reference in the DotSpatial 1.1 framework (and how I thought it should be) is

   Me.Speedometer2.Effect = DotSpatial.Positioning.Forms.PolarControlEffect.Glass


Perhaps I am just missing something?

That said, this was not my problem area - it was merely a bit disconcerting at the time.  I really would appreciate any help I could get on my original problem.

Developer
Apr 10, 2012 at 9:17 PM

Ok. I was looking at DemoGPS in the main solution. I've seen a number of contributions via the issue tracker and forum, but I haven't seen any developers making major changes in the last year to Positioning. I'm not sure who is contributing to that part of the project, so perhaps there is some tidy up work that needs to be done.

I do know that we only released the .NET 4 version of the dlls because we aren't sure how to test all of the variants (Pocket PC, CF 3.5, etc.).

Apr 10, 2012 at 9:59 PM

I just downloaded the source code Zip file again (dotspatial-66307.zip) and under the DemoGPS main solution, it seems to contain the version as indicated above containing the old arrangement of the framework.  Not sure what is the root of this, but it appears that the demos for the Location stuff need to all be updated to reflect the new arrangement of the object.

Any idea what might be causing the issue with the enumeration of the ports?  The program enumerates all the ports up to Com7, then throws the above exception.