Skip to content

LoRa Cloud

The LoRa Cloud integration provides integrations with several LoRa Cloud services.

LoRa Cloud Geolocation

The LoRa Cloud Geolocation service provides a geolocation resolver for:

  • TDOA (Time Difference Of Arrival)
  • RSSI (signal strength)
  • Wifi (Wifi access-point bssid scanning)
  • GNSS (using the LR1110)

TDOA

For TDOA based geolocation, at least three gateways are required that implement fine-timestamping. Please refer to the ChirpStack Network Server Geolocation page for more information about the fine-timestamp.

Wifi

When using Wifi based geolocation, you must configure a payload decoder for decoding the FRMPayload into an object expected by the LoRa Cloud integration.

Example payload decoder:

// bytes contains one or multiple times thw following encoding:
// [MAC Address: 6 bytes] | [Signal strength (int8): 1 byte]
function Decode(fPort, bytes, variables) {
  var i = 0;
  var len = bytes.length;
  var out = {access_points: []};

  for (; i < len ;) {
    out.access_points.push({macAddress: bytes.slice(i, i + 6), signalStrength: int8(bytes[i+6])});
    i += 7;
  }
  return out;
}

// convert a byte value to signed int8
function int8(byte) {
  var sign = byte & (1 << 7);
  if (sign) {
    return 0xFFFFFF00 | byte;
  }
  return byte;
}

The an example of the output produced by the above codec:

{
    "access_points": [
        {
            "macAddress": "...", // base64 encoded
            "signalStrength": -70
        },
        {
            "macAddress": "...", // base64 encoded
            "signalStrength": -80
        },
        {
            "macAddress": "...", // base64 encoded
            "signalStrength": -75
        }
    ]
}

In this case you must configure the Wifi payload field in the LoRa Cloud Geolocation configuration to access_points.

GNSS

When using GNSS based geolocation, you must configure a payload decoder to split the GNSS payload part from the uplink FRMPayload. For example, your application might not only send the GNSS payload, but also sends the number of satellites.

Example payload decoder:

// bytes has the following encoding:
// [Sat. count (uint8): 1 byte] | [LR1110 GNSS payload: remaining bytes ]
function Decode(fPort, bytes, variables) {
  return {
    "sat_count": bytes[0],
    "lr1110_gnss": bytes.slice(2, bytes.length)
  };
}

In the above case, you must configure the GNSS payload field in the LoRa Cloud Geolocation configuration to lr1110_gnss.

When using the GNSS resolver, either the timestamp included the GNSS payload or the receive timestamp (of the uplink) can be used.

LoRa Cloud Device & Application Services (DAS)

LoRa Cloud Device & Application Services comprise a set of full life-cycle management features for LoRa-based devices. When enabled, ChirpStack Application Server will:

  • Forward uplink meta-data for each received uplink frame
  • Forward uplink meta-data + decrypted payload for each uplink received on the configured DAS Modem port.