Closed KrishnaIyer closed 1 year ago
Retested the changes
OTAA The device sends frame 3 on Firefly, is migrated to TTS and TTS receives frame 4 onwards correctly. Rejoin works also
ABP The device sends frame 3 on Firefly, is migrated to TTS and TTS receives frame 4 onwards correctly
This JoinEUI thing is probably quite problematic, no? This only works if there's one JoinEUI per batch? And you either migrate one device, or you migrate all devices accessible with the API key?
Yes indeed. The way I have documented this is to migrate devices in batches by creating a file with the Device EUIs and piping that into the devices
command.
This way, all devices in the batch will have a common JoinEUI on TTS.
Summary
Support migration from the Firefly LNS. Replaces #49.
Changes
Testing
With a The Things Uno.
Curl the device using the API (to check the last frame counter)
This can also be checked via the UI
Export
{"ids":{"device_id":"eui-0004a30b001bb199","application_ids":{"application_id":"my-test-app"},"dev_eui":"0004A30B001BB199","join_eui":"1111111111111111"},"name":"Migration Test OTAA","lorawan_version":"MAC_V1_0_2","lorawan_phy_version":"PHY_V1_0_2_REV_B","frequency_plan_id":"EU_863_870","supports_join":true,"root_keys":{"app_key":{"key":"5105D918B6EEEF8A22AA92B39D9EC718"}},"mac_settings":{"rx2_data_rate_index":0,"status_time_periodicity":"0s","status_count_periodicity":0,"desired_adr_ack_limit_exponent":"ADR_ACK_LIMIT_1"},"session":{"dev_addr":"29559735","keys":{"session_key_id":"bBRMrEnueD7zAxHwX4a2RA==","f_nwk_s_int_key":{"key":"1BA000AB1BAC28B83F2A091F7EA9ABED"},"app_s_key":{"key":"927A87F8B710479D594440227BBBDD64"}},"last_f_cnt_up":10,"started_at":"2023-10-31T18:41:35.080851Z"}}
DEBUG Failed to determine channel index of uplink {"ack": false, "adr": false, "adr_ack_req": false, "band_id": "EU_863_870", "bandwidth": 125000, "class_b": false, "data_rate": "lora:{bandwidth:125000 spreading_factor:7 coding_rate:\"4/5\"}", "dev_addr": "29559735", "error": "error:pkg/networkserver:uplink_channel_not_found (uplink channel not found)", "f_cnt_reset": false, "f_opts_len": 0, "f_port": 1, "frequency": 867700000, "full_f_cnt_up": 11, "grpc.method": "HandleUplink", "grpc.service": "ttn.lorawan.v3.GsNs", "last_f_cnt_up": 10, "m_type": "UNCONFIRMED_UP", "mac_count": 0, "mac_version": "MAC_V1_0_2", "major": "LORAWAN_R1", "namespace": "networkserver", "pending_session": false, "phy_payload_len": 14, "received_at": 1698777742.7678819, "request_id": "01HE3GPFDFN4CBZX9Q697JE83A", "spreading_factor": 7, "uplink_f_cnt": 11}