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