External GPS on cold boot

I am having trouble with the GPS on a cold boot, it works fine if I reset the processor after a cold boot. My initialisation commands are

{“req”:“card.aux”,“mode”:“track”,“limit”:false,“gps”:true}
{“mode”:“track”,“rate”:9600,“gps”:true}
{“req”:“card.location.mode”,“mode”:“continuous”}
{“seconds”:60,“mode”:“continuous”,“threshold”:1}
{“req”:“hub.set”,“product”:“xxxxx”,“sn”:“xxxxx”,“mode”:“continuous”,“inbound”:3,“outbound”:3,“sync”:false}
{}
{“req”:“card.motion.mode”,“stop”:true,“seconds”:5,“sensitivity”:0}
{“stop”:true}

After a minute or so I get hub connected, but GPS stays on waiting to start

{“req”:“hub.status”}
{“connected”:true,“status”:“connected (session open) {connected}”}

{“req”:“card.location”}
{“stop”:true,“status”:“GPS waiting to start {gps-starting} {gps-active}”,“mode”:“continuous”}

I also get “stop”:true response member, which doesn’t seem to be in the documents? I have sent no other configuration to the notecard. At this point if I reset my processor (but not the notecard), I get connected responses from hub.status and the GPS starts working

{“req”:“card.location”}
{“status”:“GPS updated (156 sec, 47/48 dB SNR, 11/14 sats, HDOP 0.86) {gps-active} {gps-signal} {gps-sats} {gps}”,“mode”:“continuous”,“lat”:x,“lon”:x,“dop”:0.86,“time”:1712066023}

I’m thinking this has something to do with the fact the GPS can’t start until the modem connects, but I don’t know why it doesn’t start on its own, once it has. Is there something I should be doing to force the GPS to start on cold boot?

Thanks

Hey @spring,

This is funny timing because I’m working on a blog post on using external GPS :slight_smile:

I actually have a pretty similar scenario and haven’t hit this situation. Here’s my work-in-progress source in case you find anything useful in there WIP hyper aggressive asset tracker · GitHub.

The only obvious difference I notice is you should try switching to card.aux.serial for setting up the external GPS, as it’s now our preferred approach.

{
  "req": "card.aux.serial",
  "mode": "gps"
}

If that doesn’t work could I get some more information on the external GPS you’re using and how you have everything connected?

Thanks,
TJ

I changed to

{
  "req": "card.aux.serial",
  "mode": "gps"
}

and now it is working from cold boot. Thanks for your help.

1 Like