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.
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 app1 mc1 \
--frequency-plan-id EU_863_870 \
--lorawan-version 1.0.3 \
--lorawan-phy-version 1.0.3-a \
--session.dev-addr 00E4304D \
--session.keys.app-s-key.key A0CAD5A30036DBE03096EB67CA975BAA \
--session.keys.nwk-s-key.key B7F3E161BC9D4388E6C788A0C547F255 \
--multicast \
--supports-class-c # or --supports-class-b
Note:
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 downlink message.Example
Command-line interface only
The instructions below use the command-line interface (CLI).
First, create a multicast group:
$ ttn-lw-cli end-devices create app1 mc1 \
--frequency-plan-id EU_863_870 \
--lorawan-version 1.0.3 \
--lorawan-phy-version 1.0.3-a \
--session.dev-addr 00E4304D \
--session.keys.app-s-key.key A0CAD5A30036DBE03096EB67CA975BAA \
--session.keys.nwk-s-key.key B7F3E161BC9D4388E6C788A0C547F255 \
--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"
}
}]
}