Description

Multicast is group communication where data transmission is addressed to a group of destination devices simultaneously. Multicast can be one-to-many or many-to many distribution and can be widely used in control in bulks. Multicast should not be confused with physical layer point-to-multipoint communication. 

 

Milesight LoRaWAN Gateway supports creating Class B or Class C multicast groups to send downlink messages to a group of end devices. This article will describe how to set up configurations to use multicast function.


Requirement

  • Milesight LoRaWAN Gateway: UG6x, UG56
  • LoRaWAN nodes which supports Multicast: take Milesight WS50x, WS51x, WS52x, WS558 in this example
  • MQTT Broker
  • MQTT Client software: MQTT Explorer

 

Configuration

Set up Multicast Configurations

1. Connect LoRaWAN node devices to gateway according to this article

2. Go to Network Sever -> Multicast Groups -> Add.

3. Fill in the correct information on the options, add end devices which you want to add to the multicast group, then click Save. Ensure that all device’s application ports, 

 

Group Name: Identify the group, show the name of the group.

Multicast Address: Unique 8-digit address to distinguish different multicast groups. Please keep multicast address be the same between gateway and all sensors In a multicast group.

Multicast Network Session Key: 32-digit key. Please keep this key be the same between gateway and all sensors in a multicast group.

Multicast Application Session Key: 32-digit key. Please keep this key be the same between gateway and all sensors in a multicast group.

Class Type: Class B and Class C is optional, please select this according to sensor type which is in multicast group.

Datarate: the datarate of the node receiving downlinks. It’s usually the same as RX2 datarate of end devices.

Frequency: downlink frequency to all devices in this group. It’s usually the same as RX2 frequency of end devices.

Frame-counter: Frame counter of downlink commands. It’s 0 by default.

Add Device: select the devices you need to control in this group.

 

 

Note: if you use Milesight sensors, please run Toolbox App, go to Setting -> LoRaWAN Settings, select one multicast group to enable and configure the parameters, then write to sensor via NFC. Every device can be added to 4 multicast groups at most.


Multicast Address: Unique 8-digit address to distinguish different multicast groups. Please keep multicast address be the same between gateway and all sensors In a multicast group.

Multicast Network Session Key: 32-digit key. Please keep this key be the same between gateway and all sensors in a multicast group.

Default values:

Multicast Group 1: 5572404C696E6B4C6F52613230313823

Multicast Group 2: 5572404C696E6B4C6F52613230313824

Multicast Group 3: 5572404C696E6B4C6F52613230313825

Multicast Group 4: 5572404C696E6B4C6F52613230313826

 

Multicast Application Session Key: 32-digit key. Please keep this key be the same between gateway and all sensors in a multicast group.

Default values:

Multicast Group 1: 5572404C696E6B4C6F52613230313823

Multicast Group 2: 5572404C696E6B4C6F52613230313824

Multicast Group 3: 5572404C696E6B4C6F52613230313825

Multicast Group 4: 5572404C696E6B4C6F52613230313826



Send downlink command on Gateway

Go to Network Server -> Packets, select one multicast group, set the type and fill in the command, and click Send

 

Send downlink command via MQTT

1. Connect gateway to MQTT broker according to How to connect LoRaWAN Gateway to MQTT Broker

2. Login to gateway GUI, go to Network Server -> Application, define a multicast downlink topic. If left blank, the default topic is multicast/tx. In this example, we set topic as /multicast/down

 

3. Connect another MQTT client software to the broker, publish a topic as follows (take MQTT Explorer as example): 

Topic: /multicast/down

Format: json

Content: {"multicastName": "Multicast-Kristy", "fPort": 85, "data":"/wOwBA=="} 

or {“confirmed”: false, "multicastName": "Multicast-Kristy", "fPort": 85, "data":"/wOwBA=="}

 

Note: 

multicastName: please check it under Network Server -> Multicast Groups -> Group Name

fPort: device application port, it’s 85 by default for Milesight sensors

data: please check downlink command with sensor’s user guide, and please use this tool to convert the type from “Hex” to “Base64”.

 

4. After sending, you can go to Network Server -> Packets to double check if there is multicast downlink command.

 

 

----END----