Wiki source code of TTN Stack 3

Version 14.2 by Xiaoling on 2022/05/31 10:28

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