Wiki source code of TTN Stack 3
Last modified by Xiaoling on 2023/04/23 15:28
Hide last authors
author | version | line-number | content |
---|---|---|---|
14.5 | 1 | **~ Table of Contents:** | |
1.1 | 2 | ||
1.5 | 3 | {{toc/}} | |
1.3 | 4 | ||
14.2 | 5 | ||
6 | |||
7 | |||
14.5 | 8 | = 1. Introduction = | |
1.3 | 9 | ||
14.5 | 10 | ||
1.2 | 11 | Notes for using Dragino Devices with TTN Stack3. | |
1.1 | 12 | ||
2.2 | 13 | ||
14.5 | 14 | = 2. Downlink = | |
15 | |||
16 | |||
1.2 | 17 | Use MQTT API for downlink: Reference: [[TTN Stack v3 MQTT reference>>url:https://thethingsstack.io/v3.1.0/guides/getting-started/mqtt/]] | |
1.1 | 18 | ||
1.7 | 19 | ((( | |
14.5 | 20 | (% style="color:blue" %)**Download command is:** | |
1.7 | 21 | ))) | |
1.1 | 22 | ||
1.3 | 23 | (% class="box" %) | |
24 | ((( | ||
1.2 | 25 | mosquitto_pub -h eu1.cloud.thethings.industries -p 1883 -t v3/akXXXXXps@XXXXXX/devices/lsn50/down/push -u akXXXXXps@XXXXXX -P NNSXS.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.LVQZECLX5FZ3XO5ACOW47IZ6HM54DMBBU776C53ZQHPLPQALIXYA -m '{"downlinks":[{"f_port": 2,"frm_payload":"AwAA","priority": "HIGH","confirmed": true}]}' | |
1.3 | 26 | ))) | |
1.1 | 27 | ||
1.7 | 28 | ((( | |
14.5 | 29 | ||
30 | |||
14.6 | 31 | The MQTT command use (% style="color:blue" %)**-h,-p,-u,-P** (%%)options. We can find them in the website. | |
14.5 | 32 | ||
33 | |||
1.7 | 34 | ))) | |
1.1 | 35 | ||
4.2 | 36 | [[image:image-20220526142338-3.png]] | |
1.1 | 37 | ||
14.7 | 38 | **find -h : broker address , -p port and -u: user name** | |
1.1 | 39 | ||
14.3 | 40 | ||
14.7 | 41 | ||
4.2 | 42 | [[image:image-20220526142307-2.png]] | |
1.1 | 43 | ||
14.7 | 44 | **find -P : Password** | |
1.1 | 45 | ||
46 | |||
14.7 | 47 | ||
1.2 | 48 | User MQTT.FX to simulate a downlink | |
1.1 | 49 | ||
5.2 | 50 | [[image:image-20220526142421-4.png]] | |
1.2 | 51 | ||
52 | Use MQTT.FX to simulate downlink | ||
53 | |||
54 | |||
14.7 | 55 | ||
1.2 | 56 | Input connection info | |
57 | |||
10.2 | 58 | [[image:image-20220526142512-5.png]] | |
1.2 | 59 | ||
60 | Input MQTT connection info | ||
61 | |||
62 | |||
14.7 | 63 | ||
1.2 | 64 | Send a downstream | |
65 | |||
10.2 | 66 | [[image:image-20220526142539-6.png]] | |
1.2 | 67 | ||
68 | Gateway traffic for downstream | ||
69 | |||
14.4 | 70 | ||
14.7 | 71 | ||
10.2 | 72 | [[image:image-20220526142616-7.png||height="579" width="1407"]] | |
1.2 | 73 | ||
74 | |||
14.7 | 75 | ||
1.2 | 76 | Downstream data flow will like below: | |
77 | |||
10.2 | 78 | [[image:image-20220526142741-8.png]] | |
1.2 | 79 | ||
10.2 | 80 | [[image:image-20220526142826-9.png]] | |
1.2 | 81 | ||
10.2 | 82 | ||
14.7 | 83 | = 3. Trouble Shooting = | |
1.2 | 84 | ||
14.7 | 85 | == 3.1 Problem when register a device to TTNv3 if it is already register to TTNv2 == | |
86 | |||
87 | |||
1.2 | 88 | When you register the device in V2 and V3 with the same key and EUI, the device can only connect to V2. | |
89 | |||
14.7 | 90 | ||
13.2 | 91 | [[image:image-20220526142914-10.png]] | |
1.2 | 92 | ||
13.2 | 93 | [[image:image-20220526143018-11.png||height="619" width="1049"]] | |
1.2 | 94 | ||
14.7 | 95 | ||
1.2 | 96 | If you want the device to connect to V3. You must change your key and EUI, or delete the device registered on V2. | |
97 | |||
13.2 | 98 | ||
14.7 | 99 | == 3.2 MIC Mismatch or MIC Failed == | |
100 | |||
101 | |||
1.3 | 102 | ((( | |
1.4 | 103 | ((( | |
1.2 | 104 | When the device is registered or the device is working normally, the problem of MIC mismatch and MIC failed occurs. | |
1.3 | 105 | ))) | |
1.4 | 106 | ))) | |
1.2 | 107 | ||
1.3 | 108 | ((( | |
1.4 | 109 | ((( | |
1.2 | 110 | Under normal circumstances, users need to change the APPKEY to solve this problem. | |
14.7 | 111 | ||
112 | |||
1.3 | 113 | ))) | |
1.4 | 114 | ))) | |
1.2 | 115 | ||
13.2 | 116 | [[image:image-20220526143057-12.png]] | |
1.2 | 117 | ||
118 | MIC Mismatch |