A device with an active session in a Network Server (Loriot in this example) can be migrated to another Network Server (TTN in this example) without the need of a new join or reprogram IDs or KEYs on the device.
This is not the cleanest way to migrate devices to a new server but it can be done if the donor Network Server (LORIOT) can provide the current session parameters DevAddr, NwkSKey, AppSKey… and importing it to the new Network Server (TTN) as an ABP device.
Steps in TTN:
1- In the web console add it as a new device, OTAA mode is only possible, type DevEUI, AppEUI and Apkey with correct values or whatever values.
2- Change the thevice settings to ABP mode, and type NwkSKey and AppSKey values provided from loriot. (DevAddr value can’t be changed from console).
3- use ttnctl to change device’s DevAddr with the value provided from loriot.
And that’s it. Now you can start receiving data in TTN server (even in both servers simultaneously).
BUT, there are some problems:
1- Downlink won’t work because the downlink counters will mismatch.
2- Some lorawan settings can be different between TTN and Loriot, for example channel plan, DL2 datarate…