About import file
This topic describes the content of the CSV file you must create to massively add, update or delete devices as explained in Executing bulk operations. Each line in the CSV file allows to either:
- Add or update a LoRaWAN® OTAA device
- Add or update a LoRaWAN® ABP device
- Add or update a cellular device
- Delete a device
To learn more about the parameters to fill in the CSV file, see Device attributes.
-
Field separator
- The comma (
,) is used as the column separator. - Each line represents one operation.
- Each column within an operation must be separated by a comma.
- The comma (
-
Values containing commas
- If a column value contains a comma (such as list of tags or domains), the entire value must be enclosed in double quotes (
"). - This prevents the comma inside the value from being interpreted as a field separator.
- If a column value contains a comma (such as list of tags or domains), the entire value must be enclosed in double quotes (
-
Double quotes inside values
- If a value contains double quotes:
- The column must be enclosed in double quotes.
- Internal double quotes must be escaped by doubling them (
"").
- If a value contains double quotes:
Adding or updating a LoRaWAN® OTAA device
The following columns must be filled to add or update a LoRaWAN® OTAA device.
| Column | Definition | Add | Update |
|---|---|---|---|
| A | Type of operation
| Mandatory | Mandatory |
| B | LoRaWAN® DevEUI or onboarding tag If an onboarding tag is provided in column B when adding a device, elements from columns D, E and F become optional. But, if elements from columns D, E and F are still provided, these elements will be processed over the onboarding tag provided in the column B. To learn more about Onboarding tags, see TR005 LoRaWAN® Device Identification QR Codes. | Mandatory | Mandatory: only DevEUI is supported |
| C | LoRaWAN® DevAddr Only applicable to a LoRaWAN 1.0 device migrated from another network server. | Optional | n/a |
| D | Device model ID Available device model IDs can be retrieved in a CSV file via the MODEL LIST button. | Optional if an onboarding tag is provided in column B, mandatory otherwise. | Optional |
| E | LoRaWAN JoinEUI/AppEUI | Optional if an onboarding tag is provided in column B or if the local Join Server is used, mandatory otherwise. | Optional |
| F | LoRaWAN AppKey Supported encoding modes:
When adding a device: if AppKey is provided, the OTAA device uses the local Join Server; otherwise an external Join Server (identified by its JoinEUI) is used. | Optional | Optional if the local Join Server is used, forbidden otherwise. |
| G | n/a | n/a | n/a |
| H | Features / Connectivity plan ID Features (if Connectivity Plans not displayed in the main menu):
Connectivity plan ID (if Connectivity Plans displayed in the main menu):
| Optional | Optional |
| I | n/a | n/a | n/a |
| J | n/a | n/a | n/a |
| K | Device name | Optional: The device name is automatically set to the DevEUI when not provided. | Optional |
| L | Device latitude (decimal degrees) If provided the manual location mode is automatically activated.
If empty (when adding a device) or | Optional | Optional |
| M | Device longitude (decimal degrees) If provided the manual location mode is automatically activated.
If empty (when adding a device) or | Optional | Optional |
| N | Additional information | Optional | Optional |
| O | No uplink activity alarm configuration XML document:
Default value when adding a device: | Optional | Optional |
| P | n/a | n/a | n/a |
| Q | Motion indicator Value is one of the following:
| Optional: the motion indicator of the device profile will be used when no motion indicator is specified. | Optional |
| R | HSM group ID | Optional if Local Join Server is used, forbidden otherwise. | Optional if Local Join Server is used, forbidden otherwise. |
| S | n/a | n/a | n/a |
| T | Connection IDs Multiple connection IDs may be provided, separated by a comma. | Optional | Optional |
| U | LoRaWAN NwkKey Supported encoding modes:
| Mandatory for LoRaWAN 1.1 device if the local Join Server is used, forbidden otherwise. | Optional for LoRaWAN 1.1 device if the local Join Server is used, forbidden otherwise. |
| V | n/a | n/a | n/a |
| W | AS transport key ID | Optional if the local Join Server is used with HSM, forbidden otherwise. | Optional if the local Join Server is used with HSM, forbidden otherwise. |
| X | Public key version used to encrypt the keys Version of the RSA public key used to encrypt the device keys. | Mandatory if the local Join Server is used with HSM, Optional if the local Join Server is used without HSM, Forbidden with an external Join Server. | Mandatory if the local Join Server is used with HSM, Optional if the local Join Server is used without HSM, Forbidden with an external Join Server. |
| Y | Owner Token | Optional if an external Join Server is used, forbidden otherwise. | n/a |
| Z | Protocol identifier (system driver or custom driver) | Optional: the default protocol identifier defined in the device model will be used when no protocol identifier is specified. | Optional |
| AA | LoRaWAN® device session context (internal usage only) | Optional | Optional |
| AB | Comma-separated list of tag names | Optional | Optional |
| AC | Comma-separated list of associated domains The domain group name and the domain name must be provided as follow: | Optional | Optional |
| AD | 32 bits integer representation of the last downlink frame counter (FCntDn) received by the device | Optional for a LoRaWAN 1.0 device migrated from another network server, forbidden otherwise. | Optional for a LoRaWAN 1.0 device that need to be resynchronized with the network server, forbidden otherwise. |
| AE | 32 bits integer representation of the last uplink frame counter (FCntUp) sent by the device | Optional for a LoRaWAN 1.0 device migrated from another network server, forbidden otherwise. | Optional for a LoRaWAN 1.0 device that need to be resynchronized with the network server, forbidden otherwise. |
| AF | RX1 data rate offset (0..7) | Optional for a LoRaWAN 1.0 device migrated from another network server, forbidden otherwise. | Optional for a LoRaWAN 1.0 device that need to be resynchronized with the network server, forbidden otherwise. |
| AG | RX2 frequency in MHz (433..928 up to 6 decimal places) | Optional for a LoRaWAN 1.0 device migrated from another network server, forbidden otherwise. | Optional for a LoRaWAN 1.0 device that need to be resynchronized with the network server, forbidden otherwise. |
| AH | RX2 data rate (0..15) | Optional for a LoRaWAN 1.0 device migrated from another network server, forbidden otherwise. | Optional for a LoRaWAN 1.0 device that need to be resynchronized with the network server, forbidden otherwise. |
| AI | RX1 delay in seconds (1..15) | Optional for a LoRaWAN 1.0 device migrated from another network server, forbidden otherwise. | Optional for a LoRaWAN 1.0 device that need to be resynchronized with the network server, forbidden otherwise. |
| AJ | Downlink dwell time: 0 (no limit) or 1 (400 ms) | Optional for a LoRaWAN 1.0 device in AS923 or AU915 ISM band using the local Join Server and migrated from another network server, forbidden otherwise. | Optional for a LoRaWAN 1.0 device in AS923 or AU915 ISM band using the local Join Server and that need to be resynchronized with the network server, forbidden otherwise. |
| AK | Uplink dwell time: 0 (no limit) or 1 (400 ms) | Optional for a LoRaWAN 1.0 device in AS923 or AU915 ISM band using the local Join Server and migrated from another network server, forbidden otherwise. | Optional for a LoRaWAN 1.0 device in AS923 or AU915 ISM band using the local Join Server and that need to be resynchronized with the network server, forbidden otherwise. |
| AL | 24 bits hexadecimal representation of the last JoinNonce used by the join server | Mandatory for a LoRaWAN 1.0 device migrated from another network server, forbidden otherwise. | Mandatory for a LoRaWAN 1.0 device that need to be resynchronized with the network server, forbidden otherwise. |
| AM | 16 bits hexadecimal representation of the last DevNonce used by the device | Optional for a LoRaWAN 1.0 device using Local Join Server and migrated from another network server, forbidden otherwise. | Optional for a LoRaWAN 1.0 device using Local Join Server and that need to be resynchronized with the network server, forbidden otherwise. |
| AN | LoRaWAN NwkSKey Supported encoding modes:
| Optional for a LoRaWAN 1.0 device migrated from another network server, forbidden otherwise. | Optional for a LoRaWAN 1.0 device that need to be resynchronized with the network server, forbidden otherwise. |
| AO | LoRaWAN AppSKey Supported encoding modes:
| Optional for a LoRaWAN 1.0 device migrated from another network server, forbidden otherwise. | Optional for a LoRaWAN 1.0 device that need to be resynchronized with the network server, forbidden otherwise. |
-
When the added OTAA device is migrated from another network server (limited to LoRaWAN 1.0.x devices):
-
You may import the LoRaWAN session context of the migrated device, to inform the network about the DevAddr, session keys, frame counters and downlink RX1/RX2 configuration parameters currently used by the device.
This process allows a seamless device migration without forcing the device to revert to the JOIN state. -
If the LoRaWAN session context of the migrated device is not imported, the device must redo the JOIN procedure to get a new LoRaWAN session in ThingPark. Nevertheless, you must fill the column
ALto inform the network about the last JoinNonce/AppNonce used by this device. In case you do not know it, enter a reasonably high value that you think the device has not yet reached.
-
-
When updating an OTAA device:
- If an optional column is empty, the currently-used value is kept.
- The
_unsetkeyword can be used to unset the following columns: G, H, K, L, M, N, O, T, Z, AB and AC. - In case the LoRaWAN state has been desynchronized between your device and the network server, you may use columns AD to AO to instruct the network about the current keys/parameters used by your device.
Adding or updating a LoRaWAN® ABP device
The following columns must be filled to add or update a LoRaWAN® ABP device.
| Column | Definition | Add | Update |
|---|---|---|---|
| A | Type of operation
| Mandatory | Mandatory |
| B | LoRaWAN® DevEUI | Mandatory | Mandatory |
| C | LoRaWAN® DevAddr | Mandatory | n/a |
| D | Device model ID Device model IDs can be retrieved in a CSV file via the MODEL LIST button. | Mandatory | Optional |
| E | LoRaWAN® FNwkSIntKey/NwkSKey Supported encoding modes:
| Mandatory | Optional |
| F | LoRaWAN® AppSKey Supported encoding modes:
| Optional | Optional |
| G | n/a | n/a | n/a |
| H | Features / Connectivity plan ID Features (if Connectivity Plans not displayed in the main menu):
Connectivity plan ID (if Connectivity Plans displayed in the main menu):
| Optional | Optional |
| I | n/a | n/a | n/a |
| J | n/a | n/a | n/a |
| K | Device name | Optional: The device name is automatically set to the DevEUI when not provided. | Optional |
| L | Device latitude (decimal degrees) If provided the manual location mode is automatically activated.
If empty (when adding a device) or | Optional | Optional |
| M | Device longitude (decimal degrees) If provided the manual location mode is automatically activated.
If empty (when adding a device) or | Optional | Optional |
| N | Additional information | Optional | Optional |
| O | No uplink activity alarm configuration XML document:
Default value when adding a device: | Optional | Optional |
| P | n/a | n/a | n/a |
| Q | Motion indicator Value is one of the following:
| Optional: the motion indicator of the device profile will be used when no motion indicator is specified. | Optional |
| R | n/a | n/a | n/a |
| S | n/a | n/a | n/a |
| T | Connection IDs Multiple connection IDs may be provided, separated by a comma. | Optional | Optional |
| U | LoRaWAN® SNwkSIntKey Supported encoding modes:
| Mandatory in LoRaWAN® 1.1, forbidden otherwise. | Optional in LoRaWAN® 1.1, forbidden otherwise. |
| V | LoRaWAN® NwkSEncKey Supported encoding modes:
| Mandatory in LoRaWAN® 1.1, forbidden otherwise. | Optional in LoRaWAN® 1.1, forbidden otherwise. |
| W | n/a | n/a | n/a |
| X | Public key version used to encrypt the keys Version of the RSA public key used to encrypt the device keys. | Optional | Optional |
| Y | n/a | n/a | n/a |
| Z | Protocol identifier (system driver or custom driver) | Optional: the default protocol identifier defined in the device model will be used when no protocol identifier is specified. | Optional |
| AA | LoRaWAN® device session context (internal usage only) | Optional | Optional |
| AB | Comma-separated list of tag names | Optional | Optional |
| AC | Comma-separated list of associated domains The domain group name and the domain name must be provided as follow: | Optional | Optional |
| AD | 32 bits integer representation of the last downlink frame counter (FCntDn) received by the device | Optional for a LoRaWAN 1.0 device migrated from another network server, forbidden otherwise. | Optional for a LoRaWAN 1.0 device that need to be resynchronized with the network server, forbidden otherwise. |
| AE | 32 bits integer representation of the last uplink frame counter (FCntUp) sent by the device | Optional for a LoRaWAN 1.0 device migrated from another network server, forbidden otherwise. | Optional for a LoRaWAN 1.0 device that need to be resynchronized with the network server, forbidden otherwise. |
| AF | RX1 data rate offset (0..7) | Optional for a LoRaWAN 1.0 device migrated from another network server, forbidden otherwise. | Optional for a LoRaWAN 1.0 device that need to be resynchronized with the network server, forbidden otherwise. |
| AG | RX2 frequency in MHz (433..928 up to 6 decimal places) | Optional for a LoRaWAN 1.0 device migrated from another network server, forbidden otherwise. | Optional for a LoRaWAN 1.0 device that need to be resynchronized with the network server, forbidden otherwise. |
| AH | RX2 data rate (0..15) | Optional for a LoRaWAN 1.0 device migrated from another network server, forbidden otherwise. | Optional for a LoRaWAN 1.0 device that need to be resynchronized with the network server, forbidden otherwise. |
| AI | RX1 delay in seconds (1..15) | Optional for a LoRaWAN 1.0 device migrated from another network server, forbidden otherwise. | Optional for a LoRaWAN 1.0 device that need to be resynchronized with the network server, forbidden otherwise. |
| AJ | Downlink dwell time: 0 (no limit) or 1 (400 ms) | Optional for a LoRaWAN 1.0 device in AS923 or AU915 ISM band using the local Join Server and migrated from another network server, forbidden otherwise. | Optional for a LoRaWAN 1.0 device in AS923 or AU915 ISM band using the local Join Server and that need to be resynchronized with the network server, forbidden otherwise. |
| AK | Uplink dwell time: 0 (no limit) or 1 (400 ms) | Optional for a LoRaWAN 1.0 device in AS923 or AU915 ISM band using the local Join Server and migrated from another network server, forbidden otherwise. | Optional for a LoRaWAN 1.0 device in AS923 or AU915 ISM band using the local Join Server and that need to be resynchronized with the network server, forbidden otherwise. |
-
When the added ABP device is migrated from another network server (limited to LoRaWAN 1.0.x devices), you must import the LoRaWAN session context of the migrated device, to inform the network about the frame counters and downlink RX1/RX2 configuration parameters currently used by the device.
-
When updating an ABP device:
- If an optional column is empty, the currently-used value is kept.
- The
_unsetkeyword can be used to unset the following columns: F, G, H, K, L, M, N, O, T, Z, AB and AC. - In case the LoRaWAN state has been desynchronized between your device and the network server, you may use columns AD to AK to instruct the network about the current parameters used by your device.
Adding or updating a cellular device
The following columns must be filled to add or update a cellular device.
| Column | Definition | Add | Update |
|---|---|---|---|
| A | Type of operation
| Mandatory | Mandatory |
| B | Enforced IMEI (15 digits) or DevEUI | Optional: only enforced IMEI is supported | Mandatory: only DevEUI is supported |
| C | ID of the SIM card | Mandatory | n/a |
| D | Device model ID Device model IDs can be retrieved in a CSV file via the MODEL LIST button. | Mandatory | Optional |
| E | n/a | n/a | n/a |
| F | n/a | n/a | n/a |
| G | n/a | n/a | n/a |
| H | Connectivity plan ID If empty (when adding a device) or | Optional | Optional |
| I | n/a | n/a | n/a |
| J | n/a | n/a | n/a |
| K | Device name | Optional: The device name is automatically set to the DevEUI when not provided. | Optional |
| L | Device latitude (decimal degrees) | Optional | Optional |
| M | Device longitude (decimal degrees) | Optional | Optional |
| N | Additional information | Optional | Optional |
| O | No uplink activity alarm configuration XML document:
Default value when adding a device: | Optional | Optional |
| P | n/a | n/a | n/a |
| Q | Motion indicator Value is one of the following:
| Optional: the motion indicator of the device profile will be used when no motion indicator is specified. | Optional |
| R | n/a | n/a | n/a |
| S | n/a | n/a | n/a |
| T | Connection IDs Multiple connection IDs may be provided, separated by a comma. | Optional | Optional |
| U | n/a | n/a | n/a |
| V | n/a | n/a | n/a |
| W | Network context ID | Optional | Optional |
| X | n/a | n/a | n/a |
| Y | n/a | n/a | n/a |
| Z | n/a | n/a | n/a |
| AA | n/a | n/a | n/a |
| AB | Comma-separated list of tag names | Optional | Optional |
| AC | Comma-separated list of associated domains The domain group name and the domain name must be provided as follow: | Optional | Optional |
Deleting a device
The following columns must be filled to delete a device.
| Column | Definition | Delete |
|---|---|---|
| A | Type of operation: DELETE | Mandatory |
| B | DevEUI | Mandatory |