Using adaptive data rate (ADR) with AWS IoT Core for LoRaWAN - AWS IoT Wireless

Using adaptive data rate (ADR) with AWS IoT Core for LoRaWAN

To optimize the device transmission power consumption while making sure that messages from the end devices are received at the gateways, AWS IoT Core for LoRaWAN uses adaptive data rate. Adaptive data rate instructs the end devices to optimize the data rate, transmission power, and the number of retransmissions while attempting to reduce the error rate of the packets received at the gateways. For example, if your end device is located close to the gateways, adaptive data rate reduces the transmission power and increases the data rate.

How adaptive data rate (ADR) works

To enable ADR, your device must set the ADR bit in the frame header. Once the ADR bit is set, AWS IoT Core for LoRaWAN sends the LinkADRReq MAC command and your devices respond with the LinkADRAns command which includes the ACK status of the ADR command. Once your devices ACK the ADR command, it will then follow the ADR instructions from AWS IoT Core for LoRaWAN and adjust the transmission parameter values for optimal data rate.

The AWS IoT Core for LoRaWAN ADR algorithm uses the SINR information in the uplink metadata history to determine the optimal transmission power and data rate to use for the devices. The algorithm uses the 20 most recent uplink messages that start once the ADR bit is set in the frame header. To determine the number of retransmissions, it uses the packet error rate (PER), which is a percentage of the total number of packets that are lost. When you use this algorithm, you can only control the range of data rates, that is, the minimum and maximum limits for the data rates.

Configure data rate limits (CLI)

By default, AWS IoT Core for LoRaWAN will perform ADR when you set the ADR bit in the frame header of your LoRaWAN device. You can control the minimum and maximum limits for the data rate when creating a service profile for your LoRaWAN devices using the AWS IoT Wireless API operation CreateServiceProfile, or the AWS CLI command, create-service-profile.

Note

You cannot specify the maximum and minimum data rate limits when creating a service profile from the AWS Management Console. It can only be specified using the AWS IoT Wireless API or the AWS CLI.

To specify the minimum and maximum limits for the data rate, use the DrMin and DrMax parameters with the CreateServiceProfile API operation. The default minimum and maximum data rate limits are 0 and 15. For example, the following CLI command sets a minimum data rate limit of 3 and a maximum limit of 12.

aws iotwireless create-service-profile \ --lorawan DrMin=3,DrMax=12

Running this command generates an ID and an Amazon Resource Name (ARN) for the service profile.

{ "Arn": "arn:aws:iotwireless:us-east-1:123456789012:ServiceProfile/12345678-a1b2-3c45-67d8-e90fa1b2c34d", "Id": "12345678-a1b2-3c45-67d8-e90fa1b2c34d" }

You can get the values of the parameters specified using the AWS IoT Wireless API operation GetServiceProfile, or the AWS CLI command, get-service-profile.

aws iotwireless get-service-profile --id "12345678-a1b2-3c45-67d8-e90fa1b2c34d"

Running this command generates the values for the service profile parameters.

{ "Arn": "arn:aws:iotwireless:us-east-1:651419225604:ServiceProfile/12345678-a1b2-3c45-67d8-e90fa1b2c34d", "Id": "12345678-a1b2-3c45-67d8-e90fa1b2c34d", "LoRaWAN": { "UlRate": 60, "UlBucketSize": 4096, "DlRate": 60, "DlBucketSize": 4096, "AddGwMetadata": false, "DevStatusReqFreq": 24, "ReportDevStatusBattery": false, "ReportDevStatusMargin": false, "DrMin": 3, "DrMax": 12, "PrAllowed": false, "HrAllowed": false, "RaAllowed": false, "NwkGeoLoc": false, "TargetPer": 5, "MinGwDiversity": 1 } }

If you've created multiple profiles, you can use the API operation, ListServiceProfiles, or the AWS CLI command, list-service-profiles to list the service profiles in your AWS account, and then use the GetServiceProfile API or the get-service-profile CLI command to retrieve the service profile for which you customized the data rate limits.