Scaling an IoT deployment? Join our webinar on May 28th where we dive into real-world scaling pain points and how to overcome them.

Blues Developers
What’s New
Resources
Blog
Technical articles for developers
Newsletter
The monthly Blues developer newsletter
Terminal
Connect to a Notecard in your browser
Developer Certification
Get certified on wireless connectivity with Blues
Webinars
Listing of Blues technical webinars
Blues.comNotehub.io
Shop
Docs
Button IconHelp
Notehub StatusVisit our Forum
Button IconSign In
Sign In
Sign In
Docs Home
What’s New
Resources
Blog
Technical articles for developers
Newsletter
The monthly Blues developer newsletter
Terminal
Connect to a Notecard in your browser
Developer Certification
Get certified on wireless connectivity with Blues
Webinars
Listing of Blues technical webinars
Blues.comNotehub.io
Shop
Docs
Example Apps
Accelerators
SDK Examples
Sample Apps
Sample Apps List
Continuous Asset Tracking with External GPS and Immediate Location Sync
Managing a Notecard's Wi-Fi Network Remotely
Putting a Host to Sleep Between Sensor Readings
Routing Data from Notehub to a Custom Cloud Endpoint
Sending Inbound Notes and Receiving Acknowledgment
Using LEDs and NeoPixels to Monitor Notecard Status
Community Projects
homechevron_rightDocschevron_rightExample Appschevron_rightSample Appschevron_rightContinuous Asset Tracking with External GPS and Immediate Location Sync

Continuous Asset Tracking with External GPS and Immediate Location Sync

Introduction

This sample app aims to provide guidance for developers who are designing asset tracking functionality into their connected products. Specifically, how to build a responsive cloud-connected asset tracker that ignores power management and instead focuses on low-latency of both ascertaining GPS location values and syncing collected location data with the cloud.

Wireless Connectivity with Blues

This sample app is built around the Blues Notecard and Blues Notehub .

The Blues Notecard is the easiest way for developers to add secure, robust, and affordable pre-paid wireless connectivity to their microcontroller or single-board computer of choice. Notecard is a System-on-Module (SoM) that combines pre-paid data, low-power hardware (~8μA-12μA when idle), and secure communications. It acts as a device-to-cloud data pump to communicate with the Blues cloud service Notehub.

Notehub is the Blues cloud service for routing Notecard-provided data to third-party cloud applications, deploying OTA firmware updates, and securely managing fleets of Notecards. Notehub allows for secure communications between edge devices and the cloud without certificate management or manual provisioning of devices.

General Information

System Hardware

ComponentPurpose
Blues Notecard Cellular WBGLW Wireless connectivity module enabling device-to-cloud data syncing.
Blues Notecarrier A Carrier board for connecting Notecard to GPS/GNSS breakout module.
Adafruit Ultimate GPS Breakout or Quectel L86Examples of compatible external GPS/GNSS module.
Tadiran TLP-93111 Li-SOCl2 Battery Example of a portable high capacity power source.

Note: There are no strict requirements on the above components. For instance, any Notecard Cellular or Notecard Cell+Wi-Fi may be substituted.

List of Acronyms

AcronymDefinition
SoMSystem-on-Module
GPSGlobal Positioning System, a satellite-based radio navigation system
GNSSGlobal Navigation Satellite System is a generic term describing any satellite constellation that provides location services

Summary

Asset tracking is one of the more common and time-tested mobile IoT use cases. Often built with off-the-shelf components including a low-power host MCU, GPS/GNSS module, and some type of ubiquitous wireless connectivity option, asset trackers are becoming commoditized in the industry, yet still generally have a high cost of ownership due to recurring wireless connectivity fees.

The Notecard is a unique SoM to build around for asset tracking, as it incorporates not only a cellular and/or Wi-Fi radio module, but is extremely low power in nature, idling at ~8μA-12μA. The Notecard API is also flexible enough to allow for programming of the Notecard's onboard STM32 microprocessor to perform asset tracking functions without the usage of an external host MCU. This makes it an ideal candidate for low-cost and low-power asset tracking scenarios where the asset may not move for hours or days at a time.

note

Another convenient feature of the Notecard Cellular or Cell+WiFi is its integrated GPS/GNSS module. However, in low latency scenarios such as this, it's important to note the cellular radio and GPS/GNSS module cannot be enabled concurrently. Hence the usage of a separate, external, GPS/GNSS module in this sample app.

Requirements

  1. Ascertain the location of an asset that is either in motion or has recently completed motion within 1-2 minutes.
  2. Relay accumulated location data points to a cloud endpoint immediately, on a consistent cadence.
  3. Assume power consumption is not an issue. While options vary, power source options include line power via USB, LiPo battery with supplemental solar power, and/or usage of a Tadiran Li-SOCl2 battery.

Technical Implementation

Hardware Wiring

The external GPS/GNSS module must be wired to the Notecarrier via the following pins:

NotecardExternal GPS/GNSS Module
VMAIN3V3
GNDGND
AUXRXTX
AUXTXRX

As this scenario does not require coding of firmware for deployment to a connected host MCU, the following is a set of Notecard API commands used to configure a Notecard directly using either the Notecard CLI or the In-Browser Terminal.

note

When scaling deployment of Notecard API commands to fleets of devices, use of the Notecard CLI with a setup script is highly recommended.

Link Notecard to Notehub Project

Every Notecard must be associated with a cloud-based Notehub project . This is accomplished using the hub.set API. The arguments in this command tell the Notecard to place the cellular radio into a continuously connected state, thus reducing latency when connecting to the cloud, and to sync any pending stored data every 1 minute (the outbound argument). The inbound argument is optional and tells the Notecard how often, in minutes, to query for any inbound commands/data from Notehub.

{"req":"hub.set","mode":"continuous","product":"<your-product-uid>","outbound":1,"inbound":240}

The card.aux.serial API tells the Notecard to look for, and use, an external GPS/GNSS module via TX/RX.

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

Next, the Notecard needs to know that the location should be sampled and updated continuously, but only when the device is in motion.

{"req":"card.location.mode","mode":"continuous"}
note

Whether or not a device is idle is automatically determined by the Notecard's onboard accelerometer. The sensitivity of measurement can optionally be configured with the card.motion.mode API to be more or less sensitive to movement based on the products' needs.

As soon as a change in location is recorded on the Notecard, initiate a cloud connection with Notehub and sync data via the _track.qo Notefile. In addition, set a heartbeat to occur every 4 hours, which will make sure the Notecard continues to "phone home" at least once every 4 hours if the device is idle for an extended period.

{"req":"card.location.track","start":true,"heartbeat":true,"hours":4,"sync":true}

Potential Issues

  1. GPS/GNSS module antennas generally need a clear view of the sky for optimal functionality.
  2. Cellular connectivity can vary based on physical enclosure and geographic region. Consult this guide on Diagnosing Cellular Connectivity Issues for more information.

Expected Results

With the Notecard properly configured and deployed in a location with cellular connectivity and a clear view of the sky, data should begin syncing with Notehub on a regular cadence (while the device is moving).

For example:

{
    "body": { ... },

    "best_location_type": "gps",
    "best_olc": "86JQQ972+FQ2H",
    "best_when": 1674749529,
    "best_lat": 42.2636375,
    "best_lon": -84.24809765624,
    "best_location": "Lansing MI",
    "best_country": "US",
    "best_timezone": "America/Detroit",

    "where_olc": "86JQQ972+FQ2H",
    "where_when": 1674749529,
    "where_lat": 42.2636375,
    "where_lon": -84.24809765624,
    "where_location": "Lansing MI",
    "where_country": "US",
    "where_timezone": "America/Detroit",
}

Routing Data to a Cloud Application

A key value of Notehub is the ability to route data to third-party cloud applications. Consult the Routing Data with Notehub documentation for more information on creating cloud-based dashboards and visualizations of accumulated data.

data visualization of gps coordinates

Additional Resources

  • Working with GPS on the Notecard
  • Diagnosing GPS Issues on the Notecard
  • Asset Tracking Articles on the Blues Developer Blog
Can we improve this page? Send us feedback
© 2025 Blues Inc.
© 2025 Blues Inc.
TermsPrivacy
Notecard Disconnected
Having trouble connecting?

Try changing your USB cable as some cables do not support transferring data. If that does not solve your problem, contact us at support@blues.com and we will get you set up with another tool to communicate with the Notecard.

Advanced Usage

The help command gives more info.

Connect a Notecard
Use USB to connect and start issuing requests from the browser.
Try Notecard Simulator
Experiment with Notecard's latest firmware on a Simulator assigned to your free Notehub account.

Don't have an account? Sign up