Multicast configuration

Hi All,

I am trying to understand the mechanism of multicast as I cannot seem to get it right. I have a few questions…

  1. Whether a multicast device should join using ABP or OTAA
  2. Whether AppSKey and NwkSKey should be the same on all multicast devices
  3. Is module NwkSKey synonymous with Chirpstack “Multicast network session key”
  4. Is module AppSKey synonymous with Chirpstack “Multicast application session key”
  5. The Multicast-groups Data-rate & Frequency - is this something that should also be programmed on the module?
  6. How can one device be part of more than one multicast groups
  7. How does one load a downlink payload for the multicast group ? Can it be done through the webUI?
1 Like

Hi, I think your are a bit lost with this issues, hope to help you =).

  1. Devices are set to work on ABP or OTAA activation, but not in both (at least not in the majority of devices, there are some that their firmware allow them to work on both methods of authentication). So before trying to put them to work in any of them, make sure it is available.

  2. AppSKey and NwksKey are different in any device. The difference in ABP is that the keys are hardcoded into the device memory and you cannot modifiy them at any time. On the other hand, OTAA gives different keys ANY TIME A DEVICE JOINS THE SERVER.

  3. No.

  4. No.

  5. You do not need to programm the devices for different Data Rate and Frequency subbands. You configure it with the user interface (for example, at Thingsboard or TTN or Chirpstack UI).

  6. I think it is not allowed. You may have one devices working on different applications. But multicasting does not allow it to. (The devices are under ONE multicast group at a time).

  7. Yes, off course it can be done in the web UI. You only need to pair your multicast group with your desired device profile, and then in the Device Profile you have a window called “CODEC”. There you can set uplink and downlinks.

1 Like

Thanks for your patience, I’m still not understanding the procedure to add devices to a a multicast group.

I would think there should be some common details that will allow them to all listen for the same broadcast. I thought that if they shared the same key this would be the only way to broadcast to all.
I guess OTAA wouldn’t make sense in this case because they would all be different. I read on some other resources that a multicast group is a virtual ABP with shared session keys.

Perhaps I explained myself incorrectly with regards to load a downlink. What I meant was, how do I execute sending a payload to the multicast group? can it be done in the UI?

Blockquote
Perhaps I explained myself incorrectly with regards to load a downlink. What I meant was, how do I execute sending a payload to the multicast group? can it be done in the UI?
Blockquote

Yes, it can be done through the Chirpstack UI for example. Or with Thingsboard.
In any server you use, you should find the way to broadcast all the devices in the group.

Can someone please show me where in chirpstack UI you can send the downlink payload to a multicast group

1 Like

Hi @xarionxrc

For multicast downlink UI not available in chirpstack UI you need to use REST API for multicast downlink.
Thanks

Hi @sagarpatel

Thanks for your reply, I see there are examples sending a downlink to a device but not to the gateway/path (as i would presume the multicast needs)

Could you help directly me how to send this payload to the gateway/path?

Many thanks
Xarion

Hi @sagarpatel , I am trying to send a multicast downlink using Swagger UI .In the swagger UI ,it is shows successful ,but when I am trying to check whether actually downlink was sent or not using ( MulticastGroupService/MulticastGroupService_ListQueue) ,it shows ```
{
“items”:
}

What could be the possible issue ? Do we have to change “fPort”: value to some other value ? For unicast downlink ,I am using “fPort” = 1 .Any help would be greatly appreciated .

Request URL : 
 http://xxxxx/#/MulticastGroupService/MulticastGroupService_Enqueue

curl -X 'POST' \
  'http://xxxxxxxxxxxxxxx/api/multicast-groups/12735f58-dc4d-421e-8c97-4055fa944246/queue' \
  -H 'accept: application/json' \
  -H 'Grpc-Metadata-Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxI' \
  -H 'Content-Type: application/json' \
  -d '{
  "queueItem": {
    "data": "AQ==",
    "fCnt": 0,
    "fPort": 1
  }
}

Response : 
{
  "fCnt": 2
}

==================================================
Request : 
http://xxxxxxxx/#/MulticastGroupService/MulticastGroupService_ListQueue

curl -X 'GET' \
  'http://xxxxxxxxxxxx/api/multicast-groups/12735f58-dc4d-421e-8c97-4055fa944246/queue' \
  -H 'accept: application/json' \
  -H 'Grpc-Metadata-Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxx'

Response : 
{
  "items": []
}

fPort=1 is OK for multicast downlink.

I tested multicast OK.
Have to set Class C to node and to Multicast group.
Have to set the default DR and frequency in Multicast group.
And have to use ChirpStack API to add device to Multicast group.

Hi @baleshwar

If you send a multicast downlink via Swagger API, the chirpstack server will immediately enqueue a multicast downlink to the device via gateway so that you won’t see any lists in the downlink queue.

Hi @IoTThinks , Thanks for your reply .

Node is already set to class C using “Device profile” in Chirpstack UI .
Multicast group is already set to Class C using configuration tab in Chirpstack UI .
I have set default DR = 2 ,frequecy = 866550000 Hz for IN865 region as given in the Chipstack UI .

I have set the "Frame-counter = 4 for the multicast group " .Is this OK ?

I have created Multicast group using Chirpstack UI and added devices from UI .Is it compulsory to create multicast group and add devices using chirpstack API for multicast downlink to work ?

I am asking this because if I list the available multicast groups using Swagger UI ,it shows all the groups with details that have been created using Chipstack UI and not Chipstack API .

Request URL : http://localhost :8090/api/multicast-groups?limit=8&applicationId=xxxxxxxxxxxxxxxxxxxxx

Response :
{
  "totalCount": 2,
  "result": [
    {
      "id": "xxxxxxxxxxxxxxxxxxxxx",
      "createdAt": "2024-11-05T10:57:25.110398Z",
      "updatedAt": "2024-11-05T10:58:03.904660Z",
      "name": "Block1",
      "region": "IN865",
      "groupType": "CLASS_C"
    },
    {
      "id": "xxxxxxxxxxxxxxxxxxxxxf",
      "createdAt": "2024-11-05T11:16:15.685926Z",
      "updatedAt": "2024-11-05T11:16:15.685926Z",
      "name": "Block2",
      "region": "IN865",
      "groupType": "CLASS_C"
    }
  ]
}

Any help would be appreciated ?

Thanks

Hi @sagarpatel , Thanks for your reply .

Is there any way we can check the downlink received by node in the chirpstack UI itself using multicast downlink. Is the downlink done by multicast will not be reflected in the “Queue” tab of a particular node which is a part of that multicast group .

Downlink whether unicast ,or multicast , the end destination is the node itself . If a node is receiving something from muticast downlink , will it not be reflected here ?

Any help is greatly appreciated .

Thanks

I believe there is no option to add devices to new Multicast group.
Or new Chirpstack version has the GUI to do so?
If yes, please help to give me your screenshot.

Else, this is the REST API to add a device to multicast.

This is the one to send message to multicast group.
The data will be treated as base64.
And you must set fPort to something > 0 like 1, 2, 3.

In my test, the multicast downlink will not be shown in Device > Queue.
I remember it is not shown in Device > Events / LoRaWAN Frames too.

However, it is shown in Gateway > Frames.
You set fPort to something special like 68 and check for Unconfirmed Downlink.

Btw, I tested with ChirpStack + Dragino LPS8 + RAK3172.
Hope it helps.

I believe there is no option to add devices to new Multicast group.
Or new Chirpstack version has the GUI to do so?
If yes, please help to give me your screenshot.

Hi @IoTThinks , the new chirpstack version provides the GUI to create multicast group & adding devices to it . Please check the below link for it .

https://forum.chirpstack.io/t/add-devices-to-multicast-group/14110/2

Btw , Thanks for your detailed reply .

1 Like

Woah, I see.
Thanks a lot.