v3.23.1

Getting Started Devices Gateways Integrations Reference
Get The Things Stack

Devices

    Overview
  • Adding Devices
  • ABP vs OTAA
  • Best Practices
  • Class B
  • Class C
  • Multicast
  • Downlink Queue Operations
  • Confirmed Downlinks Behavior
  • MAC Settings
  • ATECC608A/B Secure Elements
  • Device Claiming
  • End Device Templates
  • Generating a QR Code
  • The Things Node
  • The Things Uno
  • Troubleshooting Devices

Multicast

It is also possible to create a Class B or Class C multicast group to send downlink messages to a group of end devices. A multicast group is a virtual ABP device (i.e. shared session keys), does not support uplink, confirmed downlink nor MAC commands.

We define some user parameters that will be used below:

APP_ID="app1" 
DEVICE_ID="dev1"
FREQUENCY_PLAN="EU_863_870"
LORAWAN_VERSION="1.0.3"
LORAWAN_PHY_VERSION="1.0.3-a"
DEV_ADDR="00E4304D"
APP_SESSION_KEY="A0CAD5A30036DBE03096EB67CA975BAA"
NWK_SESSION_KEY="B7F3E161BC9D4388E6C788A0C547F255"

Make sure to modify these according to your setup.

Class B and Multicast

Since there are no uplinks in multicast groups, there is no MAC layer communication between the end device and The Things Stack. Therefore, it is necessary to specify the ping slot periodicity by setting the following parameter:

  • mac-settings.ping-slot-periodicity.value

See the MAC Settings guide for more information about configuring MAC layer parameters.

Creating a Multicast Group

When creating a device, you can specify in the Console and CLI whether it’s a multicast group.

CLI example:

ttn-lw-cli end-devices create $APP_ID $DEVICE_ID \
  --frequency-plan-id $FREQUENCY_PLAN \
  --lorawan-version $LORAWAN_VERSION \
  --lorawan-phy-version $LORAWAN_PHY_VERSION \
  --session.dev-addr $DEV_ADDR \
  --session.keys.app-s-key.key $APP_SESSION_KEY \
  --session.keys.nwk-s-key.key $NWK_SESSION_KEY \
  --multicast \
  --supports-class-c # or --supports-class-b

Please note that a multicast group cannot be converted to a normal unicast device or the other way around.

Note:
Since multicast does not support uplink, the Network Server does not know a downlink path. Therefore, you need to specify a downlink path when scheduling a downlink message.

Example

Command-line interface only

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

Learn how to install the CLI

First, create a multicast group:

ttn-lw-cli end-devices create $APP_ID $DEVICE_ID \
  --frequency-plan-id $FREQUENCY_PLAN \
  --lorawan-version $LORAWAN_VERSION \
  --lorawan-phy-version $LORAWAN_PHY_VERSION \
  --session.dev-addr $DEV_ADDR \
  --session.keys.app-s-key.key $APP_SESSION_KEY \
  --session.keys.nwk-s-key.key $NWK_SESSION_KEY \
  --multicast \
  --supports-class-c

Then, schedule the following message to the Application Server MQTT server or HTTP webhooks. A downlink path must be specified because none is known, as there is no uplink in multicast:

{
  "downlinks": [{
    "frm_payload": "vu8=",
    "f_port": 42,
    "priority": "NORMAL",
    "class_b_c": {
      "gateways": [
        {
          "gateway_ids": {
            "gateway_id": "gtw1"
          },
        },
        {
          "gateway_ids": {
            "gateway_id": "gtw2"
          },
        }
      ],
      "absolute_time": "2019-07-23T13:05:00Z"
    }
  }]
}
← Class C Downlink Queue Operations →

On this page

  • Class B and Multicast
  • Creating a Multicast Group
  • Example

The Things Stack

Getting Started

Devices

Gateways

Integrations

Reference

Contributing

GitHub

Forum

About Us

The Things Network

The Things Industries

About this page

Last changed by Nejra Selimović on 23 Dec 2021.
doc: Remove $ character from code blocks, add variables (#678)

Edit on Github