RAK4631 API to change DR

Is there an API I can use to change the DR without resetting the device.
Currently it is set through a call to lmh_init during device setup.
Thanks
Alan

What is the DR?
Thanks

DR stands for ‘Data Rate’

==> lmh_datarate_set

1 Like

@billr

Datarate defines the transfer speed of LoRaWAN packets. Here is an overview of allowed data rates per region. The data rate defines as well the maximum size of the payload. You can see an overview in the maximum payload per region

1 Like

Also important to keep in mind that the maximum payload per region assumes no extra link-level overhead. Sometimes a node’s stack will need to send MAC traffic in the FOpts field, and whatever length is taken up by that reduces what is available for the user (application) payload in that instant.

This tends to happen more in OTAA mode soon after joining, and periodically when ADR is enabled, but it’s theoretically possible in any configuration at any time.

The end result is that if one hopes to transmit the maximum payload, it’s necessary to handle the case where that might temporarily not be possible, and send something shorter instead to get the necessary MAC responses out of the queue.

1 Like