Last modified by Mengting Qiu on 2025/05/12 15:42

Hide last authors
Xiaoling 75.2 1
2
Xiaoling 50.3 3 (% style="text-align:center" %)
Bei Jinggeng 65.1 4 [[image:image-20220519085532-1.png||_mstalt="431171" height="429" width="366"]]
Xiaoling 8.5 5
6
7
8
Xiaoling 63.2 9
Xiaoling 71.21 10 **Table of Contents:**
Xiaoling 8.5 11
Xiaoling 50.3 12 {{toc/}}
Xiaoling 8.5 13
14
15
Xiaoling 55.2 16
17
18
Xiaoling 8.7 19 = 1. Introduction =
Xiaoling 8.5 20
Xiaoling 46.5 21 == 1.1 What is SW3L LoRaWAN Flow Sensor ==
Xiaoling 8.5 22
Xiaoling 67.8 23
Xiaoling 46.4 24 (((
Xiaoling 50.11 25 The Dragino SW3L is a (% style="color:#037691" %)**LoRaWAN Flow Sensor**(%%). It detects water flow volume and uplink to IoT server via LoRaWAN network. User can use this to** (% style="color:#037691" %)monitor the water usage for buildings.(%%)**
Xiaoling 46.4 26 )))
Xiaoling 8.5 27
Xiaoling 46.4 28 (((
Xiaoling 50.8 29 SW3L is powered by (% style="color:#037691" %)**8500mAh Li-SOCI2 battery**(%%), It is designed for long term use up to 10 years. (Actually Battery life depends on the use environment, update period.)
Xiaoling 46.4 30 )))
Xiaoling 8.5 31
Xiaoling 46.4 32 (((
Xiaoling 50.11 33 The SW3L will send water flow volume every 20 minutes. It can also (% style="color:#037691" %)**detect the water flow status**(%%) and (% style="color:#037691" %)**send Alarm**(%%), to avoid the waste for water usage such as broken toilet case.
Xiaoling 46.4 34 )))
Xiaoling 8.5 35
Xiaoling 46.4 36 (((
Xiaoling 8.5 37 SW3L is designed for both indoor and outdoor use. It has a weatherproof enclosure and industrial level battery to work in low to high temperatures.
Xiaoling 46.4 38 )))
Xiaoling 8.5 39
Xiaoling 46.4 40 (((
Xiaoling 8.5 41 Each SW3L is pre-load with a set of unique keys for LoRaWAN registration, register these keys to LoRaWAN server and it will auto connect after power on
Xiaoling 46.4 42 )))
Xiaoling 8.5 43
Xiaoling 46.4 44 (((
Xiaoling 48.2 45 *Battery life depends on how often to send data, please see battery analyzer.
Xiaoling 46.4 46 )))
Xiaoling 8.5 47
Xiaoling 50.8 48
Xiaoling 8.7 49 == 1.2 Features ==
Xiaoling 8.5 50
Xiaoling 64.2 51
Xiaoling 8.5 52 * LoRaWAN v1.0.3 Class A protocol.
53 * Frequency Bands: CN470/EU433/KR920/US915/EU868/AS923/AU915/IN865/RU864
54 * Upload water flow volume
55 * Monitor water waste
56 * 8500mAh industrial battery(none-rechargeable)
57 * AT Commands to change parameters
58 * Uplink on periodically and open/close event
59 * Datalog feature
60 * Remote configure parameters via LoRa Downlink
61 * Firmware upgradable via program port
62 * Wall Mountable
63 * Outdoor Use
64
65 == 1.3 Installation ==
66
Xiaoling 64.2 67
Xiaoling 8.5 68 Each SW3L package is shipped with a flow sensor. Install the flow sensor into water pipe with correct flow direction to start monitoring.
69
Xiaoling 50.9 70
Xiaoling 8.5 71 == 1.4 Storage & Operation Temperature ==
72
Xiaoling 64.2 73
Xiaoling 8.5 74 -40°C to +85°C
75
Xiaoling 50.9 76
Xiaoling 32.4 77 == 1.5 Applications ==
Xiaoling 8.5 78
Xiaoling 64.2 79
Xiaoling 8.5 80 * Flow Sensor application
81 * Water Control
82 * Toilet Flow Sensor
83 * Monitor Waste water
84
85 == 1.6 Flow Sensor Spec ==
86
Xiaoling 76.3 87
Xiaoling 46.6 88 (((
Xiaoling 76.2 89 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:515px" %)
90 |=(% style="width: 103px; background-color:#4F81BD; color: white;" %)**Model**|=(% style="width: 103px; background-color:#4F81BD; color: white;" %)**SW3L-004**|=(% style="width: 103px; background-color:#4F81BD; color: white;" %)SW3L-006|=(% style="width: 103px; background-color:#4F81BD; color: white;" %)SW3L-010|=(% style="width: 103px; background-color:#4F81BD; color: white;" %)SW3L-020
Edwin Chen 76.1 91 |(% style="width:152px" %)**Probe #**|(% style="width:176px" %)DW-004|(% style="width:173px" %)DW-006|(% style="width:165px" %)DW-010|(% style="width:190px" %)DW-020
92 |(% style="width:152px" %)**Diameter**|(% style="width:176px" %)G1/2" / DN15|(% style="width:173px" %)G3/4" / DN20|(% style="width:165px" %)G1"  / DN25|(% style="width:190px" %)G2" / DN50
93 |(% style="width:152px" %)**Working Range**|(% style="width:176px" %)1~~30L/min|(% style="width:173px" %)1~~60L/min|(% style="width:165px" %)2~~100L/min|(% style="width:190px" %)10~~300L/min
94 |(% style="width:152px" %)**Measure**|(% style="width:176px" %)450 pulse = 1 L|(% style="width:173px" %)390 pulse = 1 L|(% style="width:165px" %)64 pulse = 1 L|(% style="width:190px" %)12 pulse = 1 L
95 |(% style="width:152px" %)**Accurancy**|(% style="width:176px" %)±5%|(% style="width:173px" %)±5%|(% style="width:165px" %)±5%|(% style="width:190px" %)±5%
96 |(% style="width:152px" %)**Power Consumption**|(% style="width:176px" %)1uA, 3.6v (Sensor Only)|(% style="width:173px" %)1uA, 3.6v (Sensor Only)|(% style="width:165px" %)1uA, 3.6v (Sensor Only)|(% style="width:190px" %)1uA, 3.6v (Sensor Only)
97 |(% style="width:152px" %)**Max Pressure**|(% style="width:176px" %)≤ 1.75Mpa|(% style="width:173px" %)≤ 1.75Mpa |(% style="width:165px" %)≤ 1.75Mpa|(% style="width:190px" %)≤ 1.75Mpa
98 |(% style="width:152px" %)**Temperature range**|(% style="width:176px" %)<80°C|(% style="width:173px" %)<80°C|(% style="width:165px" %)<80°C|(% style="width:190px" %)<80°C
99 |(% style="width:152px" %)**Humidity Range**|(% style="width:176px" %)35%~~90%RH (no frost)|(% style="width:173px" %)35%~~90%RH (no frost)|(% style="width:165px" %)35%~~90%RH (no frost)|(% style="width:190px" %)35%~~90%RH (no frost)
Xiaoling 67.4 100 )))
101
Xiaoling 76.3 102
Xiaoling 8.7 103 == 1.7 Mechanical ==
Xiaoling 8.5 104
Xiaoling 64.2 105
Bei Jinggeng 65.1 106 [[image:1652922789057-479.png||_mstalt="299312"]]
Xiaoling 8.6 107
Bei Jinggeng 65.1 108 [[image:1652922797548-885.png||_mstalt="300391"]]
Xiaoling 8.6 109
Xiaoling 54.19 110
Xiaoling 77.4 111 (% style="color:blue" %)**004: DW-004 Flow Sensor: diameter: G1/2” / DN15.  450 pulse = 1 L**
Xiaoling 8.6 112
Bei Jinggeng 65.1 113 [[image:image-20220519091350-1.png||_mstalt="429611" height="385" width="722"]]
Xiaoling 8.6 114
Xiaoling 54.19 115
Xiaoling 76.3 116 (% style="color:blue" %)**006: DW-006 Flow Sensor: diameter: G3/4” / DN20.  390 pulse = 1 L**
Xiaoling 54.19 117
Bei Jinggeng 65.1 118 [[image:image-20220519091423-2.png||_mstalt="5391646" height="258" width="723"]]
Xiaoling 8.6 119
Xiaoling 54.19 120
Xiaoling 76.3 121 (% style="color:blue" %)**010: DW-010 Flow Sensor: diameter: G 1” / DN25. 64 pulse = 1 L**
Xiaoling 54.19 122
Bei Jinggeng 65.1 123 [[image:image-20220519091423-3.png||_mstalt="5391971" height="448" width="724"]]
Xiaoling 8.6 124
Xiaoling 50.9 125
Xiaoling 76.3 126 (% style="color:blue" %)**020: DW-020 Flow Sensor: diameter: G 2” / DN50. 12 pulse = 1 L**
Edwin Chen 74.1 127
Xiaoling 77.2 128 [[image:image-20240125090604-1.png]]
Edwin Chen 74.1 129
130
Xiaoling 9.2 131 == 1.8 Pin Definitions and Switch ==
132
Xiaoling 64.2 133
Bei Jinggeng 65.1 134 [[image:1652923899427-927.png||_mstalt="299377" height="372" width="723"]]
Xiaoling 9.2 135
Xiaoling 50.9 136
Xiaoling 9.4 137 === 1.8.1 Pin Definition ===
138
Xiaoling 64.2 139
Xiaoling 63.16 140 SW3L is pre-configured to connect to two external wires. The other pins are not used. If user wants to know more about other pins, please refer to the user manual of LSN50v2 at:
Xiaoling 9.3 141
Xiaoling 66.2 142 [[https:~~/~~/www.dropbox.com/sh/djkxs7mr17y94mi/AABVlWbM9uzK9OA3mXyAT10Za?dl=0>>https://www.dropbox.com/sh/djkxs7mr17y94mi/AABVlWbM9uzK9OA3mXyAT10Za?dl=0]]
Xiaoling 50.9 143
Xiaoling 77.6 144 (% style="color:red" %)**Add PA11 digital input and PA12 digital input(Since firmware v1.2.0)**
Xiaoling 55.7 145
Xiaoling 64.2 146
Xiaoling 9.4 147 === 1.8.2 Jumper JP2(Power ON/OFF) ===
Xiaoling 9.3 148
Xiaoling 64.2 149
Xiaoling 9.3 150 Power on Device when putting this jumper.
151
Xiaoling 50.9 152
Xiaoling 9.4 153 === 1.8.3 BOOT MODE / SW1 ===
Xiaoling 9.3 154
Xiaoling 64.2 155
Xiaoling 9.4 156 (((
Xiaoling 63.17 157 1) ISP: upgrade mode, device won't have any signal in this mode. but ready for upgrade firmware. LED won't work. Firmware won't run. 
Xiaoling 9.3 158 2) Flash: work mode, the device starts to work and send out console output for further debug
Xiaoling 9.4 159 )))
Xiaoling 9.3 160
Xiaoling 50.10 161
Xiaoling 9.4 162 === 1.8.4 Reset Button ===
163
Xiaoling 64.2 164
Xiaoling 9.3 165 Press to reboot the device.
166
Xiaoling 50.10 167
Xiaoling 9.4 168 === 1.8.5 LED ===
169
Xiaoling 64.2 170
Xiaoling 9.3 171 It will flash:
Xiaoling 77.6 172 1) Boot the device in flash mode
173 2) Send an uplink packe
Xiaoling 9.5 174
Xiaoling 50.10 175
Xiaoling 17.3 176 = 2. Operation Mode =
Xiaoling 9.5 177
178 == 2.1 How it works? ==
179
Xiaoling 64.2 180
Xiaoling 9.6 181 Each SW3L is shipped with a worldwide unique set of OTAA keys. To use SW3L in a LoRaWAN network, user needs to input the OTAA keys in the LoRaWAN network server. So SW3L can join the LoRaWAN network and start to transmit sensor data.
Xiaoling 9.5 182
Xiaoling 50.49 183
Xiaoling 9.5 184 == 2.2 Example to use for LoRaWAN network ==
185
Xiaoling 64.2 186
Xiaoling 9.5 187 This section shows an example of how to join the TTN V3 LoRaWAN IoT server. Usages with other LoRaWAN IoT servers are similar.
188
Bei Jinggeng 65.1 189 [[image:1652944563101-603.png||_mstalt="292279" height="321" width="729"]]
Xiaoling 9.5 190
Xiaoling 66.2 191
Xiaoling 48.3 192 * In this use case, the SW3L is connected into water line to measure water flow and send the status to the LoRaWAN server. The SW3L will uplink different types of messages to the LoRaWAN server. See [[Uplink payload>>||anchor="H2.3UplinkPayload"]] for detail.
Xiaoling 9.5 193
Xiaoling 10.2 194 (((
195 Assume the DLOS8 is already set to connect to the [[TTN V3 network >>url:https://eu1.cloud.thethings.network]]. We need to add the SW3L device in TTN V3:
Xiaoling 64.2 196
197
Xiaoling 10.2 198 )))
Xiaoling 9.5 199
Xiaoling 10.2 200 (((
Xiaoling 63.14 201 (% style="color:blue" %)**Step 1**(%%): Create a device in TTN V3 with the OTAA keys from SW3L.
Xiaoling 10.2 202 )))
Xiaoling 9.5 203
Xiaoling 10.2 204 (((
205 Each SW3L is shipped with a sticker with the default device EUI as below:
206 )))
Xiaoling 9.5 207
Xiaoling 71.3 208 [[image:image-20230426085254-1.png||height="236" width="508"]]
Xiaoling 9.5 209
Xiaoling 69.2 210
Xiaoling 87.2 211 You can enter this key in the LoRaWAN Server portal. Below is TTN screen shot:
Xiaoling 9.5 212
Xiaoling 87.2 213 **Create the application.**
Xiaoling 9.5 214
Xiaoling 87.2 215 [[image:https://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/SAC01L_LoRaWAN_Temperature%26Humidity_Sensor_User_Manual/WebHome/image-20250423093843-1.png?width=756&height=264&rev=1.1||alt="image-20250423093843-1.png"]]
Xiaoling 9.5 216
Xiaoling 87.2 217 [[image:https://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LTC2-LB--LoRaWAN_Temperature_Transmitter_User_Manual/WebHome/image-20240907111305-2.png?width=1000&height=572&rev=1.1||alt="image-20240907111305-2.png"]]
Xiaoling 67.2 218
Xiaoling 43.2 219
Xiaoling 87.2 220 **Add devices to the created Application.**
Xiaoling 43.2 221
Xiaoling 87.2 222 [[image:https://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LTC2-LB--LoRaWAN_Temperature_Transmitter_User_Manual/WebHome/image-20240907111659-3.png?width=977&height=185&rev=1.1||alt="image-20240907111659-3.png"]]
Xiaoling 43.2 223
Xiaoling 87.2 224 [[image:https://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LTC2-LB--LoRaWAN_Temperature_Transmitter_User_Manual/WebHome/image-20240907111820-5.png?width=975&height=377&rev=1.1||alt="image-20240907111820-5.png"]]
Xiaoling 43.2 225
226
Xiaoling 87.2 227 **Enter end device specifics manually.**
Xiaoling 9.5 228
Xiaoling 87.2 229 [[image:https://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LTC2-LB--LoRaWAN_Temperature_Transmitter_User_Manual/WebHome/image-20240907112136-6.png?width=697&height=687&rev=1.1||alt="image-20240907112136-6.png"]]
Xiaoling 55.8 230
231
Xiaoling 87.2 232 **Add DevEUI and AppKey. Customize a platform ID for the device.**
Xiaoling 9.5 233
Xiaoling 87.2 234 [[image:https://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LTC2-LB--LoRaWAN_Temperature_Transmitter_User_Manual/WebHome/image-20240907112427-7.png?rev=1.1||alt="image-20240907112427-7.png"]]
235
236
237 (% style="color:blue" %)**Step 2**(%%):** Add decoder.**
238
239 In TTN, user can add a custom payload so it shows friendly reading.
240
241 Click this link to get the decoder: [[https:~~/~~/github.com/dragino/dragino-end-node-decoder/tree/main/>>url:https://github.com/dragino/dragino-end-node-decoder/tree/main/]]
242
243 Below is TTN screen shot:
244
245 [[image:https://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LDS25-LBLDS25-LS--LoRaWAN_LiDAR_Distance_Auto-Clean_Sensor_User_Manual/WebHome/image-20241009140556-1.png?width=1184&height=488&rev=1.1||alt="image-20241009140556-1.png" height="488" width="1184"]]
246
247 [[image:https://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LDS25-LBLDS25-LS--LoRaWAN_LiDAR_Distance_Auto-Clean_Sensor_User_Manual/WebHome/image-20241009140603-2.png?width=1168&height=562&rev=1.1||alt="image-20241009140603-2.png"]]
248
249
250 (% style="color:blue" %)**Step 3**(%%): Power on SW3L
251
Bei Jinggeng 65.1 252 [[image:image-20220519094347-1.png||_mstalt="432549" height="430" width="725"]]
Xiaoling 9.5 253
Xiaoling 66.2 254
Xiaoling 10.2 255 (((
256 Put the jumper to power on SW3L and it will auto-join to the TTN V3 network. After join success, it will start to upload sensor data to TTN V3 and the user can see it in the panel.
257 )))
Xiaoling 9.5 258
Bei Jinggeng 65.1 259 [[image:1652924675638-547.png||_mstalt="298363" height="254" width="732"]]
Xiaoling 9.5 260
Xiaoling 50.48 261
Xiaoling 9.5 262 == 2.3 Uplink Payload ==
263
Xiaoling 64.2 264
Xiaoling 44.2 265 (((
Xiaoling 9.5 266 Uplink payloads have two types:
Xiaoling 44.2 267 )))
Xiaoling 9.5 268
Xiaoling 44.2 269 * (((
270 Open/Close Status: Use FPORT=2
271 )))
272 * (((
273 Other control commands: Use other FPORT fields.
274 )))
Xiaoling 9.5 275
Xiaoling 44.2 276 (((
Xiaoling 9.5 277 The application server should parse the correct value based on FPORT settings.
Xiaoling 50.47 278
279
Xiaoling 44.2 280 )))
Xiaoling 9.5 281
282 === 2.3.1 Device Status, FPORT~=5 ===
283
Xiaoling 64.2 284
Xiaoling 11.2 285 (((
Xiaoling 44.2 286 (((
Xiaoling 11.2 287 Include device configure status. Once SW3L Joined the network, it will uplink this message to the server. After that, SW3L will uplink Device Status every 12 hours.
288 )))
Xiaoling 44.2 289 )))
Xiaoling 9.5 290
Xiaoling 11.2 291 (((
Xiaoling 44.2 292 (((
Xiaoling 11.2 293 Users can also use the downlink command(0x26 01) to ask SW3L to resend this uplink. This uplink payload also includes the DeviceTimeReq to get time.
Xiaoling 51.2 294
Xiaoling 75.3 295 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
Xiaoling 75.4 296 |(% colspan="6" style="background-color:#4f81bd; color:white" %)**Device Status (FPORT=5)**
Xiaoling 71.7 297 |(% style="width:103px" %)**Size (bytes)**|(% style="width:72px" %)**1**|**2**|(% style="width:91px" %)**1**|(% style="width:86px" %)**1**|(% style="width:44px" %)**2**
Xiaoling 75.2 298 |(% style="width:103px" %)Value|(% style="width:72px" %)Sensor Model|Firmware Version|(% style="width:91px" %)Frequency Band|(% style="width:86px" %)Sub-band|(% style="width:44px" %)BAT
Xiaoling 11.2 299 )))
Xiaoling 44.2 300 )))
Xiaoling 9.5 301
302
303 Example parse in TTNv3
304
Bei Jinggeng 65.1 305 [[image:1652925144491-755.png||_mstalt="296296" height="139" width="732"]]
Xiaoling 9.5 306
Xiaoling 63.14 307 * (% style="color:#037691" %)**Sensor Model**(%%): For SW3L, this value is 0x11
Xiaoling 9.5 308
Xiaoling 63.14 309 * (% style="color:#037691" %)**Firmware Version**(%%): 0x0100, Means: v1.0.0 version
Xiaoling 9.5 310
Xiaoling 63.14 311 * (% style="color:#037691" %)**Frequency Band**(%%):
Xiaoling 9.5 312
313 *0x01: EU868
Xiaoling 13.2 314
Xiaoling 9.5 315 *0x02: US915
Xiaoling 13.2 316
Xiaoling 9.5 317 *0x03: IN865
Xiaoling 13.2 318
Xiaoling 9.5 319 *0x04: AU915
Xiaoling 13.2 320
Xiaoling 9.5 321 *0x05: KZ865
Xiaoling 13.2 322
Xiaoling 9.5 323 *0x06: RU864
Xiaoling 13.2 324
Xiaoling 9.5 325 *0x07: AS923
Xiaoling 13.2 326
Xiaoling 9.5 327 *0x08: AS923-1
Xiaoling 13.2 328
Xiaoling 9.5 329 *0x09: AS923-2
Xiaoling 13.2 330
Xiaoling 9.5 331 *0x0a: AS923-3
Xiaoling 13.2 332
Xiaoling 9.5 333 *0x0b: CN470
Xiaoling 13.2 334
Xiaoling 9.5 335 *0x0c: EU433
Xiaoling 13.2 336
Xiaoling 9.5 337 *0x0d: KR920
Xiaoling 13.2 338
Xiaoling 9.5 339 *0x0e: MA869
340
341 * (((
Xiaoling 63.14 342 (% style="color:#037691" %)**Sub-Band**:
Xiaoling 9.5 343
344 * AU915 and US915:value 0x00 ~~ 0x08
345 * CN470: value 0x0B ~~ 0x0C
346 * Other Bands: Always 0x00
Xiaoling 51.3 347
348
Xiaoling 9.5 349 )))
350
Xiaoling 63.14 351 * (% style="color:#037691" %)**Battery Info:**
Xiaoling 9.5 352
353 Check the battery voltage.
354
355 **Ex1**: 0x0B45 = 2885mV
356
357 **Ex2**: 0x0B49 = 2889mV
358
Xiaoling 50.46 359
Xiaoling 9.5 360 === 2.3.2 Sensor Configuration, FPORT~=4 ===
361
Xiaoling 64.2 362
Xiaoling 13.2 363 SW3L will only send this command after getting the downlink command (0x26 02) from the server.
Xiaoling 9.5 364
Xiaoling 75.3 365 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
Xiaoling 75.4 366 |(% style="background-color:#4f81bd; color:white; width:70px" %) **Size(bytes)**|(% style="background-color:#4f81bd; color:white; width:105px" %)**3**|(% style="background-color:#4f81bd; color:white; width:60px" %)**1**|(% style="background-color:#4f81bd; color:white; width:96px" %)**1**|(% style="background-color:#4f81bd; color:white; width:105px" %)**2**|(% style="background-color:#4f81bd; color:white; width:74px" %)**1**
Xiaoling 71.22 367 |Value|(% style="width:104px" %)TDC(unit:sec)|(% style="width:43px" %)N/A|(% style="width:91px" %)Stop Timer|(% style="width:100px" %)Alarm Timer|(% style="width:69px" %)Reserve
Xiaoling 71.7 368
Xiaoling 63.14 369 * (% style="color:#037691" %)**TDC: (default: 0x0004B0)**
Xiaoling 9.5 370
Xiaoling 13.2 371 Uplink interval for the total pulse count, default value is 0x0004B0 which is 1200 seconds = 20 minutes.
Xiaoling 9.5 372
Xiaoling 52.2 373
Xiaoling 63.14 374 * (% style="color:#037691" %)**STOP Duration & Alarm Timer**
Xiaoling 9.5 375
Xiaoling 48.4 376 Shows the configure value of [[Alarm for continuously water flow>>||anchor="H3.4Alarmforcontinuouslywaterflow"]]
Xiaoling 9.5 377
Bei Jinggeng 65.1 378 [[image:image-20220519095747-2.png||_mstalt="434460" height="113" width="723"]]
Xiaoling 9.5 379
Xiaoling 50.45 380
Xiaoling 17.4 381 === 2.3.3 Water Flow Value, Uplink FPORT~=2 ===
Xiaoling 9.5 382
Xiaoling 64.2 383
Xiaoling 17.2 384 (((
385 SW3L will send this uplink **after** Device Status once join the LoRaWAN network successfully. And SW3L will:
386 )))
Xiaoling 9.5 387
Xiaoling 17.2 388 (((
Xiaoling 48.4 389 periodically send this uplink every 20 minutes, this interval [[can be changed>>||anchor="H3.1SetTransmitIntervalTime"]].
Xiaoling 17.2 390 )))
Xiaoling 9.5 391
Xiaoling 17.2 392 (((
Xiaoling 9.5 393 Uplink Payload totals 11 bytes.
Xiaoling 17.2 394 )))
Xiaoling 9.5 395
Xiaoling 75.3 396 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
397 |=(% colspan="6" style="width: 510px;background-color:#4F81BD;color:white" %)**Water Flow Value,  FPORT=2**
Xiaoling 67.9 398 |(% style="width:60px" %)**Size(bytes)**|(% style="width:130px" %)**1**|(% style="width:130px" %)**4**|(% style="width:30px" %)**1**|(% style="width:50px" %)**1**|(% style="width:80px" %)**4**
Xiaoling 75.4 399 |(% style="width:110px" %)Value|(% style="width:81px" %)Calculate Flag & [[Alarm>>||anchor="H3.4Alarmforcontinuouslywaterflow"]]|(% style="width:95px" %)(((
Xiaoling 17.2 400 Total pulse Or Last Pulse
Xiaoling 52.3 401 )))|(% style="width:55px" %)MOD|(% style="width:115px" %)Reserve(0x01)|(% style="width:129px" %)[[Unix TimeStamp>>||anchor="H2.4.1UnixTimeStamp"]]
Xiaoling 9.5 402
Xiaoling 75.3 403 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:470px" %)
404 |=(% colspan="4" style="width: 470px;background-color:#4F81BD;color:white" %)**Status & Alarm field**
Xiaoling 67.10 405 |(% style="width:60px" %)**Size(bit)**|(% style="width:80px" %)**6**|(% style="width:310px" %)**1**|(% style="width:20px" %)**1**
Xiaoling 75.4 406 |(% style="width:88px" %)Value|(% style="width:117px" %)Calculate Flag|(% style="width:221px" %)Alarm: 0: No Alarm; 1: Alarm|(% style="width:64px" %)N/A
Xiaoling 9.5 407
Bei Jinggeng 65.1 408 [[image:image-20220519095946-3.png||_mstalt="435110" height="284" width="736"]]
Xiaoling 17.2 409
Xiaoling 52.4 410
Xiaoling 17.5 411 * (((
Xiaoling 63.14 412 (% style="color:#037691" %)**Calculate Flag**
Xiaoling 17.5 413 )))
Xiaoling 9.5 414
Xiaoling 17.5 415 (((
Edwin Chen 67.1 416 The calculate flag is a user defined field, IoT server can use this flag to handle different meters with different pulse factors. For example, if there are 100 Flow Sensors, meters 1 ~~50 are 1 liter/pulse and meters 51 ~~ 100 has 1.5 liter/pulse.
Xiaoling 17.5 417 )))
Xiaoling 9.5 418
Xiaoling 17.5 419 (((
Xiaoling 17.3 420 **Example: in the default payload:**
Xiaoling 17.5 421 )))
Xiaoling 9.5 422
Edwin Chen 74.1 423 (((
424 * calculate flag=0: for SW3L-004 Flow Sensor: 450 pulse = 1 L
425 * calculate flag=1: for SW3L-006 Flow Sensor: 390 pulse = 1 L
426 * calculate flag=2: for SW3L-010 Flow Sensor: 64 pulse = 1 L
Mengting Qiu 79.1 427
428 (% style="color:red" %)**Note: At present, the calculation flag can only be set to 0~~2, and probe types other than this can directly calculate water flow using different decoding.**
Xiaoling 17.5 429 )))
Xiaoling 17.2 430
Xiaoling 17.5 431 (((
Xiaoling 9.5 432 Default value: 0. 
Xiaoling 17.5 433 )))
Xiaoling 9.5 434
Xiaoling 17.5 435 (((
Xiaoling 9.5 436 Range (6 bits): (b)000000 ~~ (b) 111111
Edwin Chen 67.1 437
438 If user use with a meter for example is 0.02L/pulse. To proper decode the correct value in server,
439
440 1) User can set the Calculate Flag of this sensor to 3.
441
442 2) In server side, when a sensor data arrive, the decoder will check the value of Calculate Flag, It the value is 3, the total volume = 0.02 x Pulse Count.
Xiaoling 17.5 443 )))
Xiaoling 9.5 444
Xiaoling 17.5 445 (((
Xiaoling 48.4 446 (% style="color:red" %)**NOTE: User need to set Calculate Flag to proper value before use Flow Sensor. Downlink or AT Command see: **(%%)Refer: [[Set Calculate Flag>>||anchor="H3.6Setthecalculateflag"]]
Xiaoling 52.4 447
448
Xiaoling 17.5 449 )))
Xiaoling 9.5 450
Xiaoling 17.5 451 * (((
Xiaoling 63.14 452 (% style="color:#037691" %)**Alarm**
Xiaoling 17.5 453 )))
Xiaoling 9.5 454
Xiaoling 17.5 455 (((
Xiaoling 71.19 456 See [[Alarm for continuously water flow>>||anchor="H3.4Alarmforcontinuouslywaterflow"]]
Xiaoling 17.5 457 )))
Xiaoling 9.5 458
Bei Jinggeng 65.1 459 [[image:image-20220519095946-4.png||_mstalt="435474" height="65" width="724"]]
Xiaoling 17.2 460
Xiaoling 52.4 461
Xiaoling 17.5 462 * (((
Xiaoling 63.14 463 (% style="color:#037691" %)**Total pulse**
Xiaoling 17.5 464 )))
Xiaoling 9.5 465
Xiaoling 17.5 466 (((
Xiaoling 17.2 467 Total pulse/counting since factory
Xiaoling 17.5 468 )))
Xiaoling 9.5 469
Xiaoling 17.5 470 (((
Xiaoling 17.2 471 Range (4 Bytes) : 0x00000000~~ 0xFFFFFFFF .
Xiaoling 52.4 472
473
Xiaoling 17.5 474 )))
Xiaoling 9.5 475
Xiaoling 17.5 476 * (((
Xiaoling 63.14 477 (% style="color:#037691" %)**Last Pulse**
Xiaoling 17.5 478 )))
Xiaoling 9.5 479
Xiaoling 17.5 480 (((
Xiaoling 17.2 481 Total pulse since last FPORT=2 uplink. (Default 20 minutes)
Xiaoling 17.5 482 )))
Xiaoling 9.5 483
Xiaoling 17.5 484 (((
Xiaoling 17.2 485 Range (4 Bytes) : 0x00000000~~ 0xFFFFFFFF .
Xiaoling 52.4 486
487
Xiaoling 17.5 488 )))
Xiaoling 9.5 489
Xiaoling 17.5 490 * (((
Xiaoling 63.14 491 (% style="color:#037691" %)**MOD: Default =0**
Xiaoling 17.5 492 )))
Xiaoling 17.2 493
Xiaoling 17.5 494 (((
Xiaoling 17.3 495 MOD=0 ~-~-> Uplink Total Pulse since factory
Xiaoling 17.5 496 )))
Xiaoling 17.2 497
Xiaoling 17.5 498 (((
Xiaoling 17.3 499 MOD=1 ~-~-> Uplink total pulse since last FPORT=2 uplink.
Xiaoling 52.4 500
501
Xiaoling 17.5 502 )))
Xiaoling 17.2 503
Xiaoling 17.5 504 * (((
Xiaoling 63.14 505 (% style="color:#037691" %)**Water Flow Value**
Xiaoling 66.2 506
507
508
Xiaoling 17.5 509 )))
Xiaoling 17.2 510
Xiaoling 17.5 511 (((
Xiaoling 66.2 512 Total Water Flow Volume = (Calculate Flag) x (Total Pulse)=9597/450=21.3L
513
514
Xiaoling 17.5 515 )))
Xiaoling 17.2 516
Bei Jinggeng 65.1 517 [[image:image-20220519095946-5.png||_mstalt="435838" height="50" width="727"]]
Xiaoling 17.2 518
Xiaoling 52.4 519
Xiaoling 66.2 520
Xiaoling 17.5 521 (((
Xiaoling 66.2 522 Total Water Flow for TDC timer = (Calculate Flag) x (Last Pulse)=79/450=0.2L
523
524
Xiaoling 17.5 525 )))
Xiaoling 17.2 526
Bei Jinggeng 65.1 527 [[image:image-20220519095946-6.png||_mstalt="436202" height="43" width="733"]] ** **
Xiaoling 17.2 528
Xiaoling 50.44 529
Xiaoling 19.2 530 === 2.3.4 Historical Water Flow Status, FPORT~=3 ===
Xiaoling 9.5 531
Xiaoling 64.2 532
Xiaoling 19.2 533 (((
Xiaoling 63.17 534 SW3L stores sensor values and users can retrieve these history values via the [[downlink command>>||anchor="H2.4DatalogFeature"]].
Xiaoling 19.2 535 )))
Xiaoling 9.5 536
Xiaoling 19.2 537 (((
538 The historical payload includes one or multiplies entries and every entry has the same payload as Real-Time water flow status.
539 )))
Xiaoling 9.5 540
Xiaoling 19.2 541 * (((
Xiaoling 48.4 542 Each data entry is 11 bytes and has the same structure as [[real time water flow status>>||anchor="H2.3.3A0WaterFlowValue2CUplinkFPORT3D2"]], to save airtime and battery, SW3L will send max bytes according to the current DR and Frequency bands.
Xiaoling 19.2 543 )))
Xiaoling 9.5 544
Xiaoling 19.2 545 (((
Xiaoling 9.5 546 For example, in the US915 band, the max payload for different DR is:
Xiaoling 19.2 547 )))
Xiaoling 9.5 548
Xiaoling 19.2 549 (((
Xiaoling 67.2 550 **a) DR0:** max is 11 bytes so one entry of data
Xiaoling 19.2 551 )))
Xiaoling 9.5 552
Xiaoling 19.2 553 (((
Xiaoling 67.2 554 **b) DR1:** max is 53 bytes so devices will upload 4 entries of data (total 44 bytes)
Xiaoling 19.2 555 )))
Xiaoling 9.5 556
Xiaoling 19.2 557 (((
Xiaoling 67.2 558 **c) DR2:** total payload includes 11 entries of data
Xiaoling 19.2 559 )))
Xiaoling 9.5 560
Xiaoling 19.2 561 (((
Xiaoling 67.2 562 **d) DR3:** total payload includes 22 entries of data.
Xiaoling 19.2 563 )))
Xiaoling 9.5 564
Xiaoling 19.2 565 (((
Xiaoling 67.2 566 If SW3L doesn't have any data in the polling time. It will uplink 11 bytes of 0
Xiaoling 52.6 567
568
Xiaoling 19.2 569 )))
Xiaoling 9.5 570
Xiaoling 19.2 571 (((
Xiaoling 52.7 572 (% style="color:#037691" %)**Downlink:**
Xiaoling 19.2 573 )))
Xiaoling 9.5 574
Xiaoling 19.2 575 (((
576 0x31 62 46 B1 F0 62 46 B3 94 07
577 )))
Xiaoling 9.5 578
Bei Jinggeng 65.1 579 [[image:1652926690850-712.png||_mstalt="295178" height="115" width="726"]]
Xiaoling 9.5 580
Xiaoling 52.6 581
Xiaoling 19.2 582 (((
Xiaoling 52.7 583 (% style="color:#037691" %)**Uplink:**
Xiaoling 19.2 584 )))
Xiaoling 9.5 585
Xiaoling 19.2 586 (((
587 00 00 01 00 00 00 00 62 46 B2 26 00 00 01 00 00 00 00 62 46 B2 5D 00 00 01 00 00 00 00 62 46 B2 99 00 00 01 00 00 00 00 62 46 B2 D5 00 00 01 00 00 01 15 62 46 B3 11 00 00 01 00 00 01 1F 62 46 B3 7E
Xiaoling 52.6 588
589
Xiaoling 19.2 590 )))
Xiaoling 9.5 591
Xiaoling 19.2 592 (((
Xiaoling 52.7 593 (% style="color:#037691" %)**Parsed Value:**
Xiaoling 19.2 594 )))
Xiaoling 9.5 595
Xiaoling 19.2 596 (((
597 [Alarm, Calculate Flag, MOD, Total pulse or Last Pulse,** **Water Flow Value, TIME]
598 )))
Xiaoling 9.5 599
Xiaoling 19.2 600 (((
601
602 )))
Xiaoling 9.5 603
Xiaoling 19.2 604 (((
605 [FALSE,0,0,0,0.0,2022-04-01 08:04:54],
606 )))
Xiaoling 9.5 607
Xiaoling 19.2 608 (((
609 [FALSE,0,0,0,0.0,2022-04-01 08:05:49],
610 )))
Xiaoling 9.5 611
Xiaoling 19.2 612 (((
613 [FALSE,0,0,0,0.0,2022-04-01 08:06:49],
614 )))
Xiaoling 9.5 615
Xiaoling 19.2 616 (((
617 [FALSE,0,0,0,0.0,2022-04-01 08:07:49],
618 )))
Xiaoling 9.5 619
Xiaoling 19.2 620 (((
621 [FALSE,0,0,277,0.6,2022-04-01 08:08:49],
622 )))
Xiaoling 9.5 623
Xiaoling 19.2 624 (((
625 [FALSE,0,0,287,0.6,2022-04-01 08:10:38],
Xiaoling 66.2 626
627
Xiaoling 19.2 628 )))
Xiaoling 9.5 629
Bei Jinggeng 65.1 630 [[image:1652926777796-267.png||_mstalt="300183" height="279" width="724"]]
Xiaoling 9.5 631
632
633 == 2.4 Datalog Feature ==
634
Xiaoling 64.2 635
Xiaoling 9.5 636 When a user wants to retrieve sensor value, he can send a poll command from the IoT platform to ask the sensor to send value in the required time slot.
637
Xiaoling 50.43 638
Xiaoling 9.5 639 === 2.4.1 Unix TimeStamp ===
640
Xiaoling 64.2 641
Xiaoling 21.2 642 SW3L uses Unix TimeStamp format based on
Xiaoling 9.5 643
Bei Jinggeng 65.1 644 [[image:1652926852443-847.png||_mstalt="297427" height="112" width="724"]]
Xiaoling 9.5 645
646 Users can get this time from the link:  [[https:~~/~~/www.epochconverter.com/>>url:https://www.epochconverter.com/]] :
647
648 Below is the converter example
649
Bei Jinggeng 65.1 650 [[image:1652926913271-611.png||_mstalt="293605" height="421" width="720"]]
Xiaoling 9.5 651
Xiaoling 55.13 652
Xiaoling 9.5 653 === 2.4.2 Set Device Time ===
654
Xiaoling 50.14 655
Xiaoling 21.2 656 (% style="color:#4f81bd" %)**Through LoRaWAN MAC Command**
Xiaoling 9.5 657
Xiaoling 21.2 658 (((
Xiaoling 48.4 659 Once SW3L Joined the LoRaWAN network, it will send the MAC command (DeviceTimeReq) and the server will reply with (DeviceTimeAns) to send the current time to SW3L. If SW3L fails to get the time from the server, SW3L will use the internal time and wait for the next time request ~[[[via Device Status (FPORT=5)>>||anchor="H2.3.1DeviceStatus2CFPORT3D5"]]].
Xiaoling 66.2 660
661
Xiaoling 21.2 662 )))
Xiaoling 9.5 663
Xiaoling 21.2 664 (((
Xiaoling 66.2 665 (% style="color:red" %)**Note: LoRaWAN Server needs to support LoRaWAN v1.0.3(MAC v1.0.3) or higher to support this MAC command feature.**
Xiaoling 50.42 666
667
Xiaoling 21.2 668 )))
Xiaoling 9.5 669
670 === 2.4.3 Poll sensor value ===
671
Xiaoling 64.2 672
Xiaoling 9.5 673 Users can poll sensor values based on timestamps. Below is the downlink command.
674
Xiaoling 75.3 675 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:459px" %)
676 |=(% colspan="4" style="width: 456px;background-color:#4F81BD;color:white" %)**Downlink Command to poll Open/Close status (0x31)**
Xiaoling 21.3 677 |(% style="width:62px" %)**1byte**|(% style="width:137px" %)**4bytes**|(% style="width:136px" %)**4bytes**|(% style="width:120px" %)**1byte**
678 |(% style="width:62px" %)31|(% style="width:137px" %)Timestamp start|(% style="width:136px" %)Timestamp end|(% style="width:120px" %)Uplink Interval
Xiaoling 9.5 679
Xiaoling 45.3 680 (((
Xiaoling 9.5 681 Timestamp start and Timestamp end-use Unix TimeStamp format as mentioned above. Devices will reply with all data logs during this period, using the uplink interval.
Xiaoling 45.3 682 )))
Xiaoling 9.5 683
Xiaoling 45.3 684 (((
Bei Jinggeng 65.1 685 For example, downlink command[[image:image-20220519152849-5.png||_mstalt="434772"]]
Xiaoling 45.3 686 )))
Xiaoling 9.5 687
Xiaoling 45.3 688 (((
Xiaoling 66.2 689 Is to check 2021/11/12 12:00:00 to 2021/11/12 15:00:00's data
Xiaoling 45.3 690 )))
Xiaoling 9.5 691
Xiaoling 45.3 692 (((
Xiaoling 9.5 693 Uplink Internal =5s,means CPL01 will send one packet every 5s. range 5~~255s.
Xiaoling 50.41 694
695
Xiaoling 45.3 696 )))
Xiaoling 9.5 697
698 === 2.4.4 Decoder in TTN V3 ===
699
Xiaoling 64.2 700
Bei Jinggeng 65.1 701 [[image:1652927365661-475.png||_mstalt="297089" height="359" width="723"]]
Xiaoling 9.5 702
Xiaoling 67.6 703 Please check the decoder from this link:  [[https:~~/~~/github.com/dragino/dragino-end-node-decoder>>https://github.com/dragino/dragino-end-node-decoder]]
Xiaoling 9.5 704
705
Xiaoling 55.10 706 == 2.5 Show data on Datacake ==
Xiaoling 9.5 707
Xiaoling 64.2 708
Xiaoling 32.3 709 (((
Xiaoling 9.5 710 Datacake IoT platform provides a human-friendly interface to show the sensor data, once we have sensor data in TTN V3, we can use Datacake to connect to TTN V3 and see the data in Datacake. Below are the steps:
Xiaoling 32.3 711 )))
Xiaoling 9.5 712
Xiaoling 32.3 713 (((
Xiaoling 66.2 714 (% style="color:blue" %)**Step 1**(%%): Link TTNv3 to Datacake [[https:~~/~~/docs.datacake.de/lorawan/lns/thethingsindustries#create-integration-on-tti>>url:https://docs.datacake.de/lorawan/lns/thethingsindustries#create-integration-on-tti]]
Xiaoling 32.3 715 )))
Xiaoling 9.5 716
Xiaoling 32.3 717 (((
Xiaoling 66.2 718 (% style="color:blue" %)**Step 2**(%%): Configure SW3L in Datacake  ​​​​
Xiaoling 67.6 719
720
Xiaoling 32.3 721 )))
Xiaoling 9.5 722
Bei Jinggeng 65.1 723 [[image:image-20220519103234-7.png||_mstalt="430482" height="562" width="492"]]
Xiaoling 9.5 724
Xiaoling 67.6 725
Bei Jinggeng 65.1 726 [[image:image-20220519103234-8.png||_mstalt="430846" height="550" width="549"]]
Xiaoling 9.5 727
Xiaoling 67.6 728
Bei Jinggeng 65.1 729 [[image:image-20220519103234-9.png||_mstalt="431210" height="493" width="666"]]
Xiaoling 9.5 730
Xiaoling 67.6 731
Bei Jinggeng 65.1 732 [[image:image-20220519103234-10.png||_mstalt="451217" height="234" width="724"]]
Xiaoling 9.5 733
Xiaoling 67.6 734
Bei Jinggeng 65.1 735 [[image:image-20220519103234-11.png||_mstalt="451594" height="386" width="727"]]
Xiaoling 9.5 736
Xiaoling 67.6 737
Bei Jinggeng 65.1 738 [[image:image-20220519103234-12.png||_mstalt="451971" height="262" width="728"]]
Xiaoling 9.5 739
Xiaoling 67.6 740
Bei Jinggeng 65.1 741 [[image:image-20220519103234-13.png||_mstalt="452348" height="216" width="727"]]
Xiaoling 9.5 742
Xiaoling 67.6 743
Bei Jinggeng 65.1 744 [[image:image-20220519103234-14.png||_mstalt="452725" height="464" width="722"]]
Xiaoling 9.5 745
Xiaoling 67.6 746
Bei Jinggeng 65.1 747 [[image:image-20220519103234-15.png||_mstalt="453102" height="488" width="725"]]
Xiaoling 9.5 748
Xiaoling 67.6 749
Bei Jinggeng 65.1 750 [[image:image-20220519103234-16.png||_mstalt="453479" height="407" width="722"]]
Xiaoling 32.4 751
Xiaoling 50.39 752
Xiaoling 32.4 753 = 3. Configure SW3L via AT Command or LoRaWAN Downlink =
754
Xiaoling 64.2 755
Xiaoling 32.4 756 Use can configure SW3L via AT Command or LoRaWAN Downlink.
757
Xiaoling 50.15 758 * AT Command Connection: See [[FAQ>>||anchor="H5.FAQ"]].
Xiaoling 50.17 759 * LoRaWAN Downlink instruction for different platforms: [[IoT LoRaWAN Server>>doc:Main.WebHome]]
Xiaoling 32.4 760
761 There are two kinds of commands to configure SW3L, they are:
762
Xiaoling 50.18 763
Xiaoling 32.4 764 * (% style="color:#4f81bd" %)**General Commands**.
765
766 These commands are to configure:
767
768 * General system settings like uplink interval.
769 * LoRaWAN protocol & radio related command.
770
Xiaoling 55.12 771 They are the same for all Dragino Devices which support DLWS-005 LoRaWAN Stack(Note~*~*). These commands can be found on the wiki: [[End Device AT Commands and Downlink Command>>doc:Main.End Device AT Commands and Downlink Command.WebHome]]
Xiaoling 32.4 772
773
774 * (% style="color:#4f81bd" %)**Commands special design for SW3L**
775
776 These commands are only valid for SW3L, as below:
777
Xiaoling 50.18 778
Xiaoling 32.4 779 == 3.1 Set Transmit Interval Time ==
780
Xiaoling 64.2 781
Xiaoling 32.4 782 Feature: Change LoRaWAN End Node Transmit Interval.
783
Xiaoling 64.2 784
Xiaoling 54.8 785 (% style="color:#4f81bd" %)**AT Command: AT+TDC**
Xiaoling 32.4 786
Xiaoling 75.3 787 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
788 |=(% style="width: 160px;background-color:#4F81BD;color:white" %)**Command Example**|=(% style="width: 140px;background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 210px;background-color:#4F81BD;color:white" %)**Response**
Xiaoling 71.13 789 |(% style="width:156px" %)AT+TDC=?|(% style="width:137px" %)Show current transmit Interval|(((
790 30000
791 OK
792 the interval is 30000ms = 30s
793 )))
794 |(% style="width:156px" %)AT+TDC=60000|(% style="width:137px" %)Set Transmit Interval|(((
795 OK
796 Set transmit interval to 60000ms = 60 seconds
797 )))
Xiaoling 32.4 798
799 (% style="color:#4f81bd" %)**Downlink Command: 0x01**
800
801 Format: Command Code (0x01) followed by 3 bytes time value.
802
Xiaoling 66.3 803 If the downlink payload=0100003C, it means set the END Node's Transmit Interval to 0x00003C=60(S), while type code is 01.
Xiaoling 32.4 804
Xiaoling 67.2 805 * **Example 1**: Downlink Payload: 0100001E  ~/~/  Set Transmit Interval (TDC) = 30 seconds
806 * **Example 2**: Downlink Payload: 0100003C  ~/~/  Set Transmit Interval (TDC) = 60 seconds
Xiaoling 32.4 807
808 == 3.2 Set Password ==
809
Xiaoling 64.2 810
Xiaoling 32.4 811 Feature: Set device password, max 9 digits
812
Xiaoling 64.2 813
Xiaoling 54.8 814 (% style="color:#4f81bd" %)**AT Command: AT+PWORD**
Xiaoling 32.4 815
Xiaoling 75.3 816 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:405px" %)
817 |=(% style="width: 170px;background-color:#4F81BD;color:white" %)**Command Example**|=(% style="width: 124px;background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 110px;background-color:#4F81BD;color:white" %)**Response**
Xiaoling 71.13 818 |(% style="width:170px" %)(((
819 AT+PWORD=?
820 )))|(% style="width:123px" %)(((
821 Show password
822 )))|(% style="width:109px" %)(((
Xiaoling 32.4 823 (((
824 123456
825 )))
826
827 (((
828 OK
829 )))
830 )))
Xiaoling 71.13 831 |(% style="width:170px" %)(((
832 AT+PWORD=999999
833 )))|(% style="width:123px" %)(((
834 Set password
835 )))|(% style="width:109px" %)(((
Xiaoling 32.4 836 OK
837 )))
838
839 (% style="color:#4f81bd" %)**Downlink Command:**
840
841 No downlink command for this feature.
842
Xiaoling 50.38 843
Xiaoling 32.4 844 == 3.3 Quit AT Command ==
845
Xiaoling 64.2 846
Xiaoling 32.4 847 (((
848 Feature: Quit AT Command mode, so user needs to input the password again before using AT Commands.
Xiaoling 54.8 849 (% style="color:#4f81bd" %)**AT Command: AT+DISAT**
Xiaoling 32.4 850 )))
851
Xiaoling 75.3 852 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:452px" %)
853 |=(% style="width: 155px;background-color:#4F81BD;color:white" %)**Command Example**|=(% style="width: 198px;background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 99px;background-color:#4F81BD;color:white" %)**Response**
Xiaoling 71.13 854 |(% style="width:155px" %)AT+DISAT|(% style="width:198px" %)Quit AT Commands mode|(% style="width:96px" %)OK
Xiaoling 32.4 855
856 (% style="color:#4f81bd" %)**Downlink Command:**
857
858 No downlink command for this feature.
859
Xiaoling 50.37 860
Xiaoling 32.5 861 == 3.4 Alarm for continuously water flow ==
Xiaoling 32.4 862
Xiaoling 64.2 863
Xiaoling 32.5 864 (((
865 This feature is to monitor and send Alarm for continuously water flow.
866 )))
Xiaoling 32.4 867
Xiaoling 32.5 868 (((
Xiaoling 67.2 869 Example case is for Toilet water monitoring, if some one push toilet button, the toilet will have water flow. If the toilet button has broken and can't returned to original state, the water flow will keep for hours or days which cause huge waste for water.
Xiaoling 32.5 870 )))
Xiaoling 32.4 871
Xiaoling 32.5 872 (((
873 To monitor this faulty and send alarm, there are two settings:
874 )))
Xiaoling 32.4 875
Xiaoling 32.5 876 * (((
Xiaoling 63.14 877 (% style="color:#4f81bd" %)**Stop Duration: Unit: Second**
Xiaoling 32.5 878 )))
Xiaoling 32.4 879
Xiaoling 32.5 880 (((
Xiaoling 67.2 881 Default: 15s, If SW3L didn't see any water flow in 15s, SW3L will consider stop of water flow event.
Xiaoling 32.5 882 )))
Xiaoling 32.4 883
Xiaoling 32.5 884 * (((
Xiaoling 63.14 885 (% style="color:#4f81bd" %)**Alarm Timer: Units: Minute; Default 0 minutes (means Alarm disable)**
Xiaoling 32.5 886 )))
Xiaoling 32.4 887
Xiaoling 32.5 888 (((
Xiaoling 53.3 889
890
Xiaoling 67.2 891 **Example:** 3 minutes, if SW3L detect a start of water flow event and didn't detect a stop event within Alarm timer, SW3L will send an Alarm to indicate a water flow abnormal alarm.
Xiaoling 32.5 892 )))
Xiaoling 32.4 893
Xiaoling 32.5 894 (((
895 So for example, If we set stop duration=15s and Alarm Timer=3minutes. If the toilet water flow continuously for more than 3 minutes, Sensor will send an alarm (in Confirmed MODE) to platform.
896 )))
Xiaoling 32.4 897
Xiaoling 32.5 898 (((
Xiaoling 64.2 899 (% style="color:red" %)**Note:** **After this alarm is send, sensor will consider a stop of water flow and count for another new event. So if water flow waste last for 1 hour, Sensor will keep sending alarm every 3 minutes.**
Xiaoling 53.3 900
901
Xiaoling 32.5 902 )))
Xiaoling 32.4 903
Xiaoling 32.5 904 (((
905 (% style="color:#4f81bd" %)**AT Command**(%%) to configure:
906 )))
Xiaoling 32.4 907
Xiaoling 32.5 908 * (((
909 AT+PTRIG=15,3  ~-~-> Set Stop duration: 15s, Alarm Timer: 3 minutes.
910 )))
911 * (((
912 AT+ PTRIG=15,0  ~-~-> Default Value, disable water waste Alarm.
913 )))
Xiaoling 32.4 914
Xiaoling 32.5 915 (((
Xiaoling 53.3 916
917
Xiaoling 32.5 918 (% style="color:#4f81bd" %)**Downlink Command**(%%) to configure: 
919 )))
Xiaoling 32.4 920
Xiaoling 32.5 921 (((
Xiaoling 67.2 922 Command: **0xAA aa bb cc**
Xiaoling 32.5 923 )))
Xiaoling 32.4 924
Xiaoling 32.5 925 (((
926 AA: Command Type Code
927 )))
Xiaoling 32.4 928
Xiaoling 32.5 929 (((
930 aa: Stop duration
931 )))
Xiaoling 32.4 932
Xiaoling 32.5 933 (((
934 bb cc: Alarm Timer
935 )))
Xiaoling 32.4 936
Xiaoling 32.5 937 (((
938 If user send 0xAA 0F 00 03: equal to AT+PTRIG=15,3
939 )))
Xiaoling 32.4 940
Xiaoling 54.6 941
Xiaoling 32.6 942 == 3.5 Clear Flash Record ==
Xiaoling 32.4 943
Xiaoling 64.3 944
Xiaoling 32.4 945 Feature: Clear flash storage for data log feature.
946
Xiaoling 64.3 947
Xiaoling 54.8 948 (% style="color:#4f81bd" %)**AT Command: AT+CLRDTA**
Xiaoling 32.4 949
Xiaoling 75.3 950 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
951 |=(% style="width: 156px; background-color:#4F81BD;color:white" %)**Command Example**|=(% style="width: 177px; background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 177px; background-color:#4F81BD;color:white" %)**Response**
Xiaoling 71.13 952 |(% style="width:154px" %)AT+CLRDTA|(% style="width:177px" %)Clear flash storage for data log feature.|(% style="width:177px" %)Clear all stored sensor data... OK
Xiaoling 32.4 953
Xiaoling 32.6 954 (% style="color:#4f81bd" %)**Downlink Command:**
Xiaoling 32.4 955
Xiaoling 67.2 956 * **Example**: 0xA301  ~/~/  Same as AT+CLRDTA
Xiaoling 32.4 957
Xiaoling 32.7 958 == 3.6 Set the calculate flag ==
Xiaoling 32.4 959
Xiaoling 64.3 960
Xiaoling 32.4 961 Feature: Set the calculate flag
962
Xiaoling 64.3 963
Xiaoling 54.8 964 (% style="color:#4f81bd" %)**AT Command: AT+CALCFLAG**
Xiaoling 32.4 965
Xiaoling 75.3 966 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:462px" %)
967 |=(% style="width: 161px;background-color:#4F81BD;color:white" %)**Command Example**|=(% style="width: 204px;background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 97px;background-color:#4F81BD;color:white" %)**Response**
Bei Jinggeng 70.1 968 |(% style="width:161px" %)AT+CALCFLAG=1|(% style="width:202px" %)Set the calculate flag to 1.|(% style="width:95px" %)OK
969 |(% style="width:161px" %)AT+CALCFLAG=2|(% style="width:202px" %)Set the calculate flag to 2.|(% style="width:95px" %)OK
Xiaoling 32.4 970
Xiaoling 32.7 971 (% style="color:#4f81bd" %)**Downlink Command:**
Xiaoling 32.4 972
Bei Jinggeng 71.1 973 * **Example**: 0XA501  ~/~/  Same as AT+CALCFLAG=1
Xiaoling 32.4 974
Bei Jinggeng 78.1 975 == (% data-sider-select-id="e738628a-6dac-4911-8e57-1c07617a3bde" %)3.7 Set count number(%%) ==
Xiaoling 32.4 976
Xiaoling 64.3 977
Xiaoling 32.4 978 Feature: Manually set the count number
979
Xiaoling 64.3 980
Xiaoling 54.8 981 (% style="color:#4f81bd" %)**AT Command: AT+SETCNT**
Xiaoling 32.4 982
Xiaoling 75.3 983 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:481px" %)
984 |=(% style="width: 162px;background-color:#4F81BD;color:white" %)**Command Example**|=(% style="width: 224px;background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 95px;background-color:#4F81BD;color:white" %)**Response**
Bei Jinggeng 71.1 985 |(% style="width:162px" %)AT+SETCNT=0|(% style="width:222px" %)Set the count number to 0.|(% style="width:93px" %)OK
986 |(% style="width:162px" %)AT+SETCNT=100|(% style="width:222px" %)Set the count number to 100.|(% style="width:93px" %)OK
Xiaoling 32.4 987
Xiaoling 32.8 988 (% style="color:#4f81bd" %)**Downlink Command:**
Xiaoling 32.4 989
Bei Jinggeng 71.1 990 * **Example**: 0xA600000001  ~/~/  Same as AT+SETCNT=1
991 * **Example**: 0xA600000064  ~/~/  Same as AT+SETCNT=100
Xiaoling 32.10 992
Mengting Qiu 92.1 993 == 3.8 Set count mode ==
Xiaoling 32.10 994
Xiaoling 64.3 995
Mengting Qiu 90.1 996 Feature: Manually set the count mode.
Xiaoling 32.10 997
Xiaoling 64.3 998
Xiaoling 54.8 999 (% style="color:#4f81bd" %)**AT Command: AT+MOD**
Xiaoling 32.10 1000
Xiaoling 75.3 1001 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:463px" %)
1002 |=(% style="width: 162px;background-color:#4F81BD;color:white" %)**Command Example**|=(% style="width: 193px;background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 108px;background-color:#4F81BD;color:white" %)**Response**
Mengting Qiu 91.1 1003 |(% style="width:162px" %)AT+MOD=0|(% style="width:191px" %)Accumulative (Default)|(% style="width:106px" %)OK
1004 |(% style="width:162px" %)AT+MOD=1|(% style="width:191px" %)Reset after uplink.|(% style="width:106px" %)OK
Xiaoling 32.10 1005
1006 (% style="color:#4f81bd" %)**Downlink Command:**
1007
Bei Jinggeng 71.1 1008 * **Example: **0x0A00  ~/~/  Same as AT+MOD=0
1009 * **Example:** 0x0A01  ~/~/  Same as AT+MOD=1
Xiaoling 32.10 1010
Mengting Qiu 89.1 1011
Xiaoling 68.3 1012 = 4. Battery & Power Consumption =
Xiaoling 32.11 1013
1014
Xiaoling 68.3 1015 SW3L uses ER26500 + SPC1520 battery pack. See below link for detail information about the battery info and how to replace.
Xiaoling 64.3 1016
Xiaoling 68.3 1017 [[**Battery Info & Power Consumption Analyze**>>url:http://wiki.dragino.com/xwiki/bin/view/Main/How%20to%20calculate%20the%20battery%20life%20of%20Dragino%20sensors%3F/]] .
Xiaoling 32.11 1018
1019
Xiaoling 32.12 1020 = 5. FAQ =
1021
1022 == 5.1 How to use AT Command to configure SW3 ==
1023
Xiaoling 64.3 1024
Xiaoling 32.12 1025 SW3L UART connection photo
1026
Bei Jinggeng 65.1 1027 [[image:1652943554687-149.png||_mstalt="298155" height="354" width="724"]]
Xiaoling 32.12 1028
Xiaoling 50.25 1029
Xiaoling 35.3 1030 (((
Xiaoling 32.12 1031 In the PC, you need to set the serial baud rate to (% style="color:green" %)**9600**(%%) to access the serial console for LSN50. LSN50 will output system info once power on as below:
Xiaoling 35.3 1032 )))
Xiaoling 32.12 1033
Bei Jinggeng 65.1 1034 [[image:1652943563580-704.png||_mstalt="295191" height="504" width="720"]]
Xiaoling 32.12 1035
Xiaoling 50.26 1036
Xiaoling 32.12 1037 == 5.2 How to upgrade the firmware? ==
1038
Xiaoling 64.3 1039
Xiaoling 35.4 1040 (((
Xiaoling 32.12 1041 A new firmware might be available for:
Xiaoling 35.4 1042 )))
Xiaoling 32.12 1043
Xiaoling 35.4 1044 * (((
1045 Support new features
1046 )))
1047 * (((
1048 For bug fix
1049 )))
1050 * (((
1051 Change LoRaWAN bands.
1052 )))
Xiaoling 32.12 1053
Xiaoling 35.4 1054 (((
Bei Jinggeng 65.1 1055 Instruction for how to upgrade: [[Firmware Upgrade Instruction>>doc:Main.Firmware Upgrade Instruction for STM32 base products.WebHome||anchor="H2.HardwareUpgradeMethodSupportList" _mstmutation="1"]]
Xiaoling 35.4 1056 )))
Xiaoling 32.12 1057
Xiaoling 35.4 1058 (((
Xiaoling 66.3 1059 Firmware location:  [[https:~~/~~/www.dropbox.com/sh/jktldt8q674i87l/AADqk1zoUEekCjDR_4ic2Tg0a?dl=0>>https://www.dropbox.com/sh/jktldt8q674i87l/AADqk1zoUEekCjDR_4ic2Tg0a?dl=0]]
Xiaoling 35.4 1060 )))
Xiaoling 32.12 1061
1062
1063 == 5.3 How to change the LoRa Frequency Bands/Region? ==
1064
Xiaoling 64.3 1065
Edwin Chen 61.1 1066 Users can follow the introduction for how to upgrade images. When downloading the images, choose the required image file for download.
Xiaoling 50.29 1067
Edwin Chen 61.1 1068
Edwin Chen 62.1 1069 == 5.4 Can I connect 3rd party flow sensor other than the default one? ==
Edwin Chen 61.1 1070
Xiaoling 64.3 1071
Xiaoling 67.11 1072 If a user wants to connect SW3L to a 3rd party flow sensor such as a [[DN50 flow sensor>>https://valvesdirect.net/product/flow-sensor-2-inch-15-400lpm/]], that is possible. A flow sensor with pulse output is needed.
Edwin Chen 61.1 1073
Xiaoling 67.11 1074 (% style="background-color:yellow" %)**Below is the notice for the connection:**
Edwin Chen 61.1 1075
Xiaoling 67.11 1076 ~1. Connect the 3rd party flow meter to the pulse input and GND of SW3L.
1077
1078 2. Make sure the pulse output voltage of 3rd party flow sensor is less than 5v.
1079
1080 3. It is not recommended to use SW3L to power the external flow meter, unless you are sure the external flow sensor is low power ( several uA). Otherwise the battery of SW3L will be running out soon.
1081
1082 4. After connection, user needs to set the [[Calculator Flag and change the payload>>||anchor="H2.3.3A0WaterFlowValue2CUplinkFPORT3D2"]] so to get the correct reading in the platform.
1083
Mengting Qiu 82.1 1084 **Connection:**
Xiaoling 67.11 1085
Mengting Qiu 82.1 1086 [[image:image-20240918182813-2.jpeg||height="487" width="697"]]
Xiaoling 64.4 1087
Edwin Chen 61.1 1088
Mengting Qiu 87.1 1089 == 5.5 What can I do if error in Flash Write operation is displayed on the serial port? ==
Mengting Qiu 82.1 1090
Mengting Qiu 87.1 1091
1092 When the STM32 module is running, sometimes there is no uplink data (FPORT=2). When we use the serial port to view the printing information, we will find that the serial port is printed as "error in Flash Write operation".
1093
1094 Example:
1095
1096 [[image:image-20250217163534-3.png||height="418" width="1068"]]
1097
1098 [[image:image-20250217163128-1.png||height="604" width="822"]]
1099
1100 The device will reset continuously, and we can use the **AT+CLRDTA** command to clear all stored sensor data. Then restart the device and the device will return to normal.
1101
1102 [[image:image-20250217163301-2.png]]
1103
1104 [[image:image-20250217164119-4.png||height="442" width="1135"]]
1105
1106
Xiaoling 34.3 1107 = 6. Order Info =
1108
Xiaoling 64.3 1109
Xiaoling 67.12 1110 Part Number: (% style="color:#4f81bd" %)**SW3L-XXX-YYY**
Xiaoling 34.3 1111
Xiaoling 67.12 1112 (% style="color:#4f81bd" %)**XXX**(%%): The default frequency band
Xiaoling 34.3 1113
Edwin Chen 74.3 1114 * (% style="color:red" %)**AS923**(%%): LoRaWAN AS923 band
1115 * (% style="color:red" %)**AU915**(%%): LoRaWAN AU915 band
1116 * (% style="color:red" %)**EU433**(%%): LoRaWAN EU433 band
1117 * (% style="color:red" %)**EU868**(%%): LoRaWAN EU868 band
1118 * (% style="color:red" %)**KR920**(%%): LoRaWAN KR920 band
1119 * (% style="color:red" %)**US915**(%%): LoRaWAN US915 band
1120 * (% style="color:red" %)**IN865**(%%): LoRaWAN IN865 band
Edwin Chen 74.2 1121 * (% style="color:red" %)**CN470**(%%): LoRaWAN CN470 band
Xiaoling 64.3 1122
Xiaoling 34.4 1123 (((
Xiaoling 34.3 1124 (% style="color:#4f81bd" %)**YYY**(%%): Flow Sensor Model:
Xiaoling 34.4 1125 )))
Xiaoling 34.3 1126
Edwin Chen 74.2 1127 * 004: DW-004 Flow Sensor: diameter: G1/2” / DN15.  450 pulse = 1 L
1128 * 006: DW-006 Flow Sensor: diameter: G3/4” / DN20. 390 pulse = 1 L
1129 * 010: DW-010 Flow Sensor: diameter: G 1” / DN25. 64 pulse = 1 L
1130 * 020: DW-020 Flow Sensor: diameter: G 2” / DN50. 12 pulse = 1 L
Xiaoling 34.3 1131
Xiaoling 34.4 1132 = 7. Packing Info =
1133
Xiaoling 64.3 1134
Xiaoling 34.4 1135 **Package Includes**:
1136
1137 * SW3L Water Flow Sensor x 1
1138
1139 = 8. Support =
1140
Xiaoling 64.3 1141
Xiaoling 34.4 1142 * (((
1143 Support is provided Monday to Friday, from 09:00 to 18:00 GMT+8. Due to different timezones we cannot offer live support. However, your questions will be answered as soon as possible in the before-mentioned schedule.
1144 )))
1145 * (((
1146 Provide as much information as possible regarding your inquiry (product models, accurately describe your problem and steps to replicate it etc) and send a mail to [[support@dragino.com>>url:file:///D:/市场资料/说明书/LoRa/LT系列/support@dragino.com]].
Xiaoling 66.3 1147
1148
1149
1150
Xiaoling 34.4 1151 )))