Skip to content
The Things Stack documentation home
Getting Started Concepts Cloud Enterprise Integrations API Hardware
Getting Started Concepts
Cloud Enterprise
Integrations API Hardware
Get The Things Stack

    Recent searches

      Popular pages

      • Getting Started
      • Adding Gateways
      • Adding Devices
      • Payload Formatters
      • Webhooks
      • Authentication

      No results for “”.

      • Check the spelling, or try fewer or more general words.
      • Ask the community on The Things Network Forum
      • Contact support
      ↑↓ to navigate ↵ to open Esc to close

      Integrations

      • Overview
      • Adding Applications
      • Data Formats
      • Payload Formatters
      • Webhooks
      • Storage Integration
      • Integrate with popular IoT platforms
      • Other integrations
      • Application Packages
        • Managing Application Packages using the CLI
        • Managing Application Packages using the API
        • LoRa Cloud Modem and Geolocation Services
      • Examples

      LoRa Cloud Modem and Geolocation Services

      Updated 20 January 2025 Edit on GitHub
      Copy page
      • View as MarkdownThis page as plain text
      • Open in ChatGPTAsk questions about this page
      • Open in ClaudeAsk questions about this page

      The LoRa Cloud Modem and Geolocation Services v1 application package communicates the uplinks received from a compatible device to the LoRa Cloud Modem and Geolocation Services, and schedules the downlinks received from the service back to the device.

      More information on the LoRa Cloud Modem and Geolocation Services can be found in the official LoRa documentation.

      Creating a New Uplink Token

      In order to use the LoRa Cloud Modem and Geolocation Services application package, a new access token must be created in order to allow the Application Server to send the uplinks to the Device & Application Services.

      The new token can be created in the LoRa Cloud Modem and Geolocation Services portal, in the Token Management section.

      Token creation

      After filling in the token name and clicking the Add New Token button, the token will be created.

      Token created

      Enabling the Package

      Command-line interface only

      The instructions below use the command-line interface (CLI).

      Learn how to install the CLI

      The package can now be enabled using the default-associations set command:

      APP_ID="app1"
      F_PORT=199
      # Create a JSON formatted file containing the uplink token
      echo '{ "token": "AQEAdqwV67..." }' > package-data.json
      # Create the association
      ttn-lw-cli applications packages default-associations set $APP_ID $F_PORT --package-name lora-cloud-device-management-v1 --data-local-file package-data.json
      

      This will enable the package on FPort 199 of all of the devices of application app1. You can now use the LoRa Cloud Modem and Geolocation Services in order to manage your device!

      Output
      {
        "ids": {
          "application_ids": {
            "application_id": "app1"
          },
          "f_port": 199
        },
        "created_at": "2019-12-18T10:35:15.565807113Z",
        "updated_at": "2019-12-18T22:06:21.693359719Z",
        "package_name": "lora-cloud-device-management-v1",
        "data": {
          "token": "AQEAdqwV67..."
        }
      }
      

      Using a Custom Server URL

      Command-line interface only

      The instructions below use the command-line interface (CLI).

      Learn how to install the CLI

      The package may be configured to use a custom server URL using the package data:

      # Create a JSON formatted file containing the uplink token and the server URL
      echo '{ "token": "AQEAdqwV67...", "server_url": "https://app.example.com/" }' > package-data.json
      # Create or update the default association
      ttn-lw-cli applications packages default-associations set $APP_ID $F_PORT --package-name lora-cloud-device-management-v1 --data-local-file package-data.json
      
      Output
      {
        "ids": {
          "application_ids": {
            "application_id": "app1"
          },
          "f_port": 199
        },
        "created_at": "2020-05-14T02:04:45.286874524Z",
        "updated_at": "2020-05-14T02:04:45.286874524Z",
        "package_name": "lora-cloud-device-management-v1",
        "data": {
          "server_url": "https://app.example.com",
          "token": "AQEAdqwV67..."
        }
      }
      

      Package Data JSON Schema

      The package data format is common between both default associations and associations, and should contain the following fields:

      Field Type Description Required Default value
      token string The acces token to be used by the package to submit uplinks to the LoRa Cloud Modem and Geolocation Services Yes None.
      server_url URL The custom base URL to be used for service communication No https://mgs.loracloud.com

      Fields can be customized on a per device basis, by overriding the field in the package data of the association.

      ← Managing Application Packages using the API Examples →

      On this page

      • Creating a New Uplink Token
      • Enabling the Package
      • Using a Custom Server URL
      • Package Data JSON Schema

      Sections

      Getting Started

      Concepts

      Cloud

      Enterprise

      Integrations

      API

      Hardware

      Sitemap

      View our Sitemap

      Contributing

      GitHub

      About Us

      The Things Industries

      Privacy Policy

      Cookie settings

      Cookie Settings

      We use cookies to enhance your experience, analyze site traffic and deliver personalized content. Read our Privacy Policy.

      Cookie categories