iTracker RAK5010

RAK5010 RAK5010

The RAK5010 is an advanced, highly flexible NB-IoT tracker based on Quectel BG96 LTE Cat M1&NB1, integrated with GPS, BLE and a variety of sensors. The MCU running the board is a Nordic nRF52840 controller.

With the GPS and BLE features, the device can be used in a wide range of applications from outdoor to indoor scenarios where location based service are necessary.

The board is equipped with four sensors on board: humidity and temperature sensor, pressure sensor, 3-axis motion sensor, and ambient light sensor. Additionally, the extension IOs in the module allow expandable sensor application in addition to the on-board ones.

This board is particularly suitable to be used as a quick testing and prototyping tool for applications requiring Nb-IoT connectivity. Application development supports the GCC environment.

Binaries can be found in:



Serial connection

When the iTracker powers on or is reset, if it detects a USB connection it will appear as a USB serial port device (USB CDC). Otherwise it can be programmed via Bluetooth LE.

iTracker is not yet able to detect a USB connection that is plugged in after it has started up

iTracker does contain two Serial ports, so you can use Serial2 for communications while Serial1 is in use for GPS.


There is no separate GPS chip on the RAK5010. Instead, it is built into the BG96. Use as follows - this also turns the BG96 on if it wasn't already enabled.

require("iTracker").setGPSOn(true, function(err, gps) {
  /* gps contains: {
    at : AT command handler
    on : function(callback(err)) // turn GPS on (turned on automatically)
    off : function(callback(err)) // turn GPS off
    get : function(callback(data)) // get GPS data
  } */
  setInterval(function() {
    gps.get(function(data) {
      print("GPS", data);
      /* returns {error:...} on failure. 'ERROR: 516' means 'no fix'
         returns { raw : raw data as <UTC>,<latitude>,<longitude>,<hdop>,<altitude>,<fix>,<cog>,<spkm>,<spkn>,<date>,<nsat>
                   lat :   latitude in degrees,
                   lon :   longitude in degrees,
                   alt : altitude in m  } */
  }, 10000);

Note you'll probably get GPS {"error": "ERROR: 516"} initally. This just means 'no fix' and you just need to wait a few seconds/minutes until the data starts being populated properly.

Modem testing

The following code will power up the modem and report back the version number. It's a quick, easy way to test it without needing an active SIM.

var at;
console.log("Turning Cell on");
require("iTracker").setCellOn(true, function(usart) {
  console.log("Cell now on");
  at = require("AT").connect(usart);
  // at.debug(); // this enables printing of data received for debug purposes
  at.cmd("AT+GMR\r\n",1000,function cb(d) {
    if (d=="AT+GMR") return cb;
    if (d!="OK") console.log("Version is "+d);

You can use the AT Module (click here fore more info) in this way to send your own custom commands as well (it's also available as and in the examples below.


See the ATSMS module for full documentation.

var sms;

console.log("Turning Cell on");
require("iTracker").setCellOn(true, function(usart) {
  console.log("Connecting SMS");
  var ATSMS = require("ATSMS");
  sms = new ATSMS(usart);
  //Use; here if you want debug messages

  sms.init(function(err) {
    if (err) throw err;

    sms.list("ALL", function(err,list) {
      if (err) throw err;
      if (list.length)
        console.log("No Messages");

    // and to send a message:
    //sms.send('+441234567890','Hello world!', callback)

  sms.on('message', function(msgIndex) {
    console.log("Got new message, index ", msgIndex);

  // when done use require("iTracker").setCellOn(false)


See the QuectelBG96 module for full documentation. This handles proper internet access.

function connectionReady() {
  var http = require("http");
  http.get("", function(res) {
    res.on('data', function(data) {

var gprs;
console.log("Turning Cell on");
require("iTracker").setCellOn(true, function(usart) {
  console.log("Waiting 30 sec for modem to boot");
  setTimeout(function() {
    console.log("Connecting GPRS");
    gprs = require('QuectelBG96').connect(usart, {
      apn : "",
      username : "",
      password : "",
      // debug : true // to show raw AT command info
    }, function(err) {
      if (err) throw err;
    // gprs.debug(); // show just debug info from BG96 module
  }, 30000);

After a while Hello World! will be displayed - the contents of

To use Hologram, all you need to do is change apn : "", to apn : "hologram", and upload the code.


This blog post by Wolfgang Klenk shows how to get connected with Vodafone's NB-IoT in Germany.


a = require("iTracker").setAccelOn(true, function() {
  console.log(; // {x,y,z}
// { "x": 0.439453125, "y": -0.14453125, "z": -0.150390625 }

o = require("iTracker").setOptoOn(true, function() {  
// 217.44

p = require("iTracker").setPressureOn(true, function() {  
p.on('data', print);
// { "pressure": 1011.04125976562, "temperature": 25.79, "new": true }

e = require("iTracker").setEnvOn(true, function() { {
// { "humidity": 42.67883300781, "temp": 24.81201171875 }


iTracker.setGPSOn = function(isOn, callback) { ... }

Return GPS instance. callback is called whenever data is available!

iTracker.setEnvOn = function(isOn, callback) { ... }

Returns SHT3C instance. callback when initialised. Then use 'read(callback)' to get data

iTracker.setAccelOn = function(isOn, callback) { ... }

Returns a LIS3DH instance. callback when initialised. Then use read to get data

iTracker.setOptoOn = function(isOn, callback) { ... }

Returns a OPT3001 instance. callback when initialised. Then use read to get data

iTracker.setPressureOn = function(isOn, callback) { ... }

Returns a LPS22HB instance. callback when initialised. Then use 'get' to get data, or the on('data' event

iTracker.setCellOn = function(isOn, callback) { ... }

Turn cell connectivity on - will take around 8 seconds. Calls the callback(usart) when done. You then need to connect either ATSMS or QuectelBG96 to the serial device usart

iTracker.setCharging = function(isCharging) { ... }

Set whether the TP4054 should charge the battery (default is yes)

iTracker.isCharging = function() { ... }

Get whether the TP4054 is charging the battery


IO pins. Note - these need VREF to be connected to 3.3v to function


Analog input pin


List of IO pins


I2C interface used for communicating with on-board peripherals


First, it's best to check out the Getting Started Guide

Tutorials using Bluetooth LE:

Tutorials using Bluetooth LE and functionality that may not be part of the iTracker:


Hover the mouse over a pin function for more information. Clicking in a function will tell you how to use it in Espruino.

  • Purple boxes show pins that are used for other functionality on the board. You should avoid using these unless you know that the marked device is not used.
  • ! boxes contain extra information about the pin. Hover your mouse over them to see it.
  • 3.3v boxes mark pins that are not 5v tolerant (they only take inputs from 0 - 3.3v, not 0 - 5v).
  • GND is ground (0v).
  • VBAT is the battery voltage output (see the Espruino Board Reference).
  • ADC is an Analog to Digital Converter (for reading analog voltages)

Firmware Updates

You need to attach a nRF52DK or other SWD programmer to the SWDCLK and SWDIO pins, then upload the hex file by copying it to the JLINK drive or using nrfjprog.

This page is auto-generated from GitHub. If you see any mistakes or have suggestions, please let us know.