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