I have issue with starting the GPS for the notecard. I am using the following code inside the setup() of my swan/ESP32. The issue is that the GPS is not starting.
I have tried a few things to check what is wrong but without any success, Though I am getting GPS coordinates of cell tower via "card.time" request.
I want to have GPS coordinates for my project. The things I tried inside setup() is that I tried different combinations of "periodic" and "continuous" modes for hub.set and card.location.mode requests.
I tried to move the notecard a bit while in a periodic/heartbeat mode to see if GPS starts. but I had no success.
Though I tried with JSON based API request on chrome, where I saw right GPS coordinates.
What could be wrong here? except less power?
The first thing I would check is that your antenna is properly seated on the GPS u.fl connector on the Notecard (feel free to send me the model of antenna you are using too). Also, make sure your Notecard’s antenna has a clear view of the sky to ensure it can get an adequate fix on GPS satellites.
I would then reduce complexity a bit by just experimenting with card.location.* commands using the in-browser terminal provided at dev.blues.io.
For instance, I would start by resetting the Notecard:
I followed these steps as you have mentioned but there seems no changes.
I sent the request to delete the previous configurations n the notecard followed by the request to set the continuous location mode and then requested the location.
The GPS is inactive as you can see from the images below.
Then I tried by removing the swan from the slots to see weather it is a low power that is causing this issue? But there was no improvements.
I have also tried to connect again the u.fl cables on the card for GPS and main boards.
I am also puzzled with this issue, as I have seen the GPS working on this same device.
Make sure the Notecard is able to connect to a cellular network. In our GPS docs we do reference this: Note: the Notecard will not turn on the GPS module until it has made a successful cellular connection upon startup to obtain the current time. Once the Notecard has the time, GPS is available for use, regardless of the state of a cellular connection.
It looks like you’re on firmware v.1.5.6 (which should be fine). It may also be worth upgrading to the latest.
The thing was that it takes quite some time to get the cellular connection to work at first and then the GPS module to find coordinates. That could have baffled me
But now it works… Also didnt know that cellular network must work for GPS.
So if the notecard is booted up outside cell-service it will never turn the GPS on? This seems like a significant issue for asset tracker type devices. What if the notecard is software-restarted? Or hardware-reset?
Since the Notecard was designed as a low-power device, we strongly recommend always leaving it powered on (we’re talking only ~8uA draw when idle). Performing a card.restart doesn’t power cycle the device, so it retains the previously set time. A hard reset or loss of power will lose the time though (and yes, GPS won’t function until the time is set).
That being said, we are looking into making a change in the Notecard firmware to not force the Notecard’s time to be set before it makes a GPS fix.
Thanks, that would be one less worry. The wave-buoy we’re working on will often be deployed in areas where reception is poor, it will still log data and if / when it drifts into an area with cellular cover it can transmit. This would mean that we need to turn the device on while still in reception (maybe onshore, before taking it out on a boat). We did by the way just try it in the fjords outside Bergen, Norway and data transmission worked flawlessly even when sitting just a few cm above water.
By the way: I was under impression that time was from GPS? Is it only the card.location time that is GPS time?
I’m glad to hear your buoy deployment was successful! I just want to reiterate that you shouldn’t power cycle the Notecard before/during/after deployment as you do certainly risk data loss. Instead, leave it connected to a power source and use {"hub.set":"mode":off} if you really want to prevent the Notecard from powering on the modem or GPS.
To answer your other question - the time in a card.location response is when the GPS location was captured. That’s calculated from the time the Notecard received when it first connected to a cell tower.
I have tested my setup in an area with no connection, and i seem to get a lot of no-sat messages in track.qo as well as a no network error with penalty on GPS. I do restart the Notecard through card.restart when things are failing, so it’s likely that has been done. The card is not power cycled. Should this work?
Think of card.restart as more of a diagnostic tool to resolve a significant issue with a Notecard (non-responsive, or not functioning when it clearly should have cell tower access, etc). It’s not meant to be encoded in a project and used to re-attempt connections.
Since you’re using the Notecard in areas of low/poor connectivity, my default advice is:
If possible, use one of the wideband Notecards with an additional diversity (DIV) antenna to get the best connectivity (likely WBEX for you I believe).
Don’t perform a restart or power cycle the Notecard once it’s on and has made a cell connection.
Hi, thanks. In a couple of posts above you mention that card.restart does not reset the time, which is correct? I have a bunch of retries before I do card.restart, and I don’t know what kind of heuristic I would follow to restart it otherwise. I think it was more needed before, I have some I2C issues or where the protocol gets out of sync, but I can usually get out of those without a full restart. My main issue is the penalty box growing too large, but I can fix that without doing card.restart.
All that being said: It would really make my life easier if the GPS would not be dependent on first getting a time fix. Any chance of pushing for this in a future version?