how to batch add devices to a rak lorawan® gateway

Learn how to register multiple LoRaWAN devices on RAK gateways in Built-in Network Server (NS) mode using CSV import and bulk generate.

This guide is for large-scale deployments where consistency and simplified device management are critical.

Key Benefits

  • Boost Efficiency: Reduce manual configuration time and accelerate deployment.

  • Flexible Management: Use CSV import for compatibility with standard data tools, enabling scalable and standardized onboarding.

Configuration

This section provides step-by-step instructions for configuring applications and registering devices in batch mode, with all supported methods and recommended best practices.

Prerequisites

Before starting, ensure the gateway is running in Built-in Network Server mode and that your device information (e.g., DevEUI, AppKey) is prepared in the correct format.

Create an Application

Applications group devices and define join/authentication parameters.

  1. Log in to the gateway’s web UI.
WisGate login interface
Figure 1: WisGate login interface
  1. Navigate to the LoRa > Applications tab.
  2. To add a new application, click Add application or add one now.
Add application in WisGateOS 2 web UI
Figure 2: Add application in WisGateOS 2 web UI
  1. Set the following parameters:

  • Application name: A unique name for the application.

  • Application description: (Optional) description of the application.

  • Application Type

    • Unified Application key: All devices will use the same application key.

    • Separate Application keys: Each device or group of devices has a unique key.

  • Auto Add Device: When enabled, devices with a matching AppKey and Application EUI will be added automatically after a successful join request. This is useful for mass deployment of identical devices.

  • Application Key: Required for Unified Application Key setup.

  • Application EUI: Required for automatic device registration when Auto Add Device is enabled.

  • Payload type

    • None:  No specific payload format.

    • CayenneLPP: Payload format based on the Cayenne Low Power Payload (LPP) standard.

  • Only forward data object: If enabled, the gateway will only forward the raw data object to the server without processing or decoding it.

  • Decode Type

    • Base 64

    • HEX string

  • Report LoRa Radio Information: If enabled, the gateway will include LoRa signal data (RSSI, SNR, etc.) in the payload sent to the server. This may increase packet size.

  • Enable HTTP/HTTPS Integration Parameters: If enabled, allows forwarding of uplink data and events to external HTTP/HTTPS endpoints.

    • Header name

    • Header value

    • Uplink data URL

    • Join notification URL

    • Ack notification URL

    • Device-status notification URL

    • Maximum number of concurrent connections

    • Maximum length of the queue

Enter new application details
Figure 3: Enter new application details

5. Click Save application.

Configure Device Parameters

Before registering devices using any method, you must provide basic configuration parameters, such as activation mode, device keys, class, and LoRaWAN version. 

The following section outlines the fields required for both OTAA and ABP devices.

  1. Navigate to the LoRa > Applications tab.

  2. Click on the application where the device should be added.

 

Enter new application details
Figure 4: Enter new application details
🗒️
NOTE

You can also click Add end devices in the END DEVICES list. This option appears only if no end devices are currently registered.

  1. In the End devices tab, click Add end device.

Add end device
Figure 5: Add end device
  1. Set the following device parameters:

  • Activation Mode

    • OTAA: Over-The-Air Activation

    • ABP: Activation By Personalization

  • End device (group) name: Enter a unique name for the device or group.

  • End device description (optional): Provide a brief description.

  • Enable LPTP: (Optional) Enables RAK’s private LoRaWAN fragmentation protocol for sending data that exceeds the maximum payload size.

  • Application Key: Required for OTAA mode (especially when using Separate Key mode).

  • Class

    • Class A

    • Class B

    • Class C

🗒️
NOTE

If using Class B, ensure the gateway supports GPS time sync and has beaconing enabled.

  • Application Session Key: Required for ABP devices.

  • Network Session Key: Required for ABP devices.

  • Frame Counter Width: Sets the counter size for message tracking.
  • LoRaWAN MAC Version

    • V1.0.2

    • V1.0.3

  • LoRaWAN Regional Parameters revision

    • A

    • B

Enter device parameters
Figure 6: Enter device parameters
  1. Click Add end devices to save the settings and proceed.

Add End Devices

WisGateOS 2 offers two methods for registering end devices, each suited to different deployment scales and automation levels:

  • CSV Import: Upload a prepared device list for bulk registration.
  • Bulk Generate: Automatically generate sequential device entries based on a base DevEUI (and DevAddr for ABP).

CSV Import

CSV importing is the most efficient method for registering large numbers of devices.

  1. Prepare a CSV file in one of two ways:
  • Download the template by clicking download it here.
  • Create your file following the required structure.

 

Prepare a CSV file
Figure 13: Prepare a CSV file

Required CSV fields:

Mode Required Fields Parameter Format

OTAA

End Device EUI

16-digit EUI from product label

ABP

End Device EUI, End Device Address

16-digit EUI and 8-digit address from product label

‼️
IMPORTANT

The CSV file size must not exceed 1 MB.

  1. Click choose file or drag and drop your CSV into the upload box.
🗒️
NOTE

The system will verify all entries together in one batch.

  • Valid devices appear under the End devices list.
  • Duplicate or invalid devices appear under End devices with error for correction.

 

End devices list showing valid entries and errors
Figure 14: End devices list showing valid entries and errors
  1. To finalize the registration, click Add end devices, then Add to confirm and proceed.
Click Add end devices
Figure 15: Click Add end devices

Bulk Generate

Bulk generating is ideal for production-line provisioning or when devices follow a predictable sequence.

  1. In the Adding end devices interface, enter the following:
  • End Device EUI (Main): Base EUI to start the sequence. (Required)
  • End device address (Main): Base address. (Required for ABP mode)
  • Step (Optional):  HEX increment value.
  • Count (Optional): Number of devices to generate.

 

Enter device EUI, Step, and Count
Figure 10: Enter device EUI, Step, and Count
  1. Click Add to "End Devices list". The system will verify the generated entries.

 

End devices list showing valid entries and errors
Figure 11: End devices list showing valid entries and errors
  1. To finalize the registration, click Add end devices, then Add to confirm and proceed.

 

Click Add end devices
Figure 12: Click Add end devices

Troubleshooting

Issue Possible Cause Solution

CSV Import Error: "Invalid"

The DevEUI is not 16 hexadecimal digits, or the field is empty.

Make sure the DevEUI is correctly formatted as 16 hexadecimal digits, then retry.

Adding process slows or hangs

System resource limits on OpenWrt.

Split the devices into smaller batches (e.g., 100-200 devices per group) before registering.

FAQs

  1. What’s the maximum number of devices I can add at once?
    You can add up to 1024 devices per application. Create additional applications if you need more.
  2. What happens if I upload a CSV file with duplicate devEUIs?
    Duplicates appear under End Devices with an error and are not registered. Correct them and re-upload the CSV.
  3. Can I re-upload the same CSV after fixing errors?
    Yes. After correcting the file, re-upload it. Only valid, non-duplicate devices will be registered.
  4. Does Auto-Add Device work with both OTAA and ABP?
    No. It only works with OTAA, since it requires the device to send a join request with a matching AppKey and AppEUI.

Changelog
  • Version 1 - Batch Adding Devices to a RAK LoRaWAN Gateway
    • Date Published: 09/04/2025


 

Updated