Wiki source code of TTN Stack 3

Version 14.5 by Xiaoling on 2022/07/25 10:00

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