No announcement yet.

TripMate initialization DigitalMod

  • Filter
  • Time
  • Show
Clear All
new posts

  • TripMate initialization DigitalMod

    I have an old Delorme TripMate serial GPS that I'm using for the time being. These old TripMates are a little strange. When they turn on, they do nothing but repeat the word "ASTRAL" over the serial connection until they get a reply of "ASTRAL\r\n". Once initialized, they send full nmea compliant transmissions.

    I can currently get this GPS to work work with StreetDeck by using a piece of software to split the com port to two virtual com ports, then connecting with hyperterminal on one of the com ports and typing in "ASTRAL", then starting StreetDeck and connecting on the other com port.

    This is a pain in the butt, so I decided I'd whip up a DigitalMod to make it simpler. So far, I've created a COM object that connects to the serial port you pass it, outputs "ASTRAL\r\n" and closes the port. I then added a new module with a single button that calls that function when you push the button. It works sometimes. I think it's an issue with my serial communication code...I'll fix that later.

    Please be patient with me...this is my first attempt at a DigitalMod and I may be asking ignorant questions.

    My questions are:

    1. Is there somewhere I can tie into the StreetDeck so that I can run this code on startup or when the GPS initializes rather than having to open the Module and push the button? The only other issue is that when the serial connection closes, it reverts back to "ASTRAL" mode, so I'd have to send the initalization string and keep the port open and pass it to the GPS module. I can get around this with my virtual serial port software, but it'd be nice if I didn't have to.

    2. Where is the setting stored for the Com port that's chosen in the StreetDeck Configuration? I checked the config.xml file and it doesn't seem to be there. If it's not stored in something standard like an xml file or a registry key, how do I read it in?

    That's it for now. Thanks.

  • #2
    To get the DigitalMod to do something on startup, you have to create a scripted overlay, not a scripted module. Overlays are global and thier events will fire regardless of where in streetdeck you are. Just overload the OnCreate event and put your COM code in there.

    The options are stored in options.sdo. XML files use to be used, but were too slow. This is a binary format file. The GPS com port should be the 47th integer in this file. The integer size is 4 bytes. The file format very rarly changes, but I can't garuntee if you read the file in yourself that it will be compatible with all future versions. Developer (I am Chuck)
    Get StreetDeck at
    The Official StreetDeck Forums have moved, please visit us at for official support for Streetdeck.


    • #3
      Thanks Chuck. I'll hack away at it a little more and see what I can come up with. If the location of the COM port changes...I'll just bug you again


      • #4
        Ok...figured out why it wasn't working sometimes. I needed to take the DTR line high before it would start sending the ASTRAL keyword. I also implemented it as an overlay and it works like a charm.

        Still to do:
        1. Need to add some code onDestroy to send the GPS back to sleep.
        2. Get it to read that com port setting from the options.sdo file as it's still hard-coded.
        3. Get it to read the last GPS location from the config.xml and send an initialization string to the GPS so it will lock faster.
        4. Check to see if I can call the initialization code onGPSString instead of onCreate for the overlay. That way, if it were to go back to sleep at some point, it would then re-initialize itself. Would I just add the Navigation_OnGPSString event code in the same overlay? Also, does that event have any parameters that will allow me to see the value of the string that was sent?

        I suppose I could release it when I'm done, but I sorta doubt that anyone still has one of these old beasts that they plan to use with StreetDeck. Also, in its current state, it requires the serial port sharing app that I have.

        Ideally, this would work much better as an option in StreetDeck for an initialization string which could be used for any GPS, but I realize it would not be used for the vast majority of users, so I can be happy hacking it together myself.