Changes for page Notes for TTN
Last modified by Xiaoling on 2025/08/04 14:58
From version 201.1
edited by Edwin Chen
on 2023/03/15 16:07
on 2023/03/15 16:07
Change comment:
There is no comment for this version
To version 218.1
edited by Kilight Cao
on 2023/07/28 14:55
on 2023/07/28 14:55
Change comment:
Uploaded new attachment "image-20230728145557-1.png", version {1}
Summary
-
Page properties (2 modified, 0 added, 0 removed)
-
Attachments (0 modified, 9 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. Edwin1 +XWiki.Kilight - Content
-
... ... @@ -171,7 +171,7 @@ 171 171 ))) 172 172 173 173 ((( 174 -(% style="color:blue" %)**What do you need to prepare** 174 +(% style="color:blue" %)**What do you need to prepare?** 175 175 ))) 176 176 177 177 ((( ... ... @@ -182,57 +182,65 @@ 182 182 ))) 183 183 ))) 184 184 185 -== 3.2 Step 1: AddGateway ==185 +== 3.2 Step 1: Register Gateway == 186 186 187 187 188 188 ((( 189 189 ((( 190 -(% style="color:blue" %)**The example for**(%%)** (% style="color:red" %)EU:(%%)** 190 +(% style="color:blue" %)**The example for**(%%)** the (% style="color:red" %)EU:(%%)** 191 191 ))) 192 192 ))) 193 193 194 194 ((( 195 195 ((( 196 -User can add your gateway into The Things Network V3 according to the previous step 197 -))) 198 -))) 196 +Click the 'Register Gateway' button will get this page to register the gateway from The Thing Network Console gateway page. 199 199 200 -((( 201 -((( 202 -Following picture is the successful added. 203 - 204 - 198 +[[image:image-20230728144218-7.png||height="128" width="836"]] 205 205 ))) 206 206 ))) 207 207 208 -[[image:image-202 20526135316-8.png]]202 +[[image:image-20230728143449-2.png]] 209 209 210 - AddGateway204 +Register Gateway 211 211 212 212 213 213 == 3.3 Step 2: Create the API key == 214 214 215 215 216 - userneed to createtheCUPSAPIkeyandLNSAPIkey.210 +**API Key can be created manually** ~-~--> if users forgot to check the check box or switch to basic station mode from the Semtech UDP mode 217 217 218 218 213 + 214 + 215 +**or generate by TTN by checking the check box when registering the gateway** ~-~-->[[image:image-20230728143505-3.png]] 216 + 217 + 218 +=== **1.) Generated by TTH** === 219 + 220 +=== === 221 + 222 +=== === 223 + 224 +=== **2.) Manually create API KEY: ** === 225 + 226 + 227 +==== CUPS API KEY ==== 228 + 219 219 [[image:image-20220526135349-9.png]] 220 220 221 -Create CUPS API key 222 222 223 223 233 +==== LNS API KEY ==== 224 224 225 225 [[image:image-20220526135428-10.png]] 226 226 227 -Create LNS API key 228 228 238 +(% style="color:red" %)**Note: If your API is generated by yourself you have to update the key to the gateway setting.** 229 229 230 -(% style="color:red" %)**Note: Please copy the API key.** 231 231 241 +==== Update the gateway setting ==== 232 232 233 -== 3.4 Step 3: Update the gateway setting == 234 234 235 - 236 236 In the LoRa Basics Station LNS Authentication Key field, paste the API key you generated in the previous step. 237 237 238 238 ... ... @@ -708,14 +708,19 @@ 708 708 ))) 709 709 710 710 * End node is connected to serial port to show the Join frequency and DR. (If possible) 719 + 711 711 * Gateway (from gateway UI) traffic to show the packet got from end node and receive from Server. (If possible) 721 + 712 712 * Gateway traffic (from server UI) to shows the data exchange between gateway and server. (Normally possible) 723 + 713 713 * End Node traffic (from server UI) to shows end node activity in server. (Normally possible) 725 + 714 714 * End Node Keys screen shot shows in end node and server. so we can check if the keys are correct. (In most case, we found keys doesn't match, especially APP EUI) 715 715 716 716 (% style="color:blue" %)**1. End Device Join Screen shot, we can check:** 717 717 718 718 * If the device is sending join request to server? 731 + 719 719 * What frequency the device is sending? 720 720 721 721 [[image:image-20220526141308-33.png]] ... ... @@ -805,6 +805,142 @@ 805 805 806 806 == 8.1 How to import devices keys to server. == 807 807 821 + 808 808 **For TTS in LPS8v2** 809 809 824 +Open your application and click the button **Import end devices** 825 + 826 +[[image:image-20230423154012-1.png||height="472" width="755"]] 827 + 828 + 829 +Select the **File format** and upload the file (e.g. or ).devices/jsondevices.csv 830 + 831 +You can specify **Fallback values** for Frequency plan and LoRaWAN and Regional Parameters version, in case the import file does not specify these settings for the device. 832 + 833 +You can also expand the **Advanced claiming and component settings** to set targeted components, and set the claim authentication code to be generated. 834 + 835 +Start the import by clicking the **Import end devices** button. 836 + 837 +[[image:image-20230423154040-2.png||height="470" width="749"]] 838 + 839 + 840 +Wait for the end devices to be successfully imported. In case any device fails, you will see a relevant error message in the console. 841 + 842 +[[image:image-20230423154105-3.png||height="478" width="763"]] 843 + 844 + 845 +If the import was successful, your devices are added to the list of end devices in your application. 846 + 847 +[[image:image-20230423154125-4.png||height="480" width="766"]] 848 + 849 +Devices are now registered on The Things Stack. 850 + 851 + 852 +=== **JSON File Reference** === 853 + 854 + 855 +The Things Stack allows you to import end devices from V2, ChirpStack and other LoRaWAN networks using a JSON file describing those devices. 856 + 857 +Using JSON file with device descriptions, you can migrate end devices with or without their existing sessions. 858 + 859 +Here is an example of an OTAA device description in the file:devices.json 860 + 861 +{{{{ 862 + "ids": { 863 + "device_id": "my-device", 864 + "dev_eui": "0102030405060708", 865 + "join_eui": "0102030405060708" 866 + }, 867 + "name": "My Device", 868 + "description": "Living room temperature sensor", 869 + "lorawan_version": "MAC_V1_0_2", 870 + "lorawan_phy_version": "PHY_V1_0_2_REV_B", 871 + "frequency_plan_id": "EU_863_870_TTN", 872 + "supports_join": true, 873 + "root_keys": { 874 + "app_key": { 875 + "key": "01020304050607080102030405060708" 876 + } 877 + } 878 +} 879 +}}} 880 + 881 +Multiple end devices can also be contained in a single file like so:devices.json 882 + 883 +{{{{ 884 + /* device 1 */ 885 +} 886 +{ 887 + /* device 2 */ 888 +} 889 +}}} 890 + 891 +The format above is considered by the Console and CLI as a JSON stream, processing one object at a time. For more details in how to use the file 892 + 893 + 894 +=== **CSV File Reference** === 895 + 896 + 897 +The Things Stack has support for importing end devices from CSV (comma-separated values) files. This is useful when batches of end devices are managed in Microsoft Excel or any other spreadsheet or database that can export to CSV file. 898 + 899 +The CSV import in The Things Stack uses the following settings: 900 + 901 +* Semicolon () as field delimiter. This makes working with Microsoft Excel and other spreadsheets convenient; 902 + 903 +* Header row is required 904 + 905 +* On each row, the same number of fields as on the header line 906 + 907 +* Use quotes to use in a field value; 908 + 909 +* Use double quotes to escape quotes 910 + 911 +* Unknown header columns are permitted and ignored 912 + 913 +* Name and id cannot have capital letters and special characters 914 + 915 +* Example column lorawan_phy_version is not needed 916 + 917 +(% style="display:none" %) 918 + 919 + 920 + 921 +=== **Example** === 922 + 923 + 924 +Minimal example: 925 + 926 +{{{dev_eui;join_eui;frequency_plan_id;lorawan_version;lorawan_phy_version;app_key 927 +1111111111111111;1111111111111111;EU_863_870_TTN;MAC_V1_0_4;RP002_V1_0_3;11111111111111111111111111111111 928 +2222222222222222;2222222222222222;EU_863_870_TTN;MAC_V1_0_4;RP002_V1_0_3;22222222222222222222222222222222 929 +3333333333333333;3333333333333333;EU_863_870_TTN;MAC_V1_0_4;RP002_V1_0_3;33333333333333333333333333333333 930 +}}} 931 + 932 +All columns for a LoRaWAN 1.0.4 device: 933 + 934 +{{{id;dev_eui;join_eui;name;frequency_plan_id;lorawan_version;lorawan_phy_version;brand_id;model_id;hardware_version;firmware_version;band_id;app_key 935 +test-one;1111111111111111;1111111111111111;Device 1;EU_863_870_TTN;MAC_V1_0_4;RP002_V1_0_3;the-things-industries;generic-node-sensor-edition;1.0.4;1.0;EU_863_870;11111111111111111111111111111111 936 +test-two;2222222222222222;2222222222222222;Device 2;EU_863_870_TTN;MAC_V1_0_4;RP002_V1_0_3;the-things-industries;generic-node-sensor-edition;1.0.4;1.0;EU_863_870;22222222222222222222222222222222 937 +test-three;3333333333333333;3333333333333333;Device 3;EU_863_870_TTN;MAC_V1_0_4;RP002_V1_0_3;the-things-industries;generic-node-sensor-edition;1.0.4;1.0;EU_863_870;33333333333333333333333333333333 938 +}}} 939 + 940 + 941 + 942 +=== **Excel Template** === 943 + 944 + 945 +[[Download the Excel template>>url:https://www.thethingsindustries.com/docs/getting-started/migrating/tts-end-devices-csv-template.xlsx]]. You can remove all columns that are not required (see above). 946 + 947 + 948 += 9. Trouble Shooting. = 949 + 950 +== 9.1 How to solve the problem of MIC Mismatch? == 951 + 952 + 953 +Please refer to the link below: 954 + 955 +[[http:~~/~~/wiki.dragino.com/xwiki/bin/view/Main/LoRaWAN%20Communication%20Debug/#H9.WhydoIseea22MICMismatch22errormessagefromtheserver3F>>url:http://wiki.dragino.com/xwiki/bin/view/Main/LoRaWAN%20Communication%20Debug/#H9.WhydoIseea22MICMismatch22errormessagefromtheserver3F]] 956 + 957 + 958 + 810 810
- image-20230423154012-1.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Bei - Size
-
... ... @@ -1,0 +1,1 @@ 1 +140.9 KB - Content
- image-20230423154040-2.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Bei - Size
-
... ... @@ -1,0 +1,1 @@ 1 +141.0 KB - Content
- image-20230423154105-3.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Bei - Size
-
... ... @@ -1,0 +1,1 @@ 1 +188.5 KB - Content
- image-20230423154125-4.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Bei - Size
-
... ... @@ -1,0 +1,1 @@ 1 +102.1 KB - Content
- image-20230728143343-1.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Xiaoye - Size
-
... ... @@ -1,0 +1,1 @@ 1 +43.2 KB - Content
- image-20230728143449-2.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Xiaoye - Size
-
... ... @@ -1,0 +1,1 @@ 1 +43.2 KB - Content
- image-20230728143505-3.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Xiaoye - Size
-
... ... @@ -1,0 +1,1 @@ 1 +16.7 KB - Content
- image-20230728144218-7.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Xiaoye - Size
-
... ... @@ -1,0 +1,1 @@ 1 +12.7 KB - Content
- image-20230728145557-1.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Kilight - Size
-
... ... @@ -1,0 +1,1 @@ 1 +53.6 KB - Content