Results 1 to 7 of 7

Thread: GPS problem

  1. #1

    Default GPS problem

    Hi to all,
    I've been trying to connect the GPS (a Bluetooth Tomtom wireless GPS Mk2 unit) but with no luck at all. I've verified that it works by using it succesfully with Vistumbler on the same laptop I'm using inSSIDer with.

    The problem seems to be with the setting of the COM port.
    I started the debug version of inSSIDer and selected COM14, 9600 bps, 8 bit, no parity, 1 stopbit, no flow control. Here is the output:

    inSSIDer starting up
    Form load
    Checking for updates...Complete
    GPS - TerminateThread()
    GPS - ClosePort()
    Preferences form load - loading settings
    GPS support is : Disabled
    Avalible Com ports:
    COM7
    COM8
    COM1
    COM3
    COM15?
    COM14?

    Selected params:
    Selected port : COM14
    Selected baud rate : 4800
    Selected data bits : 8
    Selected stop bits : None
    Selected flow control : None
    Selected parity : None
    GPS support is : Enabled
    GPS - InitializeThread()
    GPS - ResetPort()
    GPS - Port is enabled
    GPS - Exception! - Valore enum non compreso nell'intervallo consentito.
    Nome parametro: StopBits
    GPS - an error occourred, disabling port
    The problem seems to be in the setting of the "stopbits" parameterfor which the log reports an "enum value not in the valid range".

    I don't know if it matters (I don't think so) but COM14 and COM15 always appear in the drop down/combo with an extra character at the end (like COM14).
    Also I've noticed that the italian translation in the Parity drop down is wrong (it is "Nessuno/Peri/Odd/Segna/Spazio" while it should read "Nessuna/Pari/Dispari/Indicatore/Spazio".

    Hope you can help.
    Thanks
    Riko

  2. #2

    Default

    Good pickup on the stob bit comment. I didn't think you could have NO stop bits. It should be 1, 1.5 or 2. So I would guess that that stop bits would be 1 even though reported as none. The extra byte on the end of your COM14 example has been reported and should have a work round in the next version. There has been cases where the com port did not appear in the list at all, so the abuility to add a "custom" port id should be in the next version (I tested a debug version for Tyler).

  3. #3

    Default Stopbits

    You're right about the stopbit, also the "Stop bits" drop down contains "1, 1.5, 2, 2" the number two is being listed twice.

    Since setting the right value (1) did not work I tried setting it at 1.5 bits. Doing so makes the program initialize the COM port and start to receive NMEA data.
    Problem is that after a few seconds receiving GPS data inSSIDer crashes horribly. I tried setting the stopbits to "2" but it still crashes reporting the following
    Code:
    [StackTrace]
    System.IndexOutOfRangeException: Indice oltre i limiti della matrice.
       in Inssider.NmeaParser.ParseGPGSA(String sentence) in C:\Users\Tyler\Desktop\InSSIDerSVN\Inssider\NmeaParser.cs:riga 473
       in Inssider.NmeaParser.Parse(String sentence) in C:\Users\Tyler\Desktop\InSSIDerSVN\Inssider\NmeaParser.cs:riga 288
       in Inssider.Gps.gpsMethod() in C:\Users\Tyler\Desktop\InSSIDerSVN\Inssider\Gps.cs:riga 512
       in System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       in System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       in System.Threading.ThreadHelper.ThreadStart()
    Am I doing something wrong? Any idea on how to fix it?
    Thanks
    Riko

  4. #4

    Default

    I am sure Tyler will be looking into the crash.

    I had a good play with the HTC Bluetooth GPS and found it did not behave as clean as a real RS232 GPS. I found that the bluetooth did not connect and start receiving GPS data until the control lines were set. Then for some random reason the HTC GPS started sending data, but on next connection it did not work. I also noticed that the gps would not attempt to lock until it had a "connection" via the bluetooth, thus send no data until it got a sync. This delay meant insider did not see any data and would time out. I have asked Tyler to increase the timeout or make it user set-able.

    With any luck the new vesion will fix these issues.

    This is just a guess based on my testing.
    - Your gps should be 1 stop bit, but data is a little slow on being sent after startup
    - The 1.5 stop bits causes drift in the rs232 packet alignment and then currupted data. This currypted data caused your crash.

    At Tyler....
    Tyler, are you checking the check byte on the NEMA Packet? Also you may need to check the length to ensure no buffer overrun when currupted data appears.
    On one of my projects, I used the following methed.
    - Setup a Packet Buffer [max_nmea packetsize]
    - Ignore all data until $ arrives.
    - read byte, store in Buffer[index++]
    - if index >= buffer size set index = 0
    - On next $, check buffer for valid packet (eg: buffer[0] == $ find and check cs byte, if valid use, else drop)

    The above method ensures no buffer overrun. An long packets (which would be invalid) simply wrap and would then be dropped. By using the $ (start of nmea packet) as the seperator, it ensure a clean re-sync on the very next packet.

  5. #5

    Post Did you get the TomTom MkII running?

    With interest i read your debugging. At the end i'm wondering if it runs and with witch settings in the GPS settings box for InSSider 2.
    I cant get my MkII talking clearly too. And it has been detected and working in Google maps for example. Is it an idea to make a settings section somewhere in this forum for several GPS systems that need the standard settings of the GPS box altered? So users can find their specific settings more easy?
    Thanks Ard

  6. #6

    Default Bluetooth GPS TomTom Mk II

    What I didn't mention in my previous message is that Trevorb has the MkII running, his settings are unknown to me.

    Ard

  7. #7

    Default

    okay guys,
    I have the settings send by Trevor Bellyou:
    Bits per second 9600, data bits 8, parity none, stop bits 1, flow control none. I must have chosen the right com port, GPS is seen by other programs testing like Google Earth and having a good position fix but inSSIDer only has 0,0000 zil as lat. & long. position... InSSIDer sees data comming from GPS but doesn't understand them I think. Waiting for data blinks very shortly every scan round.
    I'm using Windows 7 32 bit Dutch edition, Tomtom MkII Gps device. any suggestions?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •