Congrats, you decided to jump from the community network to a private LoRaWAN network and you might want to transfer your existing applications, devices and gateways to the new server. For each element there are two ways of migrating; either through the console or through the command line tool ttnctl (follow this guide first, if you are planing this).
If you have a great number of apps, devices or gateways to migrate you can contact The Things Industries support to plan a migration by us. The subsequent methods can be time consuming and error prone so be careful.
See the scripts |
First thing you should do is to "migrate" you application. To do this, it is only necessary to create a new application and add the previous application EUI to the new one. If you have collaborators, third party or MQTT client you will have to set them with the new access keys generated by the application; don't forget to reconfigure your MQTT client to the right url and broker.
Make sure you followed this guide first !
Retrieve your TTN application information, ex:
$ ttnctl --config ~/ttnctl/community.yml application select yourAppID INFO Found one EUI "YOUR_APP_EUI", selecting that one. INFO Updated configuration AppEUI=YOUR_APP_EUI AppID=yourAppID |
Add a new application to your network server with the a previous EUI (YOUR_APP_EUI, in the code above).
$ ttnctl --config ~/ttnctl/private.yml applications add yourappid myapp --app-eui YOUR_APP_EUI INFO Added Application INFO Selected Current Application |
The task isn't any different than registering a your existing gateway on the public network. For more information look at this article and this one.
.
Don't forget to un-register your gateway from the public community network.
Instructions on how to forward packets to the public network and private network will be released the same time as TTN V3.
This is the most time consuming step. If you have a lot of devices to migrate you can contact The Things Network support to plan for a complete migration or if you have someone adept of command line tools and scripting it might be able to do it fast.
Be warned, if you have more than 20 devices this may take a lot of time. It is also recommended to work with two tabs or windows, one on the community console and one on your private console.
Make sure you followed this guide first !
Select your TTN application and your private app.
$ ttnctl --config community application select yourapp $ ttnctl --config private application select yourprivateapp |
List your device.
$ ttnctl --config community devices list INFO Using Application AppEUI=70B3D57EF00069B5 AppID=yourapp INFO Discovering Handler... Handler=ttn-handler-eu INFO Connecting with Handler... Handler=eu.thethings.network:1904 DevID AppEUI DevEUI DevAddr Description mydev 70B3D57EF0000000 0004A30B001B0000 2601278D INFO Listed 1 devices AppID=yourapp |
Get your device info.
$ ttnctl --config community devices info mapper INFO Using Application AppEUI=70B3D57EF00069B5 AppID=yourapp INFO Discovering Handler... Handler=ttn-handler-eu INFO Connecting with Handler... Handler=eu.thethings.network:1904 INFO Found device Application ID: yourapp Device ID: mydev Last Seen: 2017-08-16 15:39:33.799601267 +0200 CEST LoRaWAN Info: AppEUI: 70B3D57EF00069B5 DevEUI: 0004A30B001B0000 DevAddr: 2601278D AppKey: 19E981CFF2F1F69089437CD896370000 AppSKey: FFA1F9DDD9AFE354F9F14433C002D390 NwkSKey: B6ACE4BE26EF1D496DBFE11107D7D0F4 FCntUp: 15 FCntDown: 0 Options: FCntCheckEnabled, 32BitFCnt |
Add your device to the private app with the previously collected information (DevEUI and AppKey).
$ ttnctl --config private devices register myprivatedev DevEUI AppKEY |
If you have ABP device you also need to migrate the DevAddr:
|
Related articles appear here based on the labels you select. Click to edit the macro and add or change labels.
|