Show last authors
1
2
3 (% style="text-align:center" %)
4 [[image:image-20240707214707-1.png||height="476" width="570"]]
5
6
7
8
9
10
11
12 **Table of Contents:**
13
14 {{toc/}}
15
16
17
18
19
20
21
22
23
24 = 1. Introduction =
25
26 == 1.1 Overview ==
27
28
29 The Dragino (% style="color:blue" %)**Weather Station Kit**(%%) is designed for **measuring atmospheric conditions** to provide information for weather forecasts and to study the weather and climate.
30
31 The Weather Station Kit includes (% style="color:blue" %)**a NB transmitter WSC2-N, a 9 in 1 Weather Station WSS-09 and a Rain Gauge WSS-08**.
32
33 (% style="color:blue" %)**Please note that the WSC2-N only includes the transmitter, and the 9 in 1 Weather Station WSS-09 and Rain Gauge WSS-08 need to be purchased separately.**
34
35 The 9 in 1 weather station kit can measure below values: (% style="color:blue" %)**Wind Speed, Wind Direction, Temperature, Humidity, Air Pressure, Illumination, PM2.5, PM10, Noise & Rain Gauge**(%%).
36
37 The NB transmitter use RS485 interface to communicate with the 9 in 1 weather station. It can also connect (% style="color:blue" %)**3rd party RS485 sensors**(%%) to measure more environment data. It also has a pulse counting input which can be used to connect (% style="color:blue" %)**tipping bucket Rain Gauge**(%%).
38
39 WSC2-N supports different uplink methods include (% style="color:blue" %)**TCP, MQTT,  UDP, MQTTS or CoAP**(%%) for different application requirement. and Support Uplinks to various IoT Servers.
40
41 *make sure you have NB-IoT coverage locally.
42
43
44 == 1.2 Features & Spec for WSC2-N Transmitter ==
45
46
47 * NB-IoT Bands: B1/B2/B3/B4/B5/B8/B12/B13/B17/B18/B19/B20/B25/B28/B66/B70/B85 @H-FDD
48 * Ultra-low power consumption
49 * Support WSS09 9 in 1 Sensors: Wind Speed, Wind Direction, Temperature,  Humidity, Air Pressure, Illumination, PM2.5, PM10, Noise & Rain Gauge
50 * RS485 Interface for 3rd party Sensors
51 * Support WSS08 optical Rain Gauge or tipping bucket Rain Gauge
52 * Support Bluetooth v5.1 remote configure and update firmware
53 * Support wireless OTA update firmware
54 * AT Commands to change parameters
55 * Uplink on periodically
56 * Downlink to change configure
57 * IP66 Waterproof Enclosure
58 * 1000mAh Rechargeable Li-ion Battery
59 * Input and Recharge power: 12v
60
61 == 1.3 Specification for WSS-09 9 in 1 weather sensors ==
62
63 [[image:image-20240708092247-1.png]]
64
65 More Detail: [[WSS09-1 Manual.>>doc:Main.Agriculture & Weather Stations.WebHome||anchor="H1.WSS099in1WeatherStationSensor"]]
66
67
68 (% style="color:blue" %)**Wind Speed:**
69
70 * Range: 0~~60m/s
71 * Accuracy: ±(0.2m/s±0.02*v)(v : the wind speed)
72 * Ultrasonic measurement,no start wind strength needed
73
74 (% style="color:blue" %)**Wind Direction:**
75
76 * Range: 0~~3599
77 * Accuracy: +3°
78 * Ultrasonic measurement,no start wind strength needed
79 * Built-in electronic compass. No need to consider installation direction
80
81 (% style="color:blue" %)**Temperature:**
82
83 * Range: -40°C ~~ +80°C
84 * Accuracy: +0.5°C
85
86 (% style="color:blue" %)**Humidity:**
87
88 * Range: 0 ~~ 99% RH
89 * Accuracy Tolerance : Typ +3% RH
90
91 (% style="color:blue" %)**Air Pressure:**
92
93 * Accuracy: ±0.15kPa@25°C 101kPa
94 * Range: 0~~120kPa
95
96 (% style="color:blue" %)**Noise:**
97
98 * Range: 30dB~~120dB
99 * Accuracy: +0.5dB
100
101 (% style="color:blue" %)**PM2.5:**
102
103 * Range: 0~~1000ug/m3
104 * Accuracy: ±3%FS
105 * Resolution: 1ug/m3
106
107 (% style="color:blue" %)**PM10:**
108
109 * Range: 0~~1000ug/m3
110 * Accuracy: +3%FS
111 * Resolution: 1ug/m3
112
113 (% style="color:blue" %)**llumination:**
114
115 * Range: 0~~200k Lux
116 * Accuracy: +7%(25 °C)
117
118 == 1.4 Specification for WSS-08 Optical Rain Guage ==
119
120 [[image:image-20240707215336-2.png||height="159" width="218"]]
121
122 * Input Power: 9~~30 VDC
123 * Sense diameter: 6cm
124 * Pulse Output
125
126 More Detail: [[WSS-08 Manual.>>doc:Main.Agriculture & Weather Stations.WebHome||anchor="H2.WSS08OpticalRangeGuage"]]
127
128 = 2. How to use =
129
130 == 2.1 Installation ==
131
132
133 Below is an installation example for the weather station. Field installation example can be found at [[Appendix I: Field Installation Photo.>>||anchor="H12.AppendixI:FieldInstallationPhoto"]] 
134
135 [[image:image-20250115184031-4.png||height="473" width="1022"]]
136
137
138 (% style="color:blue" %)** Wiring:**
139
140 1. WSC2-N and sensors all powered by solar power via MPPT
141 1. WSC2-N Weather Station Kit already include 9 sensors.
142 1. Possible to add optional 3rd sensors to measure more parameter
143
144 (% style="color:red" %)**Notice 1:**
145
146 * All weather sensors and WSC2-N are powered by MPPT solar recharge controller. MPPT is connected to solar panel and storage battery.
147 * Weather sensors won't work if solar panel and storage battery fails.
148
149 (% style="color:red" %)**Notice 2:**
150
151 Due to shipment and importation limitation, user is better to purchase below parts locally:
152
153 * Solar Panel
154 * Storage Battery
155 * MPPT Solar Recharger
156 * Cabinet.
157
158 == 2.2 Send data to IoT server via NB-IoT network ==
159
160
161 (((
162 The WSC2-N is equipped with a NB-IoT module, the pre-loaded firmware in WSC2-N will get environment data from sensors and send the value to local NB-IoT network via the NB-IoT module.  The NB-IoT network will forward this value to IoT server via the protocol defined by WSC2-N.
163 )))
164
165
166 Below shows the network structure:
167
168 [[image:image-20250115184047-5.png||height="425" width="918"]]
169
170 There are two version: (% style="color:blue" %)**-GE**(%%) and (% style="color:blue" %)**-1T**(%%) version of WSC2-N.
171
172
173 (% style="color:blue" %)**GE Version**(%%): This version doesn't include SIM card or point to any IoT server. User needs to use AT Commands to configure below two steps to set WSC2-N send data to IoT server.
174
175 * Install NB-IoT SIM card and configure APN. See instruction of [[Attach Network>>url:http://wiki.dragino.com/xwiki/bin/view/Main/General%20Configure%20to%20Connect%20to%20IoT%20server%20for%20-NB%20%26%20-NS%20NB-IoT%20models/#H2.AttachNetwork]].
176
177 * Set up sensor to point to IoT Server. See instruction of [[Configure to Connect Different Servers>>url:http://wiki.dragino.com/xwiki/bin/view/Main/General%20Configure%20to%20Connect%20to%20IoT%20server%20for%20-NB%20%26%20-NS%20NB-IoT%20models/#H3.Configuretoconnecttodifferentservers]]. 
178
179 Below shows result of different server as a glance.
180
181 (% border="1" cellspacing="3" style="width:515px" %)
182 |(% style="background-color:#4f81bd; color:white; width:100px" %)**Servers**|(% style="background-color:#4f81bd; color:white; width:300px" %)**Dash Board**|(% style="background-color:#4f81bd; color:white; width:115px" %)**Comments**
183 |(% style="width:127px" %)[[Node-Red>>url:http://wiki.dragino.com/xwiki/bin/view/Main/General%20Configure%20to%20Connect%20to%20IoT%20server%20for%20-NB%20%26%20-NS%20NB-IoT%20models/#H3.5A0Node-RedA028viaA0MQTT29]]|(% style="width:385px" %)(((
184 [[image:image-20250113195417-4.png]]
185 )))|(% style="width:170px" %)
186 |(% style="width:127px" %)[[DataCake>>url:http://wiki.dragino.com/xwiki/bin/view/Main/General%20Configure%20to%20Connect%20to%20IoT%20server%20for%20-NB%20%26%20-NS%20NB-IoT%20models/#H3.4Datacake]]|(% style="width:385px" %)(((
187 [[image:image-20250113195357-3.png]]
188 )))|(% style="width:170px" %)
189 |(% style="width:127px" %)[[Tago.IO>>url:http://wiki.dragino.com/xwiki/bin/view/Main/General%20Configure%20to%20Connect%20to%20IoT%20server%20for%20-NB%20%26%20-NS%20NB-IoT%20models/#H3.7A0Tago.ioA028viaA0MQTT29]]|(% style="width:385px" %)[[image:image-20250113195545-5.png]]|(% style="width:170px" %)
190 |(% style="width:127px" %)[[General UDP>>url:http://wiki.dragino.com/xwiki/bin/view/Main/General%20Configure%20to%20Connect%20to%20IoT%20server%20for%20-NB%20%26%20-NS%20NB-IoT%20models/#H3.1GeneralA0UDPA0Connection]]|(% style="width:385px" %)Raw Payload. Need Developer to design Dash Board|(% style="width:170px" %)
191 |(% style="width:127px" %)[[General MQTT>>url:http://wiki.dragino.com/xwiki/bin/view/Main/General%20Configure%20to%20Connect%20to%20IoT%20server%20for%20-NB%20%26%20-NS%20NB-IoT%20models/#H3.2GeneralA0MQTTA0Connection]]|(% style="width:385px" %)Raw Payload. Need Developer to design Dash Board|(% style="width:170px" %)
192 |(% style="width:127px" %)[[ThingSpeak>>url:http://wiki.dragino.com/xwiki/bin/view/Main/General%20Configure%20to%20Connect%20to%20IoT%20server%20for%20-NB%20%26%20-NS%20NB-IoT%20models/#H3.3A0ThingSpeakA028viaA0MQTT29]]|(% style="width:385px" %)(((
193 [[image:image-20250113195349-2.png]]
194 )))|(% style="width:170px" %)
195 |(% style="width:127px" %)[[ThingsBoard>>url:http://wiki.dragino.com/xwiki/bin/view/Main/General%20Configure%20to%20Connect%20to%20IoT%20server%20for%20-NB%20%26%20-NS%20NB-IoT%20models/#H3.6A0ThingsBoard.CloudA028viaA0MQTT29]]|(% style="width:385px" %)(((
196 [[image:image-20250113195339-1.png]]
197 )))|(% style="width:170px" %)
198
199 (% style="color:blue" %)**1T Version**(%%): This version has 1NCE SIM card pre-installed and configure to send value to ThingsEye. User Just need to select the sensor type in ThingsEyeand Activate WSC2-N and user will be able to see data in ThingsEye. See here for [[ThingsEye Config Instruction>>url:https://wiki.thingseye.io/xwiki/bin/view/Main/]].
200
201
202 == 2.3 Payload Types ==
203
204
205 To meet different server requirement, WSC2-N supports different payload type.
206
207 **Includes:**
208
209 * [[General JSON format payload>>||anchor="H2.2.1GeneralJsonFormat28Type3D529"]]. (Type=5)
210
211 * [[HEX format Payload>>||anchor="H2.2.2HEXformatPayload28Type3D029"]]. (Type=0)
212
213 * [[ThingSpeak Format>>||anchor="H2.2.4ThingSpeakPayload28Type3D129"]]. (Type=1)
214
215 * [[ThingsBoard Format>>||anchor="H2.2.3ThingsBoardPayload28Type3D329"]]. (Type=3)
216
217 User can specify the payload type when choose the connection protocol. Example:
218
219
220 (% style="color:#037691" %)**AT+PRO=1,0**  (%%) ~/~/ Use COAP Connection & hex Payload
221
222 (% style="color:#037691" %)**AT+PRO=1,5**   (%%) ~/~/ Use COAP Connection & Json Payload
223
224 (% style="color:#037691" %)**AT+PRO=2,0**  (%%) ~/~/ Use UDP Connection & hex Payload
225
226 (% style="color:#037691" %)**AT+PRO=2,5**   (%%) ~/~/ Use UDP Connection & Json Payload
227
228 (% style="color:#037691" %)**AT+PRO=3,0**  (%%) ~/~/ Use MQTT Connection & hex Payload
229
230 (% style="color:#037691" %)**AT+PRO=3,5 ** (%%) ~/~/ Use MQTT Connection & Json Payload
231
232 (% style="color:#037691" %)**AT+PRO=4,0**  (%%) ~/~/ Use TCP Connection & hex Payload
233
234 (% style="color:#037691" %)**AT+PRO=4,5 ** (%%) ~/~/ Use TCP Connection & Json Payload
235
236 **Since firmware V1.0.1**, (% style="color:#4472c4" %)**IMSI**(%%) has been added to payload.
237
238
239 === 2.3.1  General Json Format(Type~=5) ===
240
241 This is the **PMMOD=1** generic Json format. It is shown below:
242
243 (% style="color:#4472c4" %)**{"IMEI":"863663062798914","IMSI":"460083513507314","Model":"WSC2-N","payload_ver":1,"rain_count":0.00,"wind_speed":0.00,"wind_level":0,"wind_direction":0,"wind_angel":0,"humidity":44.4,"temperature":22.1,"voise":50.5,"PM2_5":33,"PM10":43,"pressure":102.0,"illumination":635,"interrupt":0,"interrupt_level":0,"battery":3.29,"signal":20,"time":"2025/01/14 02:36:31"}**
244
245 [[image:image-20250114104208-1.png]]
246
247
248 This is the **PMMOD=0** generic Json format. It is shown below:
249
250 (% style="color:#4472c4" %)**{"IMEI":"863663062798914","IMSI":"460083513507314","Model":"WSC2-N","payload_ver":1,"rain_count":100.00,"wind_speed":0.00,"wind_level":0,"wind_direction":0,"wind_angel":0,"humidity":35.4,"temperature":23.5,"voise":46.5,"CO2":31,"pressure":102.0,"illumination":628,"interrupt":0,"interrupt_level":0,"battery":3.28,"signal":16,"time":"2025/01/15 10:47:11"}**
251
252 [[image:image-20250115184850-6.png]]
253
254
255 (% style="color:red" %)**Notice, from above payload:**
256
257 If set to **PMMOD=1**, the following data will be uploaded:
258
259 * BAT,Singal,Mod,Interrupt,Interrupt_level,payload_ver,exit_count,wind_speed,wind_level,wind_direction,wind_angel, humidity,temperature,voise,PM2_5,PM10,pressure,illumination,flag,DIY Sensors(A1~~A4),Timestamp
260
261 If set to **PMMOD=0**, the following data will be uploaded
262
263 * BAT,Singal,Mod,Interrupt,Interrupt_level,payload_ver,exit_count,wind_speed,wind_level,wind_direction,wind_angel, humidity,temperature,voise,PM2_5,PM10,pressure,illumination,flag,DIY Sensors(A1~~A4),Timestamp
264
265 === 2.3.2  HEX format Payload(Type~=0) ===
266
267 ==== a. This is the hex format of PMMOD~=1. ====
268
269 (% class="wikigeneratedid" %)
270 It is shown below:
271
272 (% style="color:#4472c4" %)**f863663062798914f4600835135073143e650c471301000001000000d2003500010003009201d600e602610024003303f800000262810aa204ffffffff678624fe**
273
274 [[image:image-20250321104127-1.png||height="117" width="1395"]]
275
276 [[image:image-20250114164956-1.png]]
277
278 (% style="color:blue" %)**Version:**
279
280 These bytes include the hardware and software version.
281
282 (% style="color:#037691" %)**Higher byte:**(%%) Specify Sensor Model: 0x3e for WSC2-N
283
284 (% style="color:#037691" %)**Lower byte:**(%%) Specify the software version: 0x65=101, means firmware version 1.0.1
285
286
287 (% style="color:blue" %)**BAT (Battery Info):**
288
289 Ex1: 0x0CE5 = 3301mV/1000= 3.301V
290
291
292 (% style="color:blue" %)**Signal Strength:**
293
294 NB-IoT Network signal Strength.
295
296 **Ex1: 0x11 = 17**
297
298 **0**  -113dBm or less
299
300 **1**  -111dBm
301
302 **2...30** -109dBm... -53dBm
303
304 **31**   -51dBm or greater
305
306 **99**    Not known or not detectable
307
308
309 (% style="color:blue" %)**Interrupt:**
310
311 This data field shows if this packet is generated by interrupt or not.
312
313 **Example:**
314
315 If byte[0]&0x01=0x00 : Normal uplink packet.
316
317 If byte[0]&0x01=0x01 : Interrupt Uplink Packet.
318
319
320 (% style="color:blue" %)**Interrupt_level:**
321
322 This byte shows whether the interrupt is triggered by a high or low level.
323
324 **Ex1:** 0x00  Interrupt triggered by falling edge (low level)
325
326 **Ex2: **0x01  Interrupt triggered by rising edge (high level)
327
328
329 (% style="color:blue" %)**payload_ver: **
330
331 The payload version number is used to parse different decodes.
332
333 **Ex2: **0x01  Payload decoding version v1.0.0
334
335
336 (% style="color:blue" %)**exit_count: **
337
338 Converted to rainfall based on the number of interruptions,
339
340 **Ex1:**
341
342 bytes[54]&0x0F(hex) / bytes[55](hex) = 0x81&0x0F / 0x0a = 1 / 10=0.1mm((% style="color:red" %)**Note:Calculate the accuracy of the trigger one time to 0.1mm**(%%))
343
344 bytes[10] | bytes[13] / 0.1mm = 0x000000d2(hex)  *  0.1 = 210(dec) * 0.1 = 21mm((% style="color:red" %)**Note:Use exit_count x precision = rainfall**(%%))
345
346
347 (% style="color:blue" %)**wind_speed:**
348
349 Ex1: 0x0035(hex) / 100 = 53(dec) / 100 = 0.53m/s
350
351
352 (% style="color:blue" %)**wind_level:**
353
354 Ex1: 0x0001(hex) = 1(dec)
355
356
357 (% style="color:blue" %)**wind_direction:**
358
359 Ex1: 0x0003(hex) = 3(dec)
360
361 (% style="color:red" %)**Note: 0 for due north, increasing clockwise, 2 for due east**
362
363
364 (% style="color:blue" %)**wind_angel:**
365
366 Ex1: 0x0092(hex) =  146(dec)
367
368 (% style="color:red" %)**Note: Calculation: 0° clockwise increase in degrees for due north, 90° for due east**
369
370
371 (% style="color:blue" %)**Humidity:   **
372
373 Ex1: :01d6(H)=470(D)    Value:  470 / 10=47.0, So 47.0%
374
375
376 (% style="color:blue" %)**Temperature:**
377
378 If payload is: 01d6H:  (0105 & 8000 == 0), temp = 0105H /10 = 26.1 degree
379
380 If payload is: FF3FH :  (FF3F & 8000 == 1) , temp = (FF3FH - 65536)/10 = -19.3 degrees.
381
382 (FF3F & 8000: Judge whether the highest bit is 1, when the highest bit is 1, it is negative)
383
384
385 (% style="color:blue" %)**Voise:**
386
387 Ex1:0x0261(H) = 609(D)  Value: 609/10=60.9, So 60.9dB/y
388
389
390 (% style="color:blue" %)**PM2_5(CO2):**
391
392 Ex1: 0x0024(H) = 36(D)
393
394
395 (% style="color:blue" %)**PM10:**
396
397 Ex1: 0x0033(H) = 51(D)
398
399
400 (% style="color:blue" %)**Pressure:**
401
402 Ex1: 0x03f8(H) = 1016(D)  Value: 1016/10= 101.6, So 101.6kPa
403
404
405 (% style="color:blue" %)**illumination:**
406
407 Ex1: 0x00000262(H) = 610(D) Lux
408
409
410 (% style="color:blue" %)**Flag:**
411
412 (% style="color:#037691" %)**Higher byte:**
413
414 s_flag: (0x81>>6)&0x01= 000**1 **, A value of 1 for the last value means that the sensor has been recognized, and 0 means that, the sensor has not been recognized.
415
416 i_flag: (0x81>>5)&0x01 = 000**1 **, A last value of 1 means that the interrupt has been triggered, and 0 means that the interrupt has not been triggered.
417
418 (% style="color:#037691" %)**Low byte:**
419
420 Ext:0x0a = 10/100=0.1, This represents 0.1mm of rainfall per trigger conversion.
421
422
423 (% style="color:blue" %)**DIY Sensors(A1~~A4)**
424
425 Ex1:a204ffffffff
426
427 **a2**: 485 Sensor Address
428
429 **04**: Total bytes returned by the sensor
430
431 **ffffffff: **Hexadecimal data returned from sensor acquisition
432
433 (% style="color:red" %)**Note:**(%%)DIY sensor data needs to be set up before it has to go up with the device. (Setup reference link: [[Reference Links>>https://wiki.dragino.com/xwiki/bin/view/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/WSC2-N--Weather_Station_Kit_User_Manual/#H3.3.3AddorDeleteRS485Sensor]])
434
435
436 (% style="color:blue" %)**TimeStamp:   **
437
438 Unit TimeStamp Example: 678624fe(H) = 1736844542(D)
439
440 Put the decimal value into this link(https:~/~/www.epochconverter.com/) to get the time.
441
442
443 ==== b. This is the hex format of PMMOD~=0. ====
444
445 (% class="wikigeneratedid" %)
446 It is shown below:
447
448 (% style="color:#4472c4" %)**f863663062798914f4600835135073143e650ce81401000001000003e800580001000400ac016800ef026a002303fc00000274010aa204ffffffff67879587**
449
450 [[image:image-20250321104145-2.png||height="106" width="1304"]]
451
452 [[image:image-20250115190310-7.png]]
453
454 (% style="color:blue" %)**Version:**
455
456 These bytes include the hardware and software version.
457
458 (% style="color:#037691" %)**Higher byte:**(%%) Specify Sensor Model: 0x3e for WSC2-N
459
460 (% style="color:#037691" %)**Lower byte:**(%%) Specify the software version: 0x65=101, means firmware version 1.0.1
461
462
463 (% style="color:blue" %)**BAT (Battery Info):**
464
465 Ex1: 0x0CE8 = 3304mV/1000= 3.304V
466
467
468 (% style="color:blue" %)**Signal Strength:**
469
470 NB-IoT Network signal Strength.
471
472 **Ex1: 0x14 = 20**
473
474 **0**  -113dBm or less
475
476 **1**  -111dBm
477
478 **2...30** -109dBm... -53dBm
479
480 **31**   -51dBm or greater
481
482 **99**    Not known or not detectable
483
484
485 (% style="color:blue" %)**Interrupt:**
486
487 This data field shows if this packet is generated by interrupt or not.
488
489 **Example:**
490
491 If byte[0]&0x01=0x00 : Normal uplink packet.
492
493 If byte[0]&0x01=0x01 : Interrupt Uplink Packet.
494
495
496 (% style="color:blue" %)**Interrupt_level:**
497
498 This byte shows whether the interrupt is triggered by a high or low level.
499
500 **Ex1:** 0x00  Interrupt triggered by falling edge (low level)
501
502 **Ex2: **0x01  Interrupt triggered by rising edge (high level)
503
504
505 (% style="color:blue" %)**payload_ver: **
506
507 The payload version number is used to parse different decodes.
508
509 **Ex2: **0x01  Payload decoding version v1.0.0
510
511
512 (% style="color:blue" %)**exit_count: **
513
514 Converted to rainfall based on the number of interruptions,
515
516 **Ex1:**
517
518 bytes[54]&0x0F(hex) / bytes[55](hex) = 0x81&0x0F / 0x0a = 1 / 10=0.1mm((% style="color:red" %)**Note:Calculate the accuracy of the trigger one time to 0.1mm**(%%))
519
520 bytes[10] | bytes[13] / 0.1mm = 0x000003e8(hex)  *  0.1 = 1000(dec) * 0.1 = 100mm((% style="color:red" %)**Note:Use exit_count x precision = rainfall**(%%))
521
522
523 (% style="color:blue" %)**wind_speed:**
524
525 Ex1: 0x0058(hex) / 100 = 88(dec) / 100 = 0.88m/s
526
527
528 (% style="color:blue" %)**wind_level:**
529
530 Ex1: 0x0001(hex) = 1(dec)
531
532
533 (% style="color:blue" %)**wind_direction:**
534
535 Ex1: 0x0004(hex) = 4(dec)
536
537 (% style="color:red" %)**Note: 0 for due north, increasing clockwise, 2 for due east**
538
539
540 (% style="color:blue" %)**wind_angel:**
541
542 Ex1: 0x00ac(hex) =  172(dec)
543
544 (% style="color:red" %)**Note: Calculation: 0° clockwise increase in degrees for due north, 90° for due east**
545
546
547 (% style="color:blue" %)**Humidity:   **
548
549 Ex1: :0168(H)=360(D)    Value:  360 / 10=36.0, So 36.0%
550
551
552 (% style="color:blue" %)**Temperature:**
553
554 If payload is: 00ef(H) :  (00ef & 8000 == 0), temp = 00ef(H) /10 = 23.9 degree
555
556 If payload is: FF3F(H) :  (FF3F & 8000 == 1) , temp = (FF3FH - 65536)/10 = -19.3 degrees.
557
558 (FF3F & 8000: Judge whether the highest bit is 1, when the highest bit is 1, it is negative)
559
560
561 (% style="color:blue" %)**Voise:**
562
563 Ex1:0x026a(H) = 618(D)  Value: 618/10=61.8, So 61.8dB/y
564
565
566 (% style="color:blue" %)**CO2:**
567
568 Ex1: 0x0023(H) = 35(D)
569
570
571 (% style="color:blue" %)**Pressure:**
572
573 Ex1: 0x03fc(H) = 1020(D)  Value: 1020/10= 102.0, So 102.0kPa
574
575
576 (% style="color:blue" %)**illumination:**
577
578 Ex1: 0x00000274(H) = 266(D) Lux
579
580
581 (% style="color:blue" %)**Flag:**
582
583 (% style="color:#037691" %)**Higher byte:**
584
585 s_flag: (0x01>>6)&0x01= 000**1 **, A value of 1 for the last value means that the sensor has been recognized, and 0 means that, the sensor has not been recognized.
586
587 i_flag: (0x01>>5)&0x01 = 000**1 **, A last value of 1 means that the interrupt has been triggered, and 0 means that the interrupt has not been triggered.
588
589 (% style="color:#037691" %)**Low byte:**
590
591 Ext:0x0a = 10/100=0.1, This represents 0.1mm of rainfall per trigger conversion.
592
593
594 (% style="color:blue" %)**DIY Sensors(A1~~A4)**
595
596 Ex1:a204ffffffff
597
598 **a2**: 485 Sensor Address
599
600 **04**: Total bytes returned by the sensor
601
602 **ffffffff: **Hexadecimal data returned from sensor acquisition
603
604 (% style="color:red" %)**Note:**(%%)DIY sensor data needs to be set up before it has to go up with the device. (Setup reference link: [[Reference Links>>https://wiki.dragino.com/xwiki/bin/view/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/WSC2-N--Weather_Station_Kit_User_Manual/#H3.3.3AddorDeleteRS485Sensor]])
605
606
607 (% style="color:blue" %)**TimeStamp:    **
608
609 Unit TimeStamp Example: 67879587(H) = 1736938887(D)
610
611 Put the decimal value into this link(https:~/~/www.epochconverter.com/) to get the time.
612
613
614
615 === 2.3.3 ThingsBoard Payload(Type~=3) ===
616
617
618 Type3 payload special design for ThingsBoard, it will also configure other default server to ThingsBoard.
619
620 (% style="color:#4472c4" %)**{
621 "IMEI": "863663062798914",
622 "IMSI": "460083513507314",
623 "Model": "WSC2-N",
624 "payload_ver": 1,
625 "rain_count": 100.00,
626 "wind_speed": 0.00,
627 "wind_level": 0,
628 "wind_direction": 0,
629 "wind_angel": 0,
630 "humidity": 38.0,
631 "temperature": 24.8,
632 "voise": 47.8,
633 "CO2": 34,
634 "pressure": 101.0,
635 "illumination": 632,
636 "interrupt": 0,
637 "interrupt_level": 0,
638 "battery": 3.37,
639 "signal": 17,
640 "time": "2025/01/20 06:46:04"
641 }**
642
643 [[image:image-20250120144735-1.png]]
644
645
646 === 2.3.4 ThingSpeak Payload(Type~=1) ===
647
648
649 This payload meets ThingSpeak platform requirement. It includes only four fields. Form 1~~8 are:
650
651 (% style="color:#4472c4" %)**payload_ver**(%%), (% style="color:#4472c4" %)**exit_count(rain)**(%%), (% style="color:#4472c4" %)**WIND_SPEED**(%%) & (% style="color:#4472c4" %)**WIND_LEVEL **(%%)& (% style="color:#4472c4" %)**WIND_DIRECTION **(%%)& (% style="color:#4472c4" %)**WIND_ANGLE **(%%)& (% style="color:#4472c4" %)**Humidity **(%%)& (% style="color:#4472c4" %)**Temperature**(%%). This payload type only valid for ThingsSpeak Platform
652
653 As below:
654
655 (% style="color:#4472c4" %)**field1=payload_ver & field2=exit_count(rain) & field3=WIND_SPEED & field4=WIND_LEVEL & field5=WIND_DIRECTION & field6=WIND_ANGLE & field7=Humidity & field8=Temperature**
656
657 [[image:image-20250115153122-1.png]]
658
659 [[image:image-20250115153132-2.png]]
660
661
662
663 == 2.4 Test Uplink and Change Update Interval ==
664
665
666 By default, Sensor will send uplinks (% style="color:blue" %)**every 2 hours**(%%)
667
668 User can use below commands to change the (% style="color:blue" %)**uplink interval**.
669
670 (% style="color:#037691" %)**AT+TDC=7200 ** (%%) ~/~/ Set Update Interval to 7200s
671
672 User can also push the button for more than 1 seconds to activate an uplink.
673
674
675 = 3. Configure WSC2-N =
676
677 == 3.1 Configure Methods ==
678
679
680 WSC2-N supports below configure method:
681
682 * AT Command via Bluetooth Connection (**Recommended**): [[BLE Configure Instruction>>http://wiki.dragino.com/xwiki/bin/view/Main/BLE%20Bluetooth%20Remote%20Configure/]].
683
684 * AT Command via UART Connection : See [[UART Connection>>http://wiki.dragino.com/xwiki/bin/view/Main/UART%20Access%20for%20LoRa%20ST%20v4%20base%20model/#H2.3UARTConnectionforSN50v3basemotherboard]].
685
686 * NB-Iot Downlink.  Instruction for different platforms: See [[NB-Iot downlink>>https://wiki.dragino.com/xwiki/bin/view/Main/General%20Configure%20to%20Connect%20to%20IoT%20server%20for%20-NB%20%26%20-NS%20NB-IoT%20models/#H4.A0MQTT2FUDP2FTCPdownlink]] section.
687
688 == 3.2  Serial Access Password ==
689
690 After the Bluetooth or UART connection is successful, use the Serial Access Password to enter the AT command window.
691
692 The label on the box of the node will print the initial password: AT+PIN=**xxxxxx**, and directly use the six-digit password to access the AT instruction window.
693
694 [[image:https://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/RS485-NB%2C-NS_RS485%2CUART_to_NB-IoT_Converter_User_Manual/WebHome/image-20250226165815-1.png?rev=1.1||alt="image-20250226165815-1.png"]]
695
696 If you need to change the password, use **AT+PWORD=**xxxxxx (6 characters), NB nodes only support lowercase letters.
697
698 [[image:https://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/TS01-CB--NB-IoTLTE-M_Tilting_Sensor_User_Manual/WebHome/image-20240826181440-2.png?rev=1.1||alt="image-20240826181440-2.png"]]
699
700 **Note: After entering the command, you need to add a line break, and you can also set automatic line breaks in the Bluetooth tool or UART connection tool.**
701
702 [[image:https://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/TS01-CB--NB-IoTLTE-M_Tilting_Sensor_User_Manual/WebHome/image-20240826181446-3.png?rev=1.1||alt="image-20240826181446-3.png"]]
703
704 == 3.3 Commands special design for WSC2-N ==
705
706
707 These commands only valid for WSC2-N, as below:
708
709
710 === 3.3.1 Set Transmit Interval Time ===
711
712
713 Feature: Change NB-Iot End Node Transmit Interval.
714
715 (% style="color:#037691" %)**AT Command: AT+TDC**
716
717 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:501px" %)
718 |(% style="background-color:#4f81bd; color:white; width:155px" %)**Command Example**|(% style="background-color:#4f81bd; color:white; width:166px" %)**Function**|(% style="background-color:#4f81bd; color:white; width:180px" %)**Response**
719 |(% style="width:155px" %)AT+TDC=?|(% style="width:162px" %)Show current transmit Interval|(% style="width:177px" %)(((
720 30000
721 OK
722 the interval is 30000ms = 30s
723 )))
724 |(% style="width:155px" %)AT+TDC=60000|(% style="width:162px" %)Set Transmit Interval|(% style="width:177px" %)(((
725 OK
726 Set transmit interval to 60000ms = 60 seconds
727 )))
728
729 (% style="color:#037691" %)**Downlink Command: 0x01**
730
731 Format: Command Code (0x01) followed by 3 bytes time value.
732
733 If the downlink payload=0100003C, it means set the END Node's Transmit Interval to 0x00003C=60(S), while type code is 01.
734
735 * Example 1: Downlink Payload: 0100001E  ~/~/  Set Transmit Interval (TDC) = 30 seconds
736 * Example 2: Downlink Payload: 0100003C  ~/~/  Set Transmit Interval (TDC) = 60 seconds
737
738 === 3.3.2 Set the CO2 or PM mode ===
739
740
741 (% style="color:red" %)**Note: Default shipment is CO2 sensor, optional CO2 or PM sensor is available at the time of purchase, which needs to be modified according to the sensor selected at the time of purchase.**
742
743 Feature: Set the CO2/PM mode, and the user can set the corresponding mode according to the purchased sensor.
744
745 (% style="color:#037691" %)**AT Command:**
746
747 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:466px" %)
748 |(% style="background-color:#4f81bd; color:white; width:156px" %)**Command Example**|(% style="background-color:#4f81bd; color:white; width:225px" %)**Function**|(% style="background-color:#4f81bd; color:white; width:85px" %)**Response**
749 |(% style="width:155px" %)AT+PMMOD=1|(% style="width:224px" %)The working sensors are PM2.5 and PM10|(% style="width:84px" %)(((
750 OK
751
752 )))
753 |(% style="width:155px" %)AT+PMMOD=0|(% style="width:224px" %)The working sensors are CO2|(% style="width:84px" %)(((
754 OK
755 )))
756
757 (% style="color:#037691" %)**Downlink Command:**
758
759 * 0xE101     Same as: AT+PMMOD=1
760 * 0xE100     Same as: AT+PMMOD=0
761
762 === 3.3.3 Add or Delete RS485 Sensor ===
763
764
765 (((
766 Feature: User can add or delete 3^^rd^^ party sensor as long they are RS485/Modbus interface,baud rate support 4800.Maximum can add 4 sensors.
767 )))
768
769 (((
770 (% style="color:#037691" %)**AT Command: **
771 )))
772
773 (((
774 (% style="color:blue" %)**AT+DYSENSOR=Type_Code, Query_Length, Query_Command , Read_Length , Valid_Data ,has_CRC,timeout**
775 )))
776
777 * (((
778 Type_Code range:  A1 ~~ A4
779 )))
780 * (((
781 Query_Length:  RS485 Query frame length, Value cannot be greater than 10
782 )))
783 * (((
784 Query_Command:  RS485 Query frame data to be sent to sensor, cannot be larger than 10 bytes
785 )))
786 * (((
787 Read_Length:  RS485 response frame length supposed to receive. Max can receive
788 )))
789 * (((
790 Valid_Data:  valid data from RS485 Response, Valid Data will be added to Payload and upload via LoRaWAN.
791 )))
792 * (((
793 has_CRC:  RS485 Response crc check  (0: no verification required 1: verification required). If CRC=1 and CRC error, valid data will be set to 0.
794 )))
795 * (((
796 timeout:  RS485 receive timeout (uint:ms). Device will close receive window after timeout
797 )))
798
799 (((
800 **Example:**
801 )))
802
803 (((
804 User need to change external sensor use the type code as address code.
805 )))
806
807 (((
808 With a 485 sensor, after correctly changing the address code to A1, the RS485 query frame is shown in the following table:
809 )))
810
811 [[image:image-20220624143553-10.png]]
812
813
814 The response frame of the sensor is as follows:
815
816 [[image:image-20220624143618-11.png]]
817
818
819 **Then the following parameters should be:**
820
821 * Address_Code range: A1
822 * Query_Length: 8
823 * Query_Command: A103000000019CAA
824 * Read_Length: 8
825 * Valid_Data: 23 (Indicates that the data length is 2 bytes, starting from the 3th byte)
826 * has_CRC: 1
827 * timeout: 1500 (Fill in the test according to the actual situation)
828
829 **So the input command is:**
830
831 AT+DYSENSOR=A1,8,A103000000019CAA,8,24,1,1500
832
833
834 In every sampling. WSC2-N will auto append the sensor segment as per this structure and uplink.
835
836 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:351px" %)
837 |=(% style="width: 95px;background-color:#4F81BD;color:white" %)Type Code|=(% style="width: 122px;background-color:#4F81BD;color:white" %)Length (Bytes)|=(% style="width: 134px;background-color:#4F81BD;color:white" %)Measured Value
838 |(% style="width:94px" %)A1|(% style="width:121px" %)2|(% style="width:132px" %)0x000A
839
840 **Related commands:**
841
842 AT+DYSENSOR=A1,0  ~-~->  Delete 3^^rd^^ party sensor A1.
843
844 AT+DYSENSOR  ~-~->  List All 3^^rd^^ Party Sensor. Like below:
845
846
847 (% style="color:#037691" %)**Downlink Command:  **
848
849 **delete custom sensor A1:**
850
851 * 0xE5A1     Same as: AT+DYSENSOR=A1,0
852
853 **Remove all custom sensors**
854
855 * 0xE5FF  
856
857 === 3.3.4 RS485 Test Command ===
858
859
860 (% style="color:#037691" %)**AT Command:**
861
862 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:494px" %)
863 |=(% style="width: 160px;background-color:#4F81BD;color:white" %)**Command Example**|=(% style="width: 248px;background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 86px;background-color:#4F81BD;color:white" %)**Response**
864 |(% style="width:159px" %)AT+RSWRITE=xxxxxx|(% style="width:227px" %)(((
865 Send command to 485 sensor. Range : no more than 10 bytes
866 )))|(% style="width:85px" %)OK
867
868 Eg: Send command **01 03 00 00 00 01 84 0A** to 485 sensor
869
870 AT+RSWRITE=0103000001840A
871
872
873 (% style="color:#037691" %)**Downlink Command:**
874
875 * 0xE20103000001840A     Same as: AT+RSWRITE=0103000001840A
876
877 === 3.3.5 RS485 response timeout ===
878
879
880 Feature: Set or get extended time to receive 485 sensor data.
881
882 (% style="color:#037691" %)**AT Command:**
883
884 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:433px" %)
885 |=(% style="width: 157px;background-color:#4F81BD;color:white" %)**Command Example**|=(% style="width: 190px;background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 86px;background-color:#4F81BD;color:white" %)**Response**
886 |(% style="width:157px" %)AT+DTR=1000|(% style="width:188px" %)(((
887 Set response timeout to: Range : 0~~10000
888 )))|(% style="width:85px" %)OK
889
890 (% style="color:#037691" %)**Downlink Command:**
891
892 Format: Command Code (0xE0) followed by 3 bytes time value.
893
894 If the downlink payload=E0000005, it means set the END Node's Transmit Interval to 0x000005=5(S), while type code is E0.
895
896 * Example 1: Downlink Payload: E0000005  ~/~/  Set Transmit Interval (DTR) = 5 seconds
897 * Example 2: Downlink Payload: E000000A  ~/~/  Set Transmit Interval (DTR) = 10 seconds
898
899 === 3.3.6 Set or get the total count value ===
900
901
902 Feature: The user can set the counting to start from the set value according to the requirements. (only available in counting mode).
903
904 (% style="color:#037691" %)**AT Command:**
905
906 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:433px" %)
907 |=(% style="width: 157px;background-color:#4F81BD;color:white" %)**Command Example**|=(% style="width: 190px;background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 86px;background-color:#4F81BD;color:white" %)**Response**
908 |(% style="width:157px" %)AT+SETCNT=1000|(% style="width:188px" %)Set the total count to start from 1000|(% style="width:85px" %)OK
909
910 (% style="color:#037691" %)**Downlink Command:**
911
912 Format: Command Code (0x09) followed by 5 bytes time value.
913
914 If the downlink payload=09000003E8, This means that the count of the END node will start counting from setting 0x000003E8=1000 (times). while type code is 09.
915
916 * Example 1: Downlink Payload: 09000003E8  ~/~/  Set the value to start counting from 1000 = 1000 (times)
917
918 === 3.3.7  Set interrupt or counting mode ===
919
920
921 Feature: Users can set the trigger mode to counting mode or interrupt mode as needed.
922
923 (% style="color:#037691" %)**AT Command:**
924
925 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:433px" %)
926 |=(% style="width: 157px;background-color:#4F81BD;color:white" %)**Command Example**|=(% style="width: 190px;background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 86px;background-color:#4F81BD;color:white" %)**Response**
927 |(% style="width:157px" %)AT+COUNTMOD=0|(% style="width:188px" %)set to interrupt mode|(% style="width:85px" %)OK
928 |(% style="width:157px" %)AT+COUNTMOD=1|(% style="width:188px" %)(((
929 set to counting mode
930 )))|(% style="width:85px" %)OK
931
932 (% style="color:#037691" %)**Downlink Command:**
933
934 Format: Command Code (0x10) followed by 1 bytes time value.
935
936 If the downlink payload=10 00, Set the trigger mode to interrupt mode, while type code is 10.
937
938 * Example 1: Downlink Payload: 10 00  ~/~/  Same as: AT+COUNTMOD=0  set to interrupt mode
939
940 === 3.3.8 Domain name resolution settings ===
941
942
943 Feature: Set dynamic domain name resolution IP.
944
945 (% style="color:blue" %)**AT command: AT+BKDNS**
946
947 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
948 |=(% style="width: 138px; background-color: rgb(79, 129, 189); color: white;" %)**Command Example**|=(% style="width: 143px; background-color: rgb(79, 129, 189); color: white;" %)**Function/Parameters**|=(% style="width: 229px; background-color: rgb(79, 129, 189); color: white;" %)**Response/Explanation**
949 |(% style="width:134px" %)(((
950 AT+BKDNS=?
951 )))|(% style="width:143px" %)Get current Settings|(% style="width:606px" %)(((
952 0,0,NULL  (default)
953 OK
954 )))
955 |(% colspan="1" rowspan="3" style="width:134px" %)(((
956
957
958
959
960
961
962
963
964
965
966
967 AT+BKDNS=a,b,c
968 )))|(% style="width:143px" %)(((
969 **a**: Enable/Disable dynamic domain name resolution.
970 )))|(% style="width:606px" %)**1**: Disable dynamic domain name update. The ip address will be saved after the domain name is resolved, if the next domain name resolution fails, the last saved ip address will be used.
971 **2**: Enable dynamic domain name update. The ip address will be saved after domain name resolution, if the next domain name resolution fails, the last saved ip address will be used, and the domain name resolution will be updated regularly according to the time set by the customer.
972 |(% style="width:143px" %)**b**: Set the time to update the domain name resolution at regular intervals.|(% style="width:606px" %)(((
973 Unit: hour
974 )))
975 |(% style="width:143px" %)(((
976 **c**: Set the IP address manually.
977 )))|(% style="width:606px" %)(((
978 The format is the same as AT+SERVADDR.
979 If domain name resolution fails, this ip address will be used directly, if domain name resolution succeeds, parameter c will be updated to the successfully resolved IP address.
980 )))
981
982 **Example:**
983
984 * AT+BKDNS=1,0  ~/~/ Dynamic domain name resolution is disabled.
985 * AT+BKDNS=2,1  ~/~/ The dynamic domain name resolution function is enabled and the automatic update time is set to 1 hour.
986 * AT+BKDNS=2,4,3.69.98.183,1883  ~/~/ The dynamic domain name resolution function is enabled and the automatic update time is set to 4 hour, and manually set the ip address, if the domain name failed to resolve, it will directly use this ip to communicate. When the next domain name resolution is successful, it will be updated to the ip address of the successful resolution.
987
988 (% style="color:blue" %)**Downlink Command:  **
989
990 No downlink commands for feature
991
992
993 === 3.3.9 Set the downlink debugging mode ===
994
995 Feature: Set the conversion between the standard version and 1T version downlinks.
996
997 (% style="color:blue" %)**AT command: AT+DOWNTE**
998
999 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
1000 |=(% style="width: 138px; background-color: rgb(79, 129, 189); color: white;" %)**Command Example**|=(% style="width: 143px; background-color: rgb(79, 129, 189); color: white;" %)**Function/Parameters**|=(% style="width: 229px; background-color: rgb(79, 129, 189); color: white;" %)**Response/Explanation**
1001 |(% style="width:134px" %)AT+DOWNTE=?|(% style="width:143px" %)Get current Settings|(% style="width:229px" %)(((
1002 0,0  (default)
1003 OK
1004 )))
1005 |(% colspan="1" rowspan="2" style="width:134px" %)(((
1006
1007
1008
1009
1010 AT+DOWNTE=a,b
1011 )))|(% style="width:143px" %)**a**: Set the conversion between the downlink of the standard version and 1T version|(% style="width:229px" %)(((
1012 **0**: Set the downlink of the standard version.
1013 **1**: Set the downlink of the 1T version(ThingsEye platform)
1014 )))
1015 |(% style="width:143px" %)**b**: Enable/Disable downlink debugging|(% style="width:229px" %)(((
1016 **0**: Disable downlink debugging mode.
1017 **1**: Enable downlink debugging mode, users can see the original downlink reception.
1018 )))
1019
1020 **Example:**
1021
1022 * AT+DOWNTE=0,1  ~/~/ Set to standard version downlink, and enable downlink debugging.
1023 * AT+DOWNTE=1,1  ~/~/ Set to 1T version downlink, and enable downlink debugging.
1024
1025 (% style="color:blue" %)**Downlink Command:  **
1026
1027 No downlink commands for feature
1028
1029
1030
1031 == 3.4 Add 3rd RS485 / Modbus Sensor ==
1032
1033 === 3.4.1 Hardware Connection ===
1034
1035
1036 WSC2-N has a 1 to 3 cables. All the three connectors has same defination as below. It include Five Pins: VCC, GND, RS485-A, RS485-B, Count.
1037
1038 (% style="color:red" %)**Notice: RS485-A,RS485-B can be used to connect multiply sensors. but the COUNT can be only use for one sensor. Which means if you already add a Pulse output Rain Guage in the system, you are not able to add another Pulse Output device.**
1039
1040 [[image:image-20240707220859-4.png||height="313" width="366"]]
1041
1042
1043 === 3.4.2 Software Setup ===
1044
1045
1046 Send AT+DYSENSOR to activate the RS485 sensor for collecting 3rd RS485 sensor. You can refer to the instructions in section 3.3.3 of the manual.
1047
1048 For example: AT+DYSENSOR=A1,8,A103000000019CAA,8,24,1,1500
1049
1050
1051 === 3.4.3 Payload ===
1052
1053 [[image:image-20240416163658-1.png]]
1054
1055 For example: A1 02 00 00
1056
1057 A1 : A1 register data acquisition instruction
1058
1059 02 : The valid data returned is 2 bytes in total.
1060
1061 00 00 : Return valid data
1062
1063
1064 = 3.5 Add tipping bucket total solar radiation sensor =
1065
1066 === 3.5.1 Hardware Connection ===
1067
1068
1069 The following is an example of connecting a total solar radiation sensor to a matching interface cable, and then using the interface to connect the WSC2-N.
1070
1071 Users can also choose to connect the sensor directly to the WSC2-N via the cable and pin instructions below.
1072
1073 The following is an explanation of the [[pins>>||anchor="H5.7PinMapping"]] required for WSC2-N:
1074
1075 **A:** RS485-A  (Connect the RS485 sensor)
1076
1077 **B:** RS485-B  (Connect the RS485 sensor)
1078
1079 **GPIO_EXTI:** Interrupt pin  (Can be used to connect an additionally added pulsed rain gauge)
1080
1081
1082 * Total Solar Radiation Sensor Cable Descripti
1083
1084 [[image:image-20240906174635-2.jpeg||height="430" width="813"]]
1085
1086
1087
1088 * Mating Interface Cable Description
1089
1090 [[image:image-20240906173843-1.jpeg||height="404" width="815"]]
1091
1092 * Connect to WSC2-N
1093
1094 The Total solar radiation sensor does not need to connect the interrupt pin, so the white cable is not wired.
1095
1096 [[image:image-20240906182250-3.jpeg||height="442" width="820"]]
1097
1098
1099 === 3.5.2 Calculating & Decode ===
1100
1101
1102 0FC6 01 00000000 00EB 000F 0000 0003 008E 0251 00CE 0213 0017 001B 03EC 000000DE 90 A1020000 A2020032
1103
1104 For example:  A2 02 00 32
1105
1106 A2 : A2 register data acquisition instruction
1107
1108 02 : The valid data returned is 2 bytes in total.
1109
1110 00 32(HEX) : Return valid data = 50(DEC)W/m2
1111
1112
1113 == 3.6 AT Commands Set ==
1114
1115 AT+<CMD>? : Help on <CMD>
1116
1117 AT+<CMD> : Run <CMD>
1118
1119 AT+<CMD>=<value> : Set the value
1120
1121 AT+<CMD>=? : Get the value
1122
1123
1124 (% style="color:blue" %)**General Commands **
1125
1126 AT+MODEL : Get module information
1127
1128 ATZ : Trig a reset of the MCU
1129
1130 AT+CFGMOD : Working mode selection
1131
1132 AT+DEUI : Get or set the Device ID
1133
1134 AT+CFG : Print all settings
1135
1136 AT+SERVADDR: Get or Set the Server address
1137
1138 AT+TDC : Get or set the application data transmission interval in s
1139
1140 AT+INTMOD : Get or Set the trigger interrupt mode (0:input,1:falling or rising,2:falling,3:rising)
1141
1142 AT+APN : Get or set the APN
1143
1144 AT+PRO : Get or Set usage agreement (1:COAP,2:UDP,3:MQTT,4:TCP)
1145
1146 AT+RXDL : Get or Set the receiving time
1147
1148 AT+LDATA : Get the last upload data
1149
1150 AT+COUNTMOD : Get or Set the count mode
1151
1152 AT+RSWRITE : Write command to 485 sensor
1153
1154 AT+DTR : Set or get the delay time for receiving 485 sensor data
1155
1156 AT+DYSENSOR : Set or get 485 sensor
1157
1158 AT+PMMOD : CO2 to PM2.5/10
1159
1160 AT+SETCNT : Get or set the count at present
1161
1162 AT+FACTOR : Get or Set factor
1163
1164 AT+GETSENSORVALUE : Returns the current sensor measurement
1165
1166 AT+DNSCFG : Get or Set DNS Server
1167
1168 AT+CSQTIME : Get or Set the time to join the network
1169
1170 AT+BKDNS : Get or Set dynamic domain name resolution IP
1171
1172 AT+SLEEP : Get or Set the sleep mode
1173
1174 AT+GETLOG : Print serial port logs
1175
1176 AT+DOWNTE: Get or set the conversion between the standard version and 1T version downlinks
1177
1178
1179 (% style="color:blue" %)**MQTT Management**
1180
1181 AT+MQOS : Set the QoS level of MQTT
1182
1183 AT+CLIENT : Get or Set the MQTT clientID
1184
1185 AT+UNAME : Get or Set the MQTT Username
1186
1187 AT+PWD : Get or Set the MQTT password
1188
1189 AT+PUBTOPIC: Get or set MQTT publishing topic
1190
1191 AT+SUBTOPIC: Get or set MQTT subscription topic
1192
1193 AT+TLSMOD : Get or Set the TLS mode
1194
1195
1196 (% style="color:blue" %)**information**
1197
1198 AT+FDR1 : Reset parameters to factory default values except for passwords
1199
1200 AT+FDR : Reset Parameters to Factory Default
1201
1202 AT+PWORD : Get or set the System password
1203
1204
1205 (% style="color:blue" %)**COAP Management**
1206
1207 AT+URI1: Get or set CoAP option 1
1208
1209 AT+URI2: Get or set CoAP option 2
1210
1211 AT+URI3: Get or set CoAP option 3
1212
1213 AT+URI4: Get or set CoAP option 4
1214
1215
1216 = 4. Power consumption and battery =
1217
1218 == 4.1 Total Power Consumption ==
1219
1220
1221 Dragino Weather Station serial products include the main process unit (WSC2-N) and various sensors. The total power consumption equal total power of all above units. The power consumption for main process unit WSC2-N is 18ma @ 12v. and the power consumption of each sensor can be found on the Sensors chapter.
1222
1223
1224 == 4.2 Battery ==
1225
1226
1227 (((
1228 All sensors are only power by external power source. If external power source is off. All sensor won't work.
1229 )))
1230
1231 (((
1232 Main Process Unit WSC2-N is powered by both external power source and internal 1000mAh rechargeable battery. If external power source is off, WSC2-N still runs and can send periodically uplinks, but the sensors value will become invalid.  External power source can recharge the 1000mAh rechargeable battery.
1233 )))
1234
1235
1236 = 5. Main Process Unit WSC2-N =
1237
1238
1239 WSC2-N is the main process unit in Dragino Weather Station solution. WSC2-N is an an outdoor NB-IOT RS485 end node. It is powered by external 12v solar power and have a built-in Li-ion backup battery.
1240
1241 WSC2-N reads value from various sensors and upload these sensor data to IoT server via NB-Iot wireless protocol.
1242
1243 WSC2-N Supports BLE configure and wireless OTA update which make user easy to use.
1244
1245
1246 == 5.1 Features ==
1247
1248
1249 * NB-IoT Bands: B1/B2/B3/B4/B5/B8/B12/B13/B17/B18/B19/B20/B25/B28/B66/B70/B85 @H-FDD
1250 * Ultra-low power consumption
1251 * RS485 / Modbus protocol
1252 * AT Commands to change parameters
1253 * Downlink to change configure
1254 * Powered by external 12v battery
1255 * Back up rechargeable 1000mAh battery
1256 * IP Rating: IP65
1257 * Support default sensors or 3rd party RS485 sensors
1258 * Support wireless OTA update firmware
1259 * Wall Attachable.
1260
1261 == 5.2 Power Consumption ==
1262
1263
1264 WSC2-N (without external sensor): Idle: 4mA, Transmit: max 40mA
1265
1266
1267 == 5.3 Storage & Operation Temperature ==
1268
1269
1270 -20°C to +60°C
1271
1272
1273 == 5.4 Sleep mode and working mode ==
1274
1275
1276 (% style="color:blue" %)**Deep Sleep Mode: **(%%)Sensor doesn't have any NB-IoT activate. This mode is used for storage and shipping to save battery life.
1277
1278 (% style="color:blue" %)**Working Mode:** (%%)In this mode, Sensor will work as NB-IoT Sensor to Join NB-IoT network and send out sensor data to server. Between each sampling/tx/rx periodically, sensor will be in IDLE mode), in IDLE mode, sensor has the same power consumption as Deep Sleep mode.
1279
1280
1281 == 5.5 Button & LEDs ==
1282
1283
1284 [[image:Main.User Manual for LoRaWAN End Nodes.D20-LBD22-LBD23-LB_LoRaWAN_Temperature_Sensor_User_Manual.WebHome@1675071855856-879.png]]
1285
1286
1287 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
1288 |=(% style="width: 167px;background-color:#4F81BD;color:white" %)**Behavior on ACT**|=(% style="width: 117px;background-color:#4F81BD;color:white" %)**Function**|=(% style="width:226px;background-color:#4F81BD;color:white" %)**Action**
1289 |(% style="width:167px" %)Pressing ACT between 1s < time < 3s|(% style="width:117px" %)Send an uplink|(% style="width:225px" %)(((
1290 If sensor has already attached to NB-IoT network, sensor will send an uplink packet, (% style="color:blue" %)**blue led** (%%)will blink once.
1291 Meanwhile, BLE module will be active and user can connect via BLE to configure device.
1292 )))
1293 |(% style="width:167px" %)Pressing ACT for more than 3s|(% style="width:117px" %)Active Device|(% style="width:225px" %)(((
1294 (% style="color:green" %)**Green led**(%%) will fast blink 5 times, device will enter (% style="color:#037691" %)**OTA mode**(%%) for 3 seconds. And then start to attach NB-IoT network.
1295 (% style="color:green" %)**Green led**(%%) will solidly turn on for 5 seconds after joined in network.
1296 Once sensor is active, BLE module will be active and user can connect via BLE to configure device, no matter if device attach NB-IoT network or not.
1297 )))
1298 |(% style="width:167px" %)Fast press ACT 5 times.|(% style="width:117px" %)Deactivate Device|(% style="width:225px" %)(% style="color:red" %)**Red led**(%%) will solid on for 5 seconds. Means device is in Deep Sleep Mode.
1299
1300 (% style="color:red" %)**Note: When the device is executing a program, the buttons may become invalid. It is best to press the buttons after the device has completed the program execution.**
1301
1302
1303 == 5.6 BLE connection ==
1304
1305
1306 WSC2-N supports BLE remote configure.
1307
1308 BLE can be used to configure the parameter of sensor or see the console output from sensor. BLE will be only activate on below case:
1309
1310 * Press button to send an uplink
1311 * Press button to active device.
1312 * Device Power on or reset.
1313
1314 If there is no activity connection on BLE in 60 seconds, sensor will shut down BLE module to enter low power mode.
1315
1316
1317 == 5.7 Pin Mapping ==
1318
1319
1320 [[image:image-20240412165523-2.png]]
1321
1322
1323 == 5.8 Mechanical ==
1324
1325
1326 Refer LSn50v2 enclosure drawing in:  [[https:~~/~~/www.dropbox.com/sh/0ir0l9jjmk6p95e/AADwWXorcKuNpPR5em7VgrEja?dl=0>>https://www.dropbox.com/sh/0ir0l9jjmk6p95e/AADwWXorcKuNpPR5em7VgrEja?dl=0]]
1327
1328
1329 = 6. OTA Firmware update =
1330
1331
1332 (% class="wikigeneratedid" %)
1333 **User can change firmware WSC2-N to:**
1334
1335 * Change Frequency band/ region.
1336 * Update with new features.
1337 * Fix bugs.
1338
1339 **Firmware and changelog can be downloaded from :** **[[Firmware download link>>https://www.dropbox.com/sh/8j3ioji411ni9gu/AADnOw3ErB1REsthKilfaq_Pa?dl=0]]**
1340
1341 **Methods to Update Firmware:**
1342
1343 * (Recommanded way) OTA firmware update via wireless: **[[http:~~/~~/wiki.dragino.com/xwiki/bin/view/Main/Firmware%20OTA%20Update%20for%20Sensors/>>url:http://wiki.dragino.com/xwiki/bin/view/Main/Firmware%20OTA%20Update%20for%20Sensors/]]**
1344
1345 * Update through UART TTL interface: **[[Instruction>>url:http://wiki.dragino.com/xwiki/bin/view/Main/UART%20Access%20for%20LoRa%20ST%20v4%20base%20model/#H1.LoRaSTv4baseHardware]]**.
1346
1347 = 7. FAQ =
1348
1349 == 7.1 What else do I need to purchase to build Weather Station? ==
1350
1351
1352 Below is the installation photo and structure:
1353
1354 [[image:image-20250115160005-3.png||height="464" width="1003"]]
1355
1356 == 7.2 Where can i find the modbus command for the WSS-09 sensor? ==
1357
1358 See this link for the [[modbus command set>>https://www.dropbox.com/scl/fo/ztlw35a9xbkomu71u31im/AOxW4xT4iXkfpDYN6Q-cUnM/NB-IoT/WSC2-N?dl=0&e=1&preview=Weather_Sensors_Modbus_Command_List.xlsx&rlkey=ojjcsw927eaow01dgooldq3nu&subfolder_nav_tracking=1]].
1359
1360
1361
1362 = 8. Trouble Shooting =
1363
1364 == 8.1 What should I do when the RS485 sensor cannot collect data? ==
1365
1366
1367 ~1. Recheck whether the sensor's power supply voltage is 12V at maximum.
1368
1369 2. Recheck whether the A and B signal lines of the sensor are connected reversely.
1370
1371 3. Check whether the sensor's transmission baud rate is 4800. If not, please change it to 4800 and try reading again.
1372
1373
1374 == 8.2 Why does the weather station make electric current sounds during operation? ==
1375
1376
1377 ~1. Because a certain amount of sound will be produced during long-term power supply operation. This is a normal phenomenon and does not affect use.
1378
1379
1380 == 8.3 How to solve the problem of temperature difference in weather stations? ==
1381
1382
1383 You can use AT+RSWRITE (downlink: E2 xx xx xx xx xx xx xx ) to modify the temperature compensation function in the weather station.
1384
1385 **For example:**
1386
1387 When the temperature of the weather station is 3°C different from the right value, you can use AT+RSWRITE=01 06 00 50 00 1E 09 D3 (downlink: E2 01 06 00 50 00 1E 09 D3) to modify the temperature compensation value of the weather station to +3°C .
1388
1389
1390 == 8.4 Why does the rain gauge have no data? ==
1391
1392 The default mode of the rain gauge is trigger mode.
1393 When it rains, it will trigger an uplink, and the data does not include rainfall data.
1394 If you want to query rainfall data, please change to counting mode
1395
1396 Feature: Users can set the trigger mode to counting mode or interrupt mode as needed.
1397
1398 (% style="color:#037691" %)**AT Command:**
1399
1400 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:433px" %)
1401 |=(% style="width: 157px;background-color:#4F81BD;color:white" %)**Command Example**|=(% style="width: 190px;background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 86px;background-color:#4F81BD;color:white" %)**Response**
1402 |(% style="width:157px" %)AT+COUNTMOD=0|(% style="width:188px" %)set to interrupt mode|(% style="width:85px" %)OK
1403 |(% style="width:157px" %)AT+COUNTMOD=1|(% style="width:188px" %)(((
1404 set to counting mode
1405 )))|(% style="width:85px" %)OK
1406
1407 (% style="color:#037691" %)**Downlink Command:**
1408
1409 Format: Command Code (0x10) followed by 1 bytes time value.
1410
1411 If the downlink payload=10 00, Set the trigger mode to interrupt mode, while type code is 10.
1412
1413 * Example 1: Downlink Payload: 10 00  ~/~/  Same as: AT+COUNTMOD=0  set to interrupt mode
1414
1415 = 9. Order Info =
1416
1417 Part Number: (% style="color:blue" %)**WSC2-N-XX  /  WSC2-NS-XX**
1418
1419 (% style="color:red" %)**XX**(%%):
1420
1421 * (% style="color:#037691" %)**GE**(%%): General version ( Exclude SIM card)
1422
1423 * (% style="color:#037691" %)**1T**(%%): with 1NCE * 10 years 500MB SIM card and Pre-configure to ThingsEye server
1424
1425 = 10. Support =
1426
1427 * 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.
1428
1429 * Provide as much information as possible regarding your enquiry (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]].
Copyright ©2010-2024 Dragino Technology Co., LTD. All rights reserved
Dragino Wiki v2.0