Can't get GPS fix on Sodaq ONE

Hi there,

I uploaded the Universal Tracker (https://github.com/SodaqMoja/SodaqOne-UniversalTracker) into the Sodaq ONE with a GPS sensor attached.
In DEBUG mode, when I check the serial monitor, it seams the function to get a gps fix is waiting forever with the message:

Starting getGpsFixAndTransmit()…

What could be wrong? Or how to further troubleshoot this?

Regards,
Martijn

ps. Im a complete newbie into Arduino and hardware programming in general so any further explanation is welcome :smile:

Can you try v1.6.8 from the test configuration:
http://downloads.sodaq.net/test/package_sodaq_index.json

There is a new board variant labelled SODAQ ONE which is for Rev.4 onward boards.
The existing variant is still available for the Rev.2 BETA boards.

It seems like there is some specific LORAONE code disabled in ublox.cpp. I just found out that if you add:

#define ARDUINO_SODAQ_LORAONE

to ublox.cpp

it will find a GPS fix as the code:

pinMode(GPS_ENABLE, OUTPUT);
pinMode(GPS_TIMEPULSE, INPUT);

will be enabled. Whether this is the right way to do and why it is missing is of course the question…

I am using the code from somewhere mid this week on a rev. 4 board and indeed the v1.6.8 from the configuration. And… it really started working when bringing the module outdoors. It now even sends out the Lora message;-)

Yes, I did try the v1.6.8.

Now I will try the solution Harm gave!

Well,

With #define ARDUINO_SODAQ_LORAONE in ublox.cpp I get one step closer but still not there, below the output with ublox in debug mode:

Starting getGpsFixAndTransmit()…
uBlox enabled
92 bytes available
1980-01-06 00:00:15.0 valid=00 lat=0 lon=0 sats=0 fixType=00
92 bytes available
1980-01-06 00:00:16.0 valid=00 lat=0 lon=0 sats=0 fixType=00
92 bytes available
1980-01-06 00:00:17.0 valid=00 lat=0 lon=0 sats=0 fixType=00
92 bytes available
1980-01-06 00:00:18.0 valid=00 lat=0 lon=0 sats=0 fixType=00


92 bytes available
1980-01-06 00:02:13.0 valid=00 lat=0 lon=0 sats=0 fixType=00
92 bytes available
1980-01-06 00:02:14.0 valid=00 lat=0 lon=0 sats=0 fixType=00
uBlox disabled
Timestamp, BatteryVoltage, BoardTemperature, Lat, Long, Altitude, Speed, Course, SatelliteCount, TimeToFix
946684951, 255, -2, 0, 0, 0, 0, 0, 0, 255

Take it outdoors. That did the trick for me. Apparently for a first fix it needs to have ‘clear view lines’ to the satellites.

(post withdrawn by author, will be automatically deleted in 24 hours unless flagged)

Yes, I also noticed that it must have a first fix outside, before is gets working fine. Can anybody explain?

Sorry, for the late reply. Last week I didnt had much time to look into this stuff.
Tonight I tried to get a fix but still no response :frowning:
Im literally in the backyard with open view…

ps. I did an pull from the master branch of Sodaq Universal Tracker.

Below my Serial Terminal

-> CPU reset by Software [64]

Commands:
Reset DevAddr / DevEUI to the Hardware EUI (EUI):
Commit Settings (CS):

Settings:
Fix Interval (min) (fi=): 15
Alt. Fix Interval (min) (afi=): 0
Alt. Fix From (HH) (affh=): 0
Alt. Fix From (MM) (affm=): 0
Alt. Fix To (HH) (afth=): 0
Alt. Fix To (MM) (aftm=): 0
GPS Fix Timeout (sec) (gft=): 120
OTAA Mode (OFF=0 / ON=1) (otaa=): 0
DevAddr / DevEUI (dev=): 0004A30B001B7A64
AppSKey / AppEUI (app=): 00000000000000000000000000000000
NWSKey / AppKey (key=): 00000000000000000000000000000000
Num Coords to Upload (num=): 1
Repeat Count (rep=): 0
Status LED (OFF=0 / ON=1) (led=): 0
Enter command: fi=5

Settings:
Fix Interval (min) (fi=): 15
Alt. Fix Interval (min) (afi=): 0
Alt. Fix From (HH) (affh=): 0
Alt. Fix From (MM) (affm=): 0
Alt. Fix To (HH) (afth=): 0
Alt. Fix To (MM) (aftm=): 0
GPS Fix Timeout (sec) (gft=): 120
OTAA Mode (OFF=0 / ON=1) (otaa=): 0
DevAddr / DevEUI (dev=): 0004A30B001B7A64
AppSKey / AppEUI (app=): 00000000000000000000000000000000
NWSKey / AppKey (key=): 00000000000000000000000000000000
Num Coords to Upload (num=): 1
Repeat Count (rep=): 0
Status LED (OFF=0 / ON=1) (led=): 0
Initializing LoRa…
The parameters for LoRa are not valid. LoRa will not be enabled.
** Boot-up completed successfully!
Starting getGpsFixAndTransmit()…
Timestamp, BatteryVoltage, BoardTemperature, Lat, Long, Altitude, Speed, Course, SatelliteCount, TimeToFix
946684961, 102, -14, 0, 0, 0, 0, 0, 0, 255

Default fix event started.
Starting getGpsFixAndTransmit()…
Timestamp, BatteryVoltage, BoardTemperature, Lat, Long, Altitude, Speed, Course, SatelliteCount, TimeToFix
946685881, 109, -51, 0, 0, 0, 0, 0, 0, 255

Can you confirm that you are using the latest version (v1.6.8) of the boards manager, and that you have selected the correct variant (there is the BETA (Rev.2) and final Rev.4).

I used : http://downloads.sodaq.net/test/package_sodaq_index.json
And based on these references I selected the 1.6.8 version.
From the boards list I selected the ‘SODAQ ONE’ board which is probably the Rev.4 ?

I saw the Arduino IDE changed the board to another type. So I reselected the SODAQ ONE board and tried the GPS fix from Universal Tracker. Same, no results.
Therefore, I thought lets remove the Sodaq SAMD Boards completely and install the 1.6.8 version again. However, now the situation is even worse; when I try to install the 1.6.8 version I receive a ‘CRC doesn’t match. File is corrupted’ message. This problem does not occur when I install the 1.6.7 version.

Regards,
Martijn.

Unfortunately, the CRC issue is due to having the test and normal release versions available for the board.
Can you make sure you update your preferences to use this URL: http://downloads.sodaq.net/package_sodaq_index.json

You will have to delete the installed Sodaq SAMD packages and copies located in the staging folder.
On the Windows platform these directories are located at: /Users/“USERNAME”/AppData/Local/Arduino15

Any feedback on the GPS fix outside?

Hi Felix,

Yes,
The CRC problem was solved. I used the normal release instead of the test release which Gabriel gave me (http://downloads.sodaq.net/package_sodaq_index.json) and installed the 1.6.8 version. So I guess I use the final rev. 4 by selecting SODAQ ONE board and not the SODAQ ONE BETA. Second I did a fresh git clone of the Universal Tracker repo and uploaded the sketch. Compiling and uploading all good.
However, it was a little rainy yesterday evening therefore, I tried to do the fix underneath a plastic roof which is an extension of my house. tho, no results still…

I try as soon as possible in the open sky.

Regards,
Martijn

I am using 1.6.10 and http://downloads.sodaq.net/test/package_sodaq_index.json and latest gitclone. I get a GPSFix only outside but not always

Felix

The 1st GPS fix can take a while. Put the timeout to 300 sec and you will probably get a fix under the plastic roof.

Well probably I live on a different planet… still no results:

  1. Used http://downloads.sodaq.net/package_sodaq_index.json
  2. installed 1.6.8
  3. selected SODAQ ONE
  4. fresh git pull of the Universal Tracker
  5. upload succesfully the sketch
  6. Go outside with the sensor and hold the GPS sensor correctly in the open air.
  7. watch the Serial Monitor and adjusted the settings as you can see in the log below.

Settings:
Fix Interval (min) (fi=): 5
Alt. Fix Interval (min) (afi=): 0
Alt. Fix From (HH) (affh=): 0
Alt. Fix From (MM) (affm=): 0
Alt. Fix To (HH) (afth=): 0
Alt. Fix To (MM) (aftm=): 0
GPS Fix Timeout (sec) (gft=): 300
OTAA Mode (OFF=0 / ON=1) (otaa=): 0
DevAddr / DevEUI (dev=): 0004A30B001B7A64
AppSKey / AppEUI (app=): 00000000000000000000000000000000
NWSKey / AppKey (key=): 00000000000000000000000000000000
Num Coords to Upload (num=): 1
Repeat Count (rep=): 0
Status LED (OFF=0 / ON=1) (led=): 0
Initializing LoRa…
The parameters for LoRa are not valid. LoRa will not be enabled.
** Boot-up completed successfully!
Starting getGpsFixAndTransmit()…
Timestamp, BatteryVoltage, BoardTemperature, Lat, Long, Altitude, Speed, Course, SatelliteCount, TimeToFix
946685131, 103, -18, 0, 0, 0, 0, 0, 0, 255

Default fix event started.
Starting getGpsFixAndTransmit()…
Timestamp, BatteryVoltage, BoardTemperature, Lat, Long, Altitude, Speed, Course, SatelliteCount, TimeToFix
946685432, 103, -20, 0, 0, 0, 0, 0, 0, 255

Default fix event started.
Starting getGpsFixAndTransmit()…
Timestamp, BatteryVoltage, BoardTemperature, Lat, Long, Altitude, Speed, Course, SatelliteCount, TimeToFix
946685761, 103, -21, 0, 0, 0, 0, 0, 0, 255

Default fix event started.
Starting getGpsFixAndTransmit()…
Timestamp, BatteryVoltage, BoardTemperature, Lat, Long, Altitude, Speed, Course, SatelliteCount, TimeToFix
946686121, 103, -20, 0, 0, 0, 0, 0, 0, 255

Default fix event started.
Starting getGpsFixAndTransmit()…
Timestamp, BatteryVoltage, BoardTemperature, Lat, Long, Altitude, Speed, Course, SatelliteCount, TimeToFix
946686481, 104, -26, 0, 0, 0, 0, 0, 0, 255

Default fix event started.
Starting getGpsFixAndTransmit()…
Timestamp, BatteryVoltage, BoardTemperature, Lat, Long, Altitude, Speed, Course, SatelliteCount, TimeToFix
946686841, 105, -28, 0, 0, 0, 0, 0, 0, 255

Default fix event started.
Starting getGpsFixAndTransmit()…
Timestamp, BatteryVoltage, BoardTemperature, Lat, Long, Altitude, Speed, Course, SatelliteCount, TimeToFix
946687201, 104, -28, 0, 0, 0, 0, 0, 0, 255

Default fix event started.
Starting getGpsFixAndTransmit()…
Timestamp, BatteryVoltage, BoardTemperature, Lat, Long, Altitude, Speed, Course, SatelliteCount, TimeToFix
946687561, 105, -29, 0, 0, 0, 0, 0, 0, 255

Default fix event started.
Starting getGpsFixAndTransmit()…
Timestamp, BatteryVoltage, BoardTemperature, Lat, Long, Altitude, Speed, Course, SatelliteCount, TimeToFix
946687921, 105, -29, 0, 0, 0, 0, 0, 0, 255

Default fix event started.
Starting getGpsFixAndTransmit()…
Timestamp, BatteryVoltage, BoardTemperature, Lat, Long, Altitude, Speed, Course, SatelliteCount, TimeToFix
946688281, 105, -31, 0, 0, 0, 0, 0, 0, 255

Default fix event started.
Starting getGpsFixAndTransmit()…

Hey Martijn,

Would it be possible to upload some pictures of the connected antenna? I’d like to see which antenna you’re using, and how its connected. Also a picture of the underside of the board would be nice!

Thanks in advance,

Nick Leijenhorst

Hi

I have the same issue and not always I can get a gpsFix outside

  1. Used http://downloads.sodaq.net/package_sodaq_index.json
  2. installed 1.6.10
  3. cloned latest from https://github.com/SodaqMoja/SodaqOne-UniversalTracker



I would like to add that I have the active GPS antenna, and never had any issues getting a fix, outside or inside with the Sodaq One.

1 Like