# Specify multicast downlink data rate

**URL:** <https://www.thethingsnetwork.org/forum/t/specify-multicast-downlink-data-rate/51171>\
**Category:** The Things Stack v3\
**Created:** [August 31, 2021, 8:45am UTC](https://www.thethingsnetwork.org/forum/t/specify-multicast-downlink-data-rate/51171 "2021-08-31T08:45:06Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![christoph-nils](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/christoph-nils/32/42764_2.png) [@christoph-nils](https://www.thethingsnetwork.org/forum/u/christoph-nils)\
**Post date:** [August 31, 2021, 8:45am UTC](https://www.thethingsnetwork.org/forum/t/specify-multicast-downlink-data-rate/51171/1 "2021-08-31T08:45:06Z")

</div>

Hello,

I am trying to implement FUOTA with multicast downlinks. When I queue downlinks on a single device, it sends with SF9, but when I send a multicast, it always sends with SF12. After searching for a while, I have not found a way to change this behavior. No options were found for either the application, the multicast group or per downlink.  
Is there any way to change the data rate? And if not, why not?  
If I understand it correctly, under normal circumstances DR0 & DR1 should be tried to avoid.  
[Changing Data Rate on TTN stack (Multicast)](https://www.thethingsnetwork.org/forum/t/changing-data-rate-on-ttn-stack-multicast/46430/9)

> DR0 & DR1 are not permitted for normal operation.

Someone else has already asked a similar question, but never received an answer.  
[LoRaWAN Multicast-Frame Payload size (TTN/TTI)](https://www.thethingsnetwork.org/forum/t/lorawan-multicast-frame-payload-size-ttn-tti/42371/9)

> I would like to do the same SF switching with multicast TTN virtual devices.

---

<div class="post-metadata">

**Author:** ![christoph-nils](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/christoph-nils/32/42764_2.png) [@christoph-nils](https://www.thethingsnetwork.org/forum/u/christoph-nils)\
**Post date:** [September 2, 2021, 7:27am UTC](https://www.thethingsnetwork.org/forum/t/specify-multicast-downlink-data-rate/51171/2 "2021-09-02T07:27:39Z")

</div>

I got help:  
It is possible to change the datarate from the CLI

> ttn-lw-cli end-devices set --application-id --device-id --mac-state.current-parameters.rx2-data-rate-index --mac-state.desired-parameters.rx2-data-rate-index

or via the API

> curl --location --request PUT ‘https://#server#/api/v3/ns/applications/#app-id#/devices/#device-id#’   
> –header ‘Authorization: Bearer XXXXXXXXXXXXXXXX’   
> –header ‘Content-Type: application/json’   
> –data-raw ‘{  
> “end\_device”: {  
> “mac\_state”:{  
> “current\_parameters”: {  
> “rx2\_data\_rate\_index”: “DATA\_RATE\_3”  
> },  
> “desired\_parameters”:{  
> “rx2\_data\_rate\_index”: “DATA\_RATE\_3”  
> }  
> }  
> },  
> “field\_mask”: {  
> “paths”:[“mac\_state.current\_parameters.rx2\_data\_rate\_index”,“mac\_state.desired\_parameters.rx2\_data\_rate\_index”]  
> }  
> }’

---

<div class="post-metadata">

**Author:** ![rodrigo\_sosteco](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/rodrigo_sosteco/32/35697_2.png) [@rodrigo\_sosteco](https://www.thethingsnetwork.org/forum/u/rodrigo_sosteco)\
**Post date:** [December 7, 2022, 6:21pm UTC](https://www.thethingsnetwork.org/forum/t/specify-multicast-downlink-data-rate/51171/3 "2022-12-07T18:21:41Z")

</div>

Very useful, thanks!!

---

<div class="post-metadata">

**Author:** ![rodrigo\_sosteco](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/rodrigo_sosteco/32/35697_2.png) [@rodrigo\_sosteco](https://www.thethingsnetwork.org/forum/u/rodrigo_sosteco)\
**Post date:** [December 9, 2022, 9:37am UTC](https://www.thethingsnetwork.org/forum/t/specify-multicast-downlink-data-rate/51171/4 "2022-12-09T09:37:15Z")

</div>

I have been working with FUOTA in TTI, but i have some problems with timing.

I have an issue with Schedule time in TTI, in order to Send Firmware packets I use a MQTT client that publish in MQTT API in TTI, all is working ok.  
(FUOTA Server) MQTT client publish the message—\> MQTT server receive it—\> Network server manage it and send it to Gateway–\> End device receive it  
The issue is that the time between the Network Server receive it and schedule it in Gateway is almost 2 seconds. ( I am working in DR3 = 400 ms of transmision) The time that i save changing from DR0 to DR3 is lost in Network Server internal task, Is there any way to improve it?

---

<div class="post-metadata">

**Author:** ![christoph-nils](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/christoph-nils/32/42764_2.png) [@christoph-nils](https://www.thethingsnetwork.org/forum/u/christoph-nils)\
**Post date:** [December 9, 2022, 3:34pm UTC](https://www.thethingsnetwork.org/forum/t/specify-multicast-downlink-data-rate/51171/5 "2022-12-09T15:34:45Z")

</div>

At fuota the packages are available in advance.  
When the update is sent to a single device, all packets can be queued and the network server takes care of the delivery on its own.  
With multicast, the devices are in class c mode and the receive window gets irrelevant.

Downlinks can also be scheduled for a specific time when they should be sent.

---

<div class="post-metadata">

**Author:** ![rodrigo\_sosteco](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/rodrigo_sosteco/32/35697_2.png) [@rodrigo\_sosteco](https://www.thethingsnetwork.org/forum/u/rodrigo_sosteco)\
**Post date:** [December 12, 2022, 8:21am UTC](https://www.thethingsnetwork.org/forum/t/specify-multicast-downlink-data-rate/51171/6 "2022-12-12T08:21:43Z")

</div>

Thanks for your response Christoph,

How can i schedule multicast downlink for a specific time? ( i would like to schedule it as soon as possible)

---

<div class="post-metadata">

**Author:** ![christoph-nils](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/christoph-nils/32/42764_2.png) [@christoph-nils](https://www.thethingsnetwork.org/forum/u/christoph-nils)\
**Post date:** [December 12, 2022, 10:14am UTC](https://www.thethingsnetwork.org/forum/t/specify-multicast-downlink-data-rate/51171/7 "2022-12-12T10:14:54Z")

</div>

When you create a downlink json object add “absolute\_time”.  
Here is a link to the documentation: [Message ApplicationDownlink.ClassBC](https://www.thethingsindustries.com/docs/reference/api/end_device/#message:ApplicationDownlink.ClassBC)

---

<div class="post-metadata">

**Author:** ![vman12311](https://www.thethingsnetwork.org/forum/letter_avatar_proxy/v4/letter/v/cab0a1/32.png) [@vman12311](https://www.thethingsnetwork.org/forum/u/vman12311)\
**Post date:** [September 6, 2023, 3:39am UTC](https://www.thethingsnetwork.org/forum/t/specify-multicast-downlink-data-rate/51171/8 "2023-09-06T03:39:28Z")

</div>

Here is how to complete a mac settings PUT request for schedule\_downlinks  
Thanks for your help Christoph…

```auto
  curl --location \
  --header 'Authorization: Bearer NNSXS.(API_TOKEN)' \
  --header 'Content-Type: application/json' \
  --request PUT \
  --data-raw '{
   "end_device":{
	  "mac_settings":{
	  "schedule_downlinks": true
	}},
    "field_mask": {
      "paths": [
        "mac_settings.schedule_downlinks"
      ]
    }
  }' \
  'https://(thingsstackURL).com/api/v3/ns/applications/application-name/devices/device-name'

```
