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

      Hardware

      • Overview
      • Devices
        • Adding Devices
        • Configuring Devices
          • Device location settings
          • MAC Settings
          • Class B Settings
          • Class C Settings
          • Multicast Groups
          • Downlink Queue Operations
          • Payload Crypto Override
          • Relay Settings
        • Concepts
        • Models
        • Troubleshooting Devices
      • Gateways
      • Works with The Things Stack

      Multicast Groups

      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

      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, where multiple physical devices share the same DevAddr and session keys. It 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

      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-b \
       --mac-settings.ping-slot-periodicity PING_EVERY_4S
      

      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"
            }
          }
        ]
      }
      

      How to update MAC Settings of a Multicast device?

      Changing MAC settings of a Multicast device (virtual ABP device) requires performing the below steps:

      1. Change MAC settings.
      2. Reset the Multicast device at the Network Server end as explained here to apply above mentioned changes.
      ← Class C Settings Downlink Queue Operations →

      On this page

      • Class B and Multicast
      • Creating a Multicast Group
      • Example
      • How to update MAC Settings of a Multicast device?

      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