This section refers to migrating end devices to The Things Stack using
ttn-lw-migrate migration tool.
0.5.0or higher installed on your system. See the Migration Tool guide for detailed installation instructions.
Configure the Environment
First, you need to configure a few environmental variables. Navigate to the folder where you installed
ttn-lw-migrate and execute the following, replacing
ttn-v2-application-access-key, and the
export TTNV2_APP_ID="ttn-v2-application-ID" export TTNV2_APP_ACCESS_KEY="ttn-v2-application-access-key" export FREQUENCY_PLAN_ID="EU_863_870_TTN"
See the list of supported Frequency Plans.
If using Windows OS Command Prompt, replace
set and remove the double-quotes in commands above:
set TTNV2_APP_ID=ttn-v2-application-ID set TTNV2_APP_ACCESS_KEY=ttn-v2-application-access-key set FREQUENCY_PLAN_ID=EU_863_870_TTN
Commands are slightly different if using Windows PowerShell, for example you could set the
TTNV2_APP_ID variable as follows:
Since migration is still possible only from a private The Things Industries V2 (SaaS) cluster, you need to configure one extra environmental variable:
If the Discovery Server of your private The Things Industries V2 (SaaS) cluster does not use TLS, you will need to use
ttnv2.discovery-server-insecure flag when running commands with the
Export End Devices from V2
Next, you can proceed with exporting one or more end devices, with or without their active session, from V2 to a JSON file.
Note:Migrating end devices from V2 to The Things Stack is a one-way process, since LoRaWAN devices may be handled by only one Network Server at a time.
Now, read the following subsections for detailed steps on how to migrate devices from V2 to The Things Stack using