AssetTracker 2: Documentation doesn't match libraries in IDE?

I am working with an AssetTracker 2 using the IDE. I have been able to run the GPS example code and make simple changes and the device is working. However, the IDE shows the code is using the libraries AssetTracker and Adafruit_GPS which seem to be out of date for the AssetTracker 2.

The initialization sentences defined in Adafruit_GPS.h uses an NMEA Talker ID for the GPS receiver that was used for the AssetTracker 1. These sentences begin with ‘$PMTK’. I believe the sentences for the uBlox receiver on the AssetTracker 2 should begin with $PUBX (or several other options for standard messages).

I have not tried changing the initialization sentences or adding new command sentences yet. I saw a discussion from last April about problems with the library being out of date and I am assuming the $PMTK sentences will not work.

I have finally figured this out by reading Adafruit_GPS.h file, the specification for the GPS receiver used on AssetTracker 2 (, and the specifications for the receiver for AssetTracker 1.

So, I have three questions:

How is the device working at all if the initialization sentence is unknown to the newer HW? Is it just ignoring the commands and running in some default mode?

Are there examples and drivers that are up to date for AssetTracker 2?

Will it work for me to format sentences as defined in the uBlox documentation and write them to Serial1? I understand I will have to make modifications to the parse code that reads data from the device.

Thanks for any hints you can give me.


I wrote a library to support the Asset Tracker 2. Actually 2 libraries: AssetTracker2 and UbloxM8G_GPS.


Hi @Lynd, can you share your modified Library?

Thank you!


I have shared it but I have a better version now. However, I am having trouble getting the examples to work correctly. Something has changed in the last few weeks. Once I get it straightened out I will make the new version available and let you know.


I got it working. The driver is named AssetTracker2 which is just a thin shell over UbloxM8G_GPS.
In case you are curious, the problem I had was solved by adding a call to Particle.process() in loop(). I don’t know why I needed to do that. I’m hoping someone (ScruffR) will answer in another thread.

1 Like

Thank you @Lynd!

I leave the link to the library here to facilitate the search.