Hi
I have tried to use inSSIDer together with GPS reciever bu-353 but the program crashed instantly every time I start the program with the GPS reciever connected.
I tested it with a brand new GPS reciever with no fix position. I don't know if that could have cause some problems in the calculations.
I don't have tested it again after the GPS got a fixed position and started to send correct GPS info. I used netstumbler to do the task but would like to work with inSSIDer.
An external consultant has borrowed the GPS so I can't test it right now.
The problem was on two different laptops. The first laptop is Dell and the second is an IBM laptop both crashed the program almost instantly. If I removed the GPS reciever and started the program there were no problem.
Br.
Rune
Have you tried connecting
Have you tried connecting the GPS after launching InSSIDer?
I have the same problem with
I have the same problem with the Globalsat Bluetooth GPS Receiver BT359C
The error generates this:
[Description]
[Message]
Index and length must refer to a location within the string.
Parameter name: length
[Version]
1.1.5.0529
[WinVer]
Microsoft Windows NT 5.1.2600 Service Pack 3
[StackTrace]
System.ArgumentOutOfRangeException: Index and length must refer to a location within the string.
Parameter name: length
at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy)
at Inssider.NmeaParser.parseCoordinates(String rawLongitude, String rawLatitude, String rawNSindicator, String rawEWindicator)
at Inssider.NmeaParser.ParseGPGGA(String sentence)
at Inssider.NmeaParser.Parse(String sentence)
at Inssider.ScannerForm.gpsMethod()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
As for connecting it afterwards, it will crash as soon as it starts using the gps...
Hi I checked the source code
Hi
I checked the source code for the NMEA parser and it looks like there are no error catching code at all in that file. I have seen the BU-353 send a lot of ,,,,,, data when there is no fix. Maybe the split of the strings don't handle the situation correctly when the gps info fields are empty.
I don't have the time today but hope that I can borrow the GPS reciever this weekend and find the cause.
Br.
Rune
Hi Please take a look at
Hi
Please take a look at this piece of source code from NMEA parser:
private double[] parseCoordinates(string rawLongitude, string rawLatitude, string rawNSindicator, string rawEWindicator)
{
//Latitude
double latHours = System.Convert.ToDouble(rawLatitude.Substring(0, 2));
double latMinutes = System.Convert.ToDouble(rawLatitude.Substring(2));
lat = latHours + latMinutes / 60;
if (rawNSindicator == "S")
{
lat = -lat;
}
//Longitude
double lonHours = System.Convert.ToDouble(rawLongitude.Substring(0, 3));
double lonMinutes = System.Convert.ToDouble(rawLongitude.Substring(3));
lon = lonHours + lonMinutes / 60;
if (rawEWindicator == "W")
{
lon = -lon;
}
double[] result = { lat, lon };
return result;
}
I think the substring command is the problem. There are no check to see the length of the string before you use the substring command. I think that will cause an index exception when you try to get something from an empty string.
Br.
Rune
From
From msdn.microsoft.com:
C#]
String myString = "abc";
bool test1 = String.Compare(myString.Substring(2, 1), "c") == 0; // This is true.
myString.Substring(3, 1); // This throws ArgumentOutOfRangeException.
bool test2 = String.Compare(myString.Substring(3, 0), String.Empty) == 0; // This is true.
I found the bug and I am
I found the bug and I am working on a fix.
The nmeaParser has a lack of Exception handling.
It crashes when the GPS has no fix.
As Mr. Electronic said, it is the substring code.
Hi I can see in the dump
Hi
I can see in the dump from my GPS reciever that several fields are empty but it is a random pattern some of the time. It looks like it is affecting the GPGSV command.
$GPGSV,3,1,12,19,63,185,18,22,42,064,,11,42,277,28,14,36,109,*72
$GPGSV,3,2,12,03,34,169,16,32,28,213,,06,25,158,,28,23,314,38*76
$GPGSV,3,3,12,26,16,031,23,18,12,053,,27,09,015,,09,07,035,12*75
I think that it is correct that the NMEAparser should check the incomming data more before it just splits it up and therefore gives array index errors and out of range errors.
Br.
Rune
I just uploaded a new
I just uploaded a new release of inSSIDer 1.2 beta, which has better error handling... let me know if it works any better ;)
Much better thanks. Still
Much better thanks.
Still one minor gps bug, the com port displays as Com 3 followed by a squar box, for the gps to work I have to delete the box, but after that I didn't have any stability issues.
Hi I can connect the GPS
Hi
I can connect the GPS without any crash at the moment. It looks much better now.
Br.
Mr. Electronic