Wiki source code of CS01-CB/CS -- NB-IoT/LTE-M 4 Channels Current Sensor Converter User Manual
Version 208.3 by Mengting Qiu on 2025/01/14 14:36
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | (% style="display:none" %) (%%) (% style="display:none" %) (%%) | ||
2 | |||
3 | (% style="text-align:center" %) | ||
4 | [[image:image-20240128210544-1.png]] | ||
5 | |||
6 | |||
7 | |||
8 | |||
9 | |||
10 | |||
11 | |||
12 | **Table of Contents:** | ||
13 | |||
14 | {{toc/}} | ||
15 | |||
16 | |||
17 | |||
18 | |||
19 | |||
20 | |||
21 | = 1. Introduction = | ||
22 | |||
23 | == 1.1 What is NB-IoT 4 Channels Current Sensor Converter == | ||
24 | |||
25 | |||
26 | The Dragino CS01-CB/CS is a (% style="color:blue" %)**NB-IoT 4 Channels Current Sensor Converter**(%%). It can convert the reading from current sensors and and then upload to IoT server via NB-IoT network. | ||
27 | |||
28 | CS01-CB/CS can be used to (% style="color:blue" %)**monitor the machine running status**(%%) and (% style="color:blue" %)**analyze power consumption trends**. | ||
29 | |||
30 | The CS01-CB/CS supports maximum 4 current sensors. The current sensors are detachable and can be replaced with different scales. | ||
31 | |||
32 | CS01-CB/CS (% style="color:blue" %)**supports BLE configure**(%%) and (% style="color:blue" %)**OTA update**(%%) which make user easy to use. | ||
33 | |||
34 | CS01-CB/CS is powered by (% style="color:blue" %)**8500mAh Li-SOCI2 battery **(%%)or (% style="color:blue" %)**solar powered + Li-ion battery**(%%), it is designed for long-term use up to several years. | ||
35 | |||
36 | CS01-CB/CS has optional built-in SIM card and default IoT server connection version. Which makes it works with simple configuration. | ||
37 | |||
38 | |||
39 | == 1.2 Features == | ||
40 | |||
41 | |||
42 | * NB-IoT Bands: B1/B2/B3/B4/B5/B8/B12/B13/B17/B18/B19/B20/B25/B28/B66/B70/B85 @H-FDD | ||
43 | * Ultra-low power consumption | ||
44 | * Supports maximum 4 current sensors | ||
45 | * Support various current sensor Ratio: 50A, 100A etc. | ||
46 | * Monitor the machine running status | ||
47 | * Analyze power consumption trends | ||
48 | * Current Alarm | ||
49 | * Multiply Sampling and one uplink | ||
50 | * Support Bluetooth v5.1 remote configure and update firmware | ||
51 | * Uplink on periodically | ||
52 | * Downlink to change configure | ||
53 | * 8500mAh Li/SOCl2 Battery (CS01-CB) | ||
54 | * Solar panel + 3000mAh Li-ion battery (CS01-CS) | ||
55 | * Nano SIM card slot for NB-IoT SIM | ||
56 | |||
57 | == 1.3 Current Sensor Spec == | ||
58 | |||
59 | |||
60 | The current sensor list below is not ship with CS01-CB/CS, user need to order seperately: | ||
61 | |||
62 | (% border="1" cellspacing="3" style="width:510px" %) | ||
63 | |=(% style="width: 100px; background-color:#4F81BD;color:white" %)**Model**|=(% style="width: 100px; background-color:#4F81BD;color:white" %)**Photo**|=(% style="width: 170px; background-color: rgb(79, 129, 189); color: white;" %)**Specification**|=(% style="width: 140px; background-color: rgb(79, 129, 189); color: white;" %)Dimension(Unit:mm±0.5) | ||
64 | |(% style="width:131px" %)**SCT013G-D-100**|(% style="width:114px" %)((( | ||
65 | (% style="text-align:center" %) | ||
66 | [[image:image-20240831103534-4.jpeg||height="100" width="100"]] | ||
67 | )))|(% style="width:151px" %)* Split core current transformer | ||
68 | ~* Spec: 100A/50mA | ||
69 | ~* φ16mm Aperture|(% style="width:174px" %)((( | ||
70 | (% style="text-align:center" %) | ||
71 | [[image:image-20240831103305-3.png||height="99" width="120"]] | ||
72 | ))) | ||
73 | |**SCT024-300**|(%%)(% style="display:none" %) (%%)((( | ||
74 | (% style="text-align:center" %) | ||
75 | [[image:image-20240902155828-2.png||height="100" width="100"]] | ||
76 | )))|(% style="width:151px" %)* Split core current transformer | ||
77 | ~* Spec: 300A/50mA | ||
78 | ~* φ24mm Aperture|(% style="width:174px" %)((( | ||
79 | (% style="text-align:center" %) | ||
80 | [[image:image-20240831102534-1.png||height="73" width="120"]] | ||
81 | ))) | ||
82 | |**SCT036-600**|((( | ||
83 | (% style="text-align:center" %) | ||
84 | [[image:image-20240902155655-1.png||height="97" width="100"]] | ||
85 | |||
86 | (% style="display:none" %) | ||
87 | )))|(% style="width:151px" %)* Split core current transformer | ||
88 | ~* Spec: 600A/50mA | ||
89 | ~* φ36mm Aperture|(% style="width:174px" %)((( | ||
90 | (% style="text-align:center" %) | ||
91 | [[image:image-20240831102736-2.png||height="71" width="120"]] | ||
92 | ))) | ||
93 | |||
94 | == 1.4 Specification == | ||
95 | |||
96 | |||
97 | (% style="color:blue" %)**Common DC Characteristics:** | ||
98 | |||
99 | * Supply Voltage: Built-in Battery , 2.5v ~~ 3.6v | ||
100 | * Operating Temperature: -40 ~~ 85°C | ||
101 | |||
102 | (% style="color:blue" %)**NB-IoT Spec:** | ||
103 | |||
104 | (% style="color:#037691" %)**NB-IoT Module: BC660K-GL** | ||
105 | |||
106 | (% style="color:#037691" %)**Support Bands:** | ||
107 | |||
108 | * B1 @H-FDD: 2100MHz | ||
109 | * B2 @H-FDD: 1900MHz | ||
110 | * B3 @H-FDD: 1800MHz | ||
111 | * B4 @H-FDD: 2100MHz | ||
112 | * B5 @H-FDD: 860MHz | ||
113 | * B8 @H-FDD: 900MHz | ||
114 | * B12 @H-FDD: 720MHz | ||
115 | * B13 @H-FDD: 740MHz | ||
116 | * B17 @H-FDD: 730MHz | ||
117 | * B18 @H-FDD: 870MHz | ||
118 | * B19 @H-FDD: 870MHz | ||
119 | * B20 @H-FDD: 790MHz | ||
120 | * B25 @H-FDD: 1900MHz | ||
121 | * B28 @H-FDD: 750MHz | ||
122 | * B66 @H-FDD: 2000MHz | ||
123 | * B70 @H-FDD: 2000MHz | ||
124 | * B85 @H-FDD: 700MHz | ||
125 | |||
126 | (% style="color:blue" %)**Battery:** | ||
127 | |||
128 | * Li/SOCI2 un-chargeable battery | ||
129 | * Capacity: 8500mAh | ||
130 | * Self-Discharge: <1% / Year @ 25°C | ||
131 | * Max continuously current: 130mA | ||
132 | * Max boost current: 2A, 1 second | ||
133 | |||
134 | (% style="color:blue" %)**Power Consumption** | ||
135 | |||
136 | * STOP Mode: 10uA @ 3.3v | ||
137 | * Max transmit power: 350mA@3.3v | ||
138 | |||
139 | == 1.5 Applications == | ||
140 | |||
141 | * Smart Buildings & Home Automation | ||
142 | * Logistics and Supply Chain Management | ||
143 | * Smart Metering | ||
144 | * Smart Agriculture | ||
145 | * Smart Cities | ||
146 | * Smart Factory | ||
147 | |||
148 | == 1.6 Sleep mode and working mode == | ||
149 | |||
150 | |||
151 | (% 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. | ||
152 | |||
153 | (% 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. | ||
154 | |||
155 | |||
156 | == 1.7 Button & LEDs == | ||
157 | |||
158 | |||
159 | [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/RS485-LB_Waterproof_RS485UART_to_LoRaWAN_Converter/WebHome/image-20240103160425-4.png?rev=1.1||alt="image-20240103160425-4.png"]] | ||
160 | |||
161 | (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %) | ||
162 | |=(% 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** | ||
163 | |(% style="width:167px" %)Pressing ACT between 1s < time < 3s|(% style="width:117px" %)Send an uplink|(% style="width:225px" %)((( | ||
164 | If sensor has already attached to NB-IoT network, sensor will send an uplink packet, (% style="color:blue" %)**blue led**(%%) will blink once. | ||
165 | Meanwhile, BLE module will be active and user can connect via BLE to configure device. | ||
166 | ))) | ||
167 | |(% style="width:167px" %)Pressing ACT for more than 3s|(% style="width:117px" %)Active Device|(% style="width:225px" %)((( | ||
168 | (% 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. | ||
169 | (% style="color:green" %)**Green led**(%%) will solidly turn on for 5 seconds after joined in network. | ||
170 | 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. | ||
171 | ))) | ||
172 | |(% 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. | ||
173 | |||
174 | == 1.8 BLE connection == | ||
175 | |||
176 | |||
177 | CS01-CB/CS support BLE remote configure and firmware update. | ||
178 | |||
179 | 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: | ||
180 | |||
181 | * Press button to send an uplink | ||
182 | * Press button to active device. | ||
183 | * Device Power on or reset. | ||
184 | |||
185 | If there is no activity connection on BLE in 60 seconds, sensor will shut down BLE module to enter low power mode. | ||
186 | |||
187 | |||
188 | == 1.9 Pin Definitions , Switch & SIM Direction == | ||
189 | |||
190 | |||
191 | CS01-CB/CS use the mother board which as below. | ||
192 | |||
193 | [[image:image-20240731094359-1.png||height="426" width="749"]] | ||
194 | |||
195 | |||
196 | === 1.9.1 Jumper JP2 === | ||
197 | |||
198 | |||
199 | Power on Device when put this jumper. | ||
200 | |||
201 | Power off device when take out this jumper | ||
202 | |||
203 | |||
204 | === 1.9.2 BOOT MODE / SW1 === | ||
205 | |||
206 | |||
207 | **1)** (% style="color:blue" %)**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. | ||
208 | |||
209 | **2)** (% style="color:blue" %)**Flash:**(%%) work mode, device starts to work and send out console output for further debug. | ||
210 | |||
211 | |||
212 | === 1.9.3 Reset Button === | ||
213 | |||
214 | |||
215 | Press to reboot the device. | ||
216 | |||
217 | |||
218 | === 1.9.4 SIM Card Direction === | ||
219 | |||
220 | |||
221 | See this link. [[How to insert SIM Card>>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]]. | ||
222 | |||
223 | |||
224 | == 1.10 Mechanical == | ||
225 | |||
226 | |||
227 | === 1.10.1 for NB version === | ||
228 | |||
229 | [[image:Main.User Manual for LoRaWAN End Nodes.D20-LBD22-LBD23-LB_LoRaWAN_Temperature_Sensor_User_Manual.WebHome@1675143884058-338.png]] | ||
230 | |||
231 | [[image:Main.User Manual for LoRaWAN End Nodes.D20-LBD22-LBD23-LB_LoRaWAN_Temperature_Sensor_User_Manual.WebHome@1675143899218-599.png]] | ||
232 | |||
233 | [[image:Main.User Manual for LoRaWAN End Nodes.D20-LBD22-LBD23-LB_LoRaWAN_Temperature_Sensor_User_Manual.WebHome@1675143909447-639.png]] | ||
234 | |||
235 | |||
236 | **~ 100A:** | ||
237 | |||
238 | [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/CS01-NBNS_NB-IoT_4_Channels_Current_Sensor_Converter_User_Manual/WebHome/image-20240831103305-3.png?rev=1.1||alt="image-20240831103305-3.png" height="411" width="498"]] | ||
239 | |||
240 | |||
241 | **300A:** | ||
242 | |||
243 | [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/CS01-NBNS_NB-IoT_4_Channels_Current_Sensor_Converter_User_Manual/WebHome/image-20240831102534-1.png?rev=1.1||alt="image-20240831102534-1.png" height="365" width="599"]] | ||
244 | |||
245 | **600A:** | ||
246 | |||
247 | [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/CS01-NBNS_NB-IoT_4_Channels_Current_Sensor_Converter_User_Manual/WebHome/image-20240831102736-2.png?rev=1.1||alt="image-20240831102736-2.png" height="349" width="591"]] | ||
248 | |||
249 | |||
250 | === 1.10.2 for NS version === | ||
251 | |||
252 | [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/SN50v3-LB/WebHome/image-20231231203439-3.png?width=886&height=385&rev=1.1||alt="image-20231231203439-3.png"]] | ||
253 | |||
254 | |||
255 | = 2. Use CS01-CB/CS to communicate with IoT Server = | ||
256 | |||
257 | == 2.1 Send data to IoT server via NB-IoT network == | ||
258 | |||
259 | |||
260 | The CS01-CB/CS is equipped with a NB-IoT module, the pre-loaded firmware in CS01-CB/CS 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 CS01-CB/CS. | ||
261 | |||
262 | Below shows the network structure: | ||
263 | |||
264 | [[image:image-20240814164133-1.png||height="332" width="729"]] | ||
265 | |||
266 | There are two version: (% style="color:blue" %)**-GE**(%%) and (% style="color:blue" %)**-1T**(%%) version of CS01-CB. | ||
267 | |||
268 | (% 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 CS01-CB send data to IoT server. | ||
269 | |||
270 | * 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]]. | ||
271 | |||
272 | * 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]]. | ||
273 | |||
274 | Below shows result of different server as a glance. | ||
275 | |||
276 | (% border="1" cellspacing="3" style="width:515px" %) | ||
277 | |(% 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** | ||
278 | |(% 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" %)((( | ||
279 | [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/S31-NBS31B-NB_BN-IoT_Outdoor_Temperature_Humidity_Sensor_User_Manual/WebHome/image-20230819113244-8.png?width=367&height=183&rev=1.1||alt="image-20230819113244-8.png"]] | ||
280 | )))|(% style="width:170px" %) | ||
281 | |(% 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" %)((( | ||
282 | [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/S31-NBS31B-NB_BN-IoT_Outdoor_Temperature_Humidity_Sensor_User_Manual/WebHome/image-20230819113244-9.png?width=367&height=119&rev=1.1||alt="image-20230819113244-9.png"]] | ||
283 | )))|(% style="width:170px" %) | ||
284 | |(% 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" %) |(% style="width:170px" %) | ||
285 | |(% 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" %) | ||
286 | |(% 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" %) | ||
287 | |(% 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" %)((( | ||
288 | [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/S31-NBS31B-NB_BN-IoT_Outdoor_Temperature_Humidity_Sensor_User_Manual/WebHome/image-20230819113244-10.png?width=367&height=104&rev=1.1||alt="image-20230819113244-10.png"]] | ||
289 | )))|(% style="width:170px" %) | ||
290 | |(% 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" %)((( | ||
291 | [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/S31-NBS31B-NB_BN-IoT_Outdoor_Temperature_Humidity_Sensor_User_Manual/WebHome/image-20230819113244-11.png?width=367&height=141&rev=1.1||alt="image-20230819113244-11.png"]] | ||
292 | )))|(% style="width:170px" %) | ||
293 | |||
294 | (% 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 CS01-CB/CS 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/]]. | ||
295 | |||
296 | |||
297 | == 2.2 Payload Types == | ||
298 | |||
299 | |||
300 | To meet different server requirement, CS01-CB/CS supports different payload type. | ||
301 | |||
302 | **Includes:** | ||
303 | |||
304 | * [[General JSON format payload>>||anchor="H2.2.1GeneralJsonFormat28Type3D529"]]. (Type=5) | ||
305 | |||
306 | * [[HEX format Payload>>||anchor="H2.2.2HEXformatPayload28Type3D029"]]. (Type=0) | ||
307 | |||
308 | * [[ThingSpeak Format>>||anchor="H2.2.4ThingSpeakPayload28Type3D129"]]. (Type=1) | ||
309 | |||
310 | * [[ThingsBoard Format>>||anchor="H2.2.3ThingsBoardPayload28Type3D329"]]. (Type=3) | ||
311 | |||
312 | User can specify the payload type when choose the connection protocol. Example: | ||
313 | |||
314 | (% style="color:#037691" %)**AT+PRO=2,0** (%%) ~/~/ Use UDP Connection & hex Payload | ||
315 | |||
316 | (% style="color:#037691" %)**AT+PRO=2,5** (%%) ~/~/ Use UDP Connection & Json Payload | ||
317 | |||
318 | (% style="color:#037691" %)**AT+PRO=3,5 ** (%%) ~/~/ Use MQTT Connection & Json Payload | ||
319 | |||
320 | |||
321 | == 2.3 Working Mode & Uplink Payload == | ||
322 | |||
323 | === 2.3.1 Working Mode === | ||
324 | |||
325 | ==== 2.3.1.1 General acquisition mode (MOD~=1) ==== | ||
326 | |||
327 | |||
328 | MOD=1 is the default mode. End Node will uplink the real-time current sensor value in two case: | ||
329 | |||
330 | * Each TDC Interval. | ||
331 | * Trigger Alarm according to **AT+CALARM **configure. | ||
332 | |||
333 | ==== 2.3.1.2 Continuous Sampling Mode (MOD~=2) ==== | ||
334 | |||
335 | |||
336 | In Continuous Sampling Mode**(AT+MOD=2,aa,bb,cc)**, CS01 will record the current sensor data at a fix interval, and report multiply group of data together to IoT server later. | ||
337 | |||
338 | (% style="color:red" %)**Notice: This mode has high power consumption. External power supply might be needed. More detail please check power consumption section.** | ||
339 | |||
340 | |||
341 | **AT+MOD=2,aa,bb,cc format:** | ||
342 | |||
343 | * (% style="color:blue" %)**First Parameter set to 2**(%%)**:** Set CS01-CB/CS to work in Continuous Sampling Mode. | ||
344 | * (% style="color:blue" %)**aa** (%%): Set Sampling Interval, Unit: Second. | ||
345 | * (% style="color:blue" %)**bb** (%%): Define how many group of data will be uplink together. | ||
346 | * (% style="color:#0000ff" %)**cc : **(%%)Set whether 5V is normally open or not.(Normally open 5V will produce 16mA standby current) | ||
347 | |||
348 | When CS01-CB/CS is in Continuous Sampling Mode, the TDC time setting is disabled, and CS01-CB/CS will send uplink once it finished the number of sampling define in "bb". | ||
349 | |||
350 | |||
351 | **Example Command:(% style="color:blue" %)AT+MOD=2,60,5,0(%%)** | ||
352 | CS01-CB/CS will read 4 channels data every 1 minutes. When it reads 5 groups, CS01-CB/CS will send an uplink. So the uplink interval is 5 minutes. Each uplink will include 5 groups of sensor value. Each Group include 4 channels data. so the payload for each uplink will include: | ||
353 | |||
354 | * f+IMEI(8 bytes) + Version(2 bytes) + Battery (2 bytes) + Signal(1 byte) + GPIO_EXIT Level(1 byte) + GPIO_EXIT Flag(1 byte)+Timestamp(4 bytes) | ||
355 | * + Group1 Sensor Value (12 Bytes): **the last 4th** reading for Channel 1 + Channel 2 + Channel 3 + Channel 4 | ||
356 | * + Group2 Sensor Value (12 Bytes): **the last 3rd** reading for Channel 1 + Channel 2 + Channel 3 + Channel 4 | ||
357 | * + Group3 Sensor Value (12 Bytes): **the last 2nd** reading for Channel 1 + Channel 2 + Channel 3 + Channel 4 | ||
358 | * + Group4 Sensor Value (12 Bytes): **the last** reading for Channel 1 + Channel 2 + Channel 3 + Channel 4 | ||
359 | * + Group5 Sensor Value (12 Bytes): **current** reading for Channel 1 + Channel 2 + Channel 3 + Channel 4 | ||
360 | |||
361 | (% style="color:red" %)**Note: The maximum number of groups is set to 50, and it is recommended that the sampling interval be at least 5 seconds.** | ||
362 | |||
363 | |||
364 | === 2.3.2 HEX format Payload(Type~=0) === | ||
365 | |||
366 | ==== 2.3.2.1 MOD~=1 (General acquisition mode) ==== | ||
367 | |||
368 | |||
369 | (% style="color:#4472c4" %)**f863663062765285f460086859301439186e0cc91800000000326700328c0032a400000f6758f0fa00001200001300001400000f6758edf200001200001400001400000f6758ea6e00001200001300001300000f6758e6ea00001200001300001400000f6758e36600001200001300001300000f6758dfe200001200001300001400000f6758dc5e00001200001400001400000f6758d8da00001200001400001400000f6758d556** | ||
370 | |||
371 | [[image:image-20241217160618-1.png]] | ||
372 | |||
373 | If we use the MQTT client to subscribe to this MQTT topic, we can see the following information when the NB sensor uplink data. | ||
374 | |||
375 | [[image:image-20241217141107-2.png]] | ||
376 | |||
377 | (% style="color:blue" %)**Version:** | ||
378 | |||
379 | These bytes include the hardware and software version. | ||
380 | |||
381 | (% style="color:#037691" %)**Higher byte:**(%%) Specify Sensor Model: 0x18 for CS01-CB/CS | ||
382 | |||
383 | (% style="color:#037691" %)**Lower byte:**(%%) Specify the software version: 0x6e=110, means firmware version 1.1.0 | ||
384 | |||
385 | |||
386 | (% style="color:blue" %)**Battery Info:** | ||
387 | |||
388 | Check the battery voltage for CS01-CB/CS. | ||
389 | |||
390 | Ex1: 0x0B45&0x3FFF = 2885mV | ||
391 | |||
392 | Ex2: 0x0B49&0x3FFF = 2889mV | ||
393 | |||
394 | |||
395 | (% style="color:blue" %)**Signal Strength:** | ||
396 | |||
397 | NB-IoT Network signal Strength. | ||
398 | |||
399 | **Ex1: 0x16 = 22** | ||
400 | |||
401 | **0** -113dBm or less | ||
402 | |||
403 | **1** -111dBm | ||
404 | |||
405 | **2...30** -109dBm... -53dBm | ||
406 | |||
407 | **31** -51dBm or greater | ||
408 | |||
409 | **99** Not known or not detectable | ||
410 | |||
411 | |||
412 | (% style="color:blue" %)**GPIO_EXIT Level:** | ||
413 | |||
414 | GPIO_EXTI is used as Interrupt Pin. | ||
415 | |||
416 | **Example:** | ||
417 | |||
418 | 01 (H): GPIO_EXTI pin is high level. | ||
419 | |||
420 | 00 (L): GPIO_EXTI pin is low level. | ||
421 | |||
422 | Level of PA4 pin. (0: Low level 1: High level) | ||
423 | |||
424 | |||
425 | (% style="color:blue" %)**GPIO_EXIT Flag:** | ||
426 | |||
427 | This data field shows if this packet is generated by **Interrupt Pin** or not. | ||
428 | |||
429 | Note: The Interrupt Pin is a separate pin in the screw terminal. | ||
430 | |||
431 | **Example:** | ||
432 | |||
433 | 0x00: Normal uplink packet. | ||
434 | |||
435 | 0x01: Interrupt Uplink Packet. | ||
436 | |||
437 | |||
438 | (% style="color:blue" %)**Current_alarm:** | ||
439 | |||
440 | **Current_alarm** is a combination for Cur1L_status, Cur1H_status, Cur2L_status, Cur2H_status, Cur3L_status, Cur3H_status, Cur4L_status and Cur4H_status. | ||
441 | |||
442 | Totally 1bytes as below: | ||
443 | |||
444 | (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:480px" %) | ||
445 | |=(% style="width: 60px;background-color:#4F81BD;color:white" %)((( | ||
446 | **Bit7** | ||
447 | )))|=(% style="width: 60px;background-color:#4F81BD;color:white" %)Bit6|=(% style="width: 60px;background-color:#4F81BD;color:white" %)Bit5|=(% style="width: 60px; background-color: #4F81BD;color:white" %)Bit4|=(% style="width: 60px; background-color: #4F81BD;color:white" %)Bit3|=(% style="width: 60px; background-color: #4F81BD;color:white" %)Bit2|=(% style="width: 60px; background-color: #4F81BD;color:white" %)Bit1|=(% style="width: 60px; background-color: #4F81BD;color:white" %)Bit0 | ||
448 | |(% style="width:99px" %)((( | ||
449 | Cur1L | ||
450 | )))|(% style="width:69px" %)((( | ||
451 | Cur1H | ||
452 | )))|(% style="width:130px" %)((( | ||
453 | Cur2L | ||
454 | )))|(% style="width:194px" %)((( | ||
455 | Cur2H | ||
456 | )))|(% style="width:106px" %)((( | ||
457 | Cur3L | ||
458 | )))|(% style="width:97px" %)((( | ||
459 | Cur3H | ||
460 | )))|(% style="width:97px" %)((( | ||
461 | Cur4L | ||
462 | )))|(% style="width:97px" %)((( | ||
463 | Cur4H | ||
464 | ))) | ||
465 | |||
466 | **Cur1L_status:** | ||
467 | |||
468 | When setting the current threshold alarm of channel 1, this flag is True when it is lower than the set threshold, otherwise it is False. | ||
469 | |||
470 | **Cur1H_status:** | ||
471 | |||
472 | When setting the current threshold alarm of channel 1, this flag is True when it is higher than the set threshold, otherwise it is False. | ||
473 | |||
474 | **Cur2L_status:** | ||
475 | |||
476 | When setting the current threshold alarm of channel 2, this flag is True when it is lower than the set threshold, otherwise it is False. | ||
477 | |||
478 | **Cur2H_status:** | ||
479 | |||
480 | When setting the current threshold alarm of channel 2, this flag is True when it is higher than the set threshold, otherwise it is False. | ||
481 | |||
482 | **Cur3L_status:** | ||
483 | |||
484 | When setting the current threshold alarm of channel 3, this flag is True when it is lower than the set threshold, otherwise it is False. | ||
485 | |||
486 | **Cur3H_status:** | ||
487 | |||
488 | When setting the current threshold alarm of channel 3, this flag is True when it is higher than the set threshold, otherwise it is False. | ||
489 | |||
490 | **Cur4L_status:** | ||
491 | |||
492 | When setting the current threshold alarm of channel 4, this flag is True when it is lower than the set threshold, otherwise it is False. | ||
493 | |||
494 | **Cur4H_status:** | ||
495 | |||
496 | When setting the current threshold alarm of channel 4, this flag is True when it is higher than the set threshold, otherwise it is False. | ||
497 | |||
498 | |||
499 | (% class="wikigeneratedid" id="HCurrentchannel1:" %) | ||
500 | (% style="color:blue" %)**Current channel 1:** | ||
501 | |||
502 | Channel 1 for measuring AC current. Resolution 0.001A. | ||
503 | |||
504 | Ext: 0x002710 =10000/1000=10.000A | ||
505 | |||
506 | |||
507 | (% class="wikigeneratedid" id="HCurrentchannel2:" %) | ||
508 | (% style="color:blue" %)**Current channel 2:** | ||
509 | |||
510 | Channel 2 for measuring AC current. Resolution 0.001A. | ||
511 | |||
512 | Ext: 0x002904 =10500/1000=10.500A | ||
513 | |||
514 | |||
515 | (% class="wikigeneratedid" id="HCurrentchannel3:" %) | ||
516 | (% style="color:blue" %)**Current channel 3:** | ||
517 | |||
518 | Channel 3 for measuring AC current. Resolution 0.001A. | ||
519 | |||
520 | Ext: 0x002AF8 =11000/1000=11.000A | ||
521 | |||
522 | |||
523 | (% class="wikigeneratedid" id="HCurrentchannel4:" %) | ||
524 | (% style="color:blue" %)**Current channel 4:** | ||
525 | |||
526 | Channel 4 for measuring AC current. Resolution 0.001A. | ||
527 | |||
528 | Ext: 0x002EE0 =12000/1000=12.000A | ||
529 | |||
530 | |||
531 | (% style="color:blue" %)**TimeStamp: ** | ||
532 | |||
533 | Unit TimeStamp Example: 66a9edeb(H) = 1722412523(D) | ||
534 | |||
535 | Put the decimal value into this link(https://www.epochconverter.com/) to get the time. | ||
536 | |||
537 | |||
538 | ==== 2.3.2.2 MOD~=2 (Continuous Sampling Mode) ==== | ||
539 | |||
540 | |||
541 | (% style="color:red" %)**Notice: The payload is determined by the command setting:** | ||
542 | |||
543 | **Example: ** | ||
544 | |||
545 | (% style="color:blue" %)**AT+MOD=2,60,5,0**(%%) | ||
546 | CS01-CB/CS read 4 channels data every 1 minutes. When it reads 5 groups, CS01-CB/CS will send an uplink. So the uplink interval is 5 minutes. Each uplink will include 5 groups of sensor value. Each Group include 4 channels data. | ||
547 | |||
548 | (% style="color:#4472c4" %)**f863663062798815f460083513507309186e0df41a000067611e99002f9e002fa5002fd800000f002f93002fae002fdb00000f002f27002f37002f6600000f002f27002f34002f6a00000f002f0e002f1e002f5200000f** | ||
549 | |||
550 | [[image:image-20241217160636-2.png]] | ||
551 | |||
552 | If we use the MQTT client to subscribe to this MQTT topic, we can see the following information when the NB sensor uplink data. | ||
553 | |||
554 | |||
555 | [[image:image-20241217145924-7.png]] | ||
556 | |||
557 | === 2.3.3 General Json Format(Type~=5) === | ||
558 | |||
559 | ==== 2.3.3.1 MOD~=1 (General acquisition mode) ==== | ||
560 | |||
561 | |||
562 | (% style="color:#4472c4" %)**{"IMEI":"863663062765285","IMSI":"460086859301439","Model":"CS01-CB","current_alarm":"NNNN","current_chan1":13.013,"current_chan2":13.005,"current_chan3":13.019,"current_chan4":0.015,"battery":3.224,"signal":23,"time":"2024/12/11 01:48:57","1":[0.018,0.019,0.020,0.015,"2024/12/11 01:42:10"],"2":[0.018,0.020,0.020,0.015,"2024/12/11 01:27:10"],"3":[0.018,0.019,0.019,0.015,"2024/12/11 01:12:10"],"4":[0.018,0.019,0.020,0.015,"2024/12/11 00:57:10"],"5":[0.018,0.019,0.019,0.015,"2024/12/11 00:42:10"],"6":[0.018,0.019,0.020,0.015,"2024/12/11 00:27:10"],"7":[0.018,0.020,0.020,0.015,"2024/12/11 00:12:10"],"8":[0.018,0.020,0.020,0.015,"2024/12/10 23:57:10"]}** | ||
563 | |||
564 | If we use the MQTT client to subscribe to this MQTT topic, we can see the following information when the NB sensor uplink data. | ||
565 | |||
566 | [[image:image-20241217140904-1.png]] | ||
567 | |||
568 | (% style="color:red" %)**Notice, from above payload:** | ||
569 | |||
570 | * Current_alarm, Current_chan1, Current_chan2, Current_chan3, Current_chan4, Battery, Signal & time are the value at uplink time. | ||
571 | |||
572 | * Json entry 1 ~~ 8 are the last 1 ~~ 8 sampling data as specify by (% style="color:#037691" %)**AT+CLOCKLOG=1,65535,15,8 ** (%%)Command. Each entry includes (from left to right): Current_chan1, Current_chan2, Current_chan3, Current_chan4, Sampling time. | ||
573 | |||
574 | * For "Current_alarm" : NNNN, four characters indicate the alarm status of four channels. (% style="color:#037691" %)**N **(%%)indicates a non-alarm, (% style="color:#037691" %)**H**(%%) indicates a high-threshold alarm, and (% style="color:#037691" %)**L**(%%) indicates a low-threshold alarm. | ||
575 | |||
576 | ==== 2.3.3.2 MOD~=2 (Continuous Sampling Mode) ==== | ||
577 | |||
578 | |||
579 | (% style="color:red" %)**Notice: The payload is determined by the command setting:** | ||
580 | |||
581 | **Example: ** | ||
582 | |||
583 | (% style="color:blue" %)**AT+MOD=2,60,5,0**(%%) | ||
584 | CS01-CB/CS read 4 channels data every 1 minutes. When it reads 5 groups, CS01-CB/CS will send an uplink. So the uplink interval is 5 minutes. Each uplink will include 5 groups of sensor value. Each Group include 4 channels data. | ||
585 | |||
586 | (% style="color:#4472c4" %)**{"IMEI":"863663062798815","IMSI":"460083513507309","Model":"CS01-CB","battery":3.574,"signal":28,"time":"2024/12/17 06:40:34","Data":"(10.375,10.383,10.434,0.015)(10.403,10.418,10.459,0.015)(10.387,10.401,10.448,0.015)(5.187,5.195,5.219,0.015)(5.217,5.223,5.249,0.015)"}** | ||
587 | |||
588 | If we use the MQTT client to subscribe to this MQTT topic, we can see the following information when the NB sensor uplink data. | ||
589 | |||
590 | [[image:image-20241217144126-4.png]] | ||
591 | |||
592 | |||
593 | === 2.3.4 ThingsBoard Payload(Type~=3) (The format will be adjusted later) === | ||
594 | |||
595 | |||
596 | Type3 payload special design for ThingsBoard, it will also configure other default server to ThingsBoard. | ||
597 | |||
598 | |||
599 | ==== 2.3.4.1 MOD~=1 (General acquisition mode) ==== | ||
600 | |||
601 | |||
602 | (% style="color:#4472c4" %)**{ | ||
603 | "topic": "004_NB", | ||
604 | "payload": { | ||
605 | "IMEI": "863663062765285", | ||
606 | "IMSI": "460086859301439", | ||
607 | "Model": "CS01-CB", | ||
608 | "current_alarm": "NNNN", | ||
609 | "current_chan1": 12.684, | ||
610 | "current_chan2": 12.714, | ||
611 | "current_chan3": 12.741, | ||
612 | "current_chan4": 0.015, | ||
613 | "battery": 3.273, | ||
614 | "signal": 22, | ||
615 | "time": "2024/12/11 03:09:38", | ||
616 | "1": [12.79, 12.827, 12.861, 0.015, "2024/12/11 02:40:16"], | ||
617 | "2": [12.892, 12.929, 12.96, 0.014, "2024/12/11 02:25:16"], | ||
618 | "3": [12.977, 13.0, 13.023, 0.015, "2024/12/11 02:10:16"], | ||
619 | "4": [0.018, 0.019, 0.02, 0.015, "2024/12/11 01:42:10"], | ||
620 | "5": [0.018, 0.02, 0.02, 0.015, "2024/12/11 01:27:10"], | ||
621 | "6": [0.018, 0.019, 0.019, 0.015, "2024/12/11 01:12:10"], | ||
622 | "7": [0.018, 0.019, 0.02, 0.015, "2024/12/11 00:57:10"], | ||
623 | "8": [0.018, 0.019, 0.019, 0.015, "2024/12/11 00:42:10"] | ||
624 | } | ||
625 | }** | ||
626 | |||
627 | |||
628 | [[image:image-20241217141349-3.png||height="534" width="1182"]] | ||
629 | |||
630 | |||
631 | ==== 2.3.4.2 MOD~=2 (Continuous Sampling Mode) ==== | ||
632 | |||
633 | |||
634 | (% style="color:#4472c4" %)**{ | ||
635 | "topic": "004_NB", | ||
636 | "payload": { | ||
637 | "IMEI": "863663062798815", | ||
638 | "IMSI": "460083513507309", | ||
639 | "Model": "CS01-CB", | ||
640 | "battery": 3.569, | ||
641 | "signal": 27, | ||
642 | "time": "2024/12/17 06:57:00", | ||
643 | "Data": "(4.999,5.001,5.024,0.015)(4.999,5.013,5.035,0.015)(5.012,5.013,4.993,0.015)(9.068,9.089,9.146,0.015)(9.014,9.028,9.128,0.015)" | ||
644 | } | ||
645 | }** | ||
646 | |||
647 | [[image:image-20241217145845-6.png||height="641" width="1256"]] | ||
648 | |||
649 | |||
650 | === 2.3.5 ThingSpeak Payload(Type~=1) === | ||
651 | |||
652 | |||
653 | MOD=2 does not support ThingSpeak platform requirement, (% style="color:red" %)**only MOD=1.** | ||
654 | |||
655 | * **MOD=1 (General acquisition mode)** | ||
656 | |||
657 | This payload meets ThingSpeak platform requirement. It includes only six fields. Form 1~~6 are: | ||
658 | |||
659 | Current 1, Current 2, Current 3, Current 4, Battery, Signal. This payload type only valid for ThingSpeak Platform. | ||
660 | |||
661 | (% style="color:#4472c4" %)**field1=Current 1 value&field2=Current 2 value&field3=Current 3 value&field4=Current 4 value&field5=Battery value&field6=Signal value** | ||
662 | |||
663 | [[image:image-20240801152940-7.png]] | ||
664 | |||
665 | |||
666 | == 2.5 Payload Decoder file == | ||
667 | |||
668 | |||
669 | Example of CS01-CB/CS decoding in Datacake refer to the following links: | ||
670 | |||
671 | [[https:~~/~~/github.com/dragino/dragino-end-node-decoder/blob/main/Datacake-Dragino_NB>>https://github.com/dragino/dragino-end-node-decoder/blob/main/Datacake-Dragino_NB]] | ||
672 | |||
673 | |||
674 | == 2.6 Firmware Change Log == | ||
675 | |||
676 | |||
677 | Firmware download link:** **[[https:~~/~~/www.dropbox.com/scl/fo/cnnyz4ynebs3am96jvtv0/h?rlkey=4no594ssi0nzt2lc3irbkid9b&dl=0>>https://www.dropbox.com/scl/fo/cnnyz4ynebs3am96jvtv0/h?rlkey=4no594ssi0nzt2lc3irbkid9b&dl=0]] | ||
678 | |||
679 | |||
680 | = 3. Configure CS01-CB/CS = | ||
681 | |||
682 | == 3.1 Configure Methods == | ||
683 | |||
684 | |||
685 | CS01-CB/CS supports below configure method: | ||
686 | |||
687 | * AT Command via Bluetooth Connection (**Recommended**): [[BLE Configure Instruction>>url:http://wiki.dragino.com/xwiki/bin/view/Main/BLE%20Bluetooth%20Remote%20Configure/]]. | ||
688 | |||
689 | * AT Command via UART Connection : See [[UART Connection>>url:http://wiki.dragino.com/xwiki/bin/view/Main/UART%20Access%20for%20LoRa%20ST%20v4%20base%20model/#H2.3UARTConnectionforSN50v3basemotherboard]]. | ||
690 | |||
691 | == 3.2 Serial Access Password == | ||
692 | |||
693 | |||
694 | After the Bluetooth or UART connection is successful, use the Serial Access Password to enter the AT command window. | ||
695 | |||
696 | 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. | ||
697 | |||
698 | [[image:image-20240826164647-1.png]] | ||
699 | |||
700 | |||
701 | If you need to change the password, use **AT+PWORD=**xxxxxx (6 characters), NB nodes only support lowercase letters. | ||
702 | |||
703 | [[image:image-20240826164655-2.png]] | ||
704 | |||
705 | |||
706 | (% style="color:red" %)**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.** | ||
707 | |||
708 | [[image:image-20240826164700-3.png]] | ||
709 | |||
710 | |||
711 | == 3.3 AT Commands Set == | ||
712 | |||
713 | |||
714 | AT+<CMD>? : Help on <CMD> | ||
715 | |||
716 | AT+<CMD> : Run <CMD> | ||
717 | |||
718 | AT+<CMD>=<value> : Set the value | ||
719 | |||
720 | AT+<CMD>=? : Get the value | ||
721 | |||
722 | |||
723 | (% style="color:blue" %)**General**(%%) (% style="color:blue" %)**Commands** | ||
724 | |||
725 | AT : Attention | ||
726 | |||
727 | AT? : Short Help | ||
728 | |||
729 | AT+MODEL : Get module information | ||
730 | |||
731 | ATZ : Trig a reset of the MCU | ||
732 | |||
733 | AT+DEUI : Get or set the Device ID | ||
734 | |||
735 | AT+SLEEP : Get or set the sleep status | ||
736 | |||
737 | AT+DEBUG : Set more info output | ||
738 | |||
739 | AT+SERVADDR: Get or Set the Server address | ||
740 | |||
741 | AT+TDC : Get or set the application data transmission interval in s | ||
742 | |||
743 | AT+APN : Get or set the APN | ||
744 | |||
745 | AT+RXDL : Get or Set the receiving time | ||
746 | |||
747 | AT+GETSENSORVALUE : Returns the current sensor measurement | ||
748 | |||
749 | AT+DNSCFG : Get or Set DNS Server | ||
750 | |||
751 | AT+CSQTIME : Get or Set the time to join the network | ||
752 | |||
753 | AT+DNSTIMER : Get or Set the NDS timer | ||
754 | |||
755 | AT+TLSMOD : Get or Set the TLS mode | ||
756 | |||
757 | AT+MOD: Get or Set work mode | ||
758 | |||
759 | AT+ENCHANNEL: Get or set enable or disable of four channels | ||
760 | |||
761 | AT+CCAL: Get or set calibration value of current channel | ||
762 | |||
763 | AT+CALARM: Get or set current alarm threshold | ||
764 | |||
765 | AT+ATDC: Get or set the application minimum alarm interval in min | ||
766 | |||
767 | AT+PROPORTION: Set the current proportion parameter | ||
768 | |||
769 | AT+PRO : Get or Set usage agreement (1:COAP,2:UDP,3:MQTT,4:TCP) | ||
770 | |||
771 | AT+3V3T : Get or Set extend the time of 3V3 power | ||
772 | |||
773 | AT+INTMOD : Get or Set the trigger interrupt mode (0:input,1:falling or rising,2:falling,3:rising) | ||
774 | |||
775 | AT+CLOCKLOG: Enable or Disable Clock Logging | ||
776 | |||
777 | AT+GETLOG : Print serial port logs | ||
778 | |||
779 | AT+TIMESTAMP : Get or Set UNIX timestamp in second | ||
780 | |||
781 | AT+CFG : Print all settings | ||
782 | |||
783 | |||
784 | (% style="color:blue" %)**MQTT Management** | ||
785 | |||
786 | AT+CLIENT : Get or Set the MQTT clientID | ||
787 | |||
788 | AT+UNAME : Get or Set the MQTT Username | ||
789 | |||
790 | AT+PWD : Get or Set the MQTT password | ||
791 | |||
792 | AT+PUBTOPIC: Get or set MQTT publishing topic | ||
793 | |||
794 | AT+SUBTOPIC: Get or set MQTT subscription topic | ||
795 | |||
796 | AT+MQOS : Set the QoS level of MQTT | ||
797 | |||
798 | |||
799 | (% style="color:blue" %)**Coap Management** | ||
800 | |||
801 | AT+URI1: Get or set CoAP option 1 | ||
802 | |||
803 | AT+URI2: Get or set CoAP option 2 | ||
804 | |||
805 | AT+URI3: Get or set CoAP option 3 | ||
806 | |||
807 | AT+URI4: Get or set CoAP option 4 | ||
808 | |||
809 | |||
810 | (% style="color:blue" %)**Information ** | ||
811 | |||
812 | AT+PWORD : Get or set the System password | ||
813 | |||
814 | AT+FDR1 : Reset parameters to factory default values except for passwords | ||
815 | |||
816 | AT+FDR : Reset Parameters to Factory Default | ||
817 | |||
818 | AT+CDP : Read or Clear cached data | ||
819 | |||
820 | AT+LDATA : Get the last upload data | ||
821 | |||
822 | |||
823 | == 3.3 Commands special design for CS01-CB/CS == | ||
824 | |||
825 | |||
826 | These commands only valid for CS01-CB/CS, as below: | ||
827 | |||
828 | |||
829 | === 3.3.1 Set Transmit Interval Time === | ||
830 | |||
831 | |||
832 | Feature: Change NB-IoT End Node Transmit Interval. | ||
833 | |||
834 | (% style="color:blue" %)**AT Command: AT+TDC** | ||
835 | |||
836 | (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:510px" %) | ||
837 | |=(% style="width: 156px;background-color:#4F81BD;color:white" %)**Command Example**|=(% style="width: 137px;background-color:#4F81BD;color:white" %)**Function**|=(% style="background-color:#4F81BD;color:white" %)**Response** | ||
838 | |(% style="width:156px" %)AT+TDC=?|(% style="width:137px" %)Show current transmit Interval|((( | ||
839 | 1200 | ||
840 | OK | ||
841 | the interval is 1200ms = 20min | ||
842 | ))) | ||
843 | |(% style="width:156px" %)AT+TDC=7200|(% style="width:137px" %)Set Transmit Interval|((( | ||
844 | OK | ||
845 | Set transmit interval to 7200ms = 2 hours | ||
846 | ))) | ||
847 | |||
848 | (% style="color:blue" %)**Downlink Command: 0x01** | ||
849 | |||
850 | Format: Command Code (0x01) followed by 3 bytes time value. | ||
851 | |||
852 | If the downlink payload=010004B0, it means set the END Node's Transmit Interval to 0x0004B0=1200(S), while type code is 01. | ||
853 | |||
854 | * Example 1: Downlink Payload: 010004B0 ~/~/ Set Transmit Interval (TDC) =1200 seconds | ||
855 | * Example 2: Downlink Payload: 01001C20 ~/~/ Set Transmit Interval (TDC) =7200 seconds | ||
856 | |||
857 | === 3.3.2 Get Device Status === | ||
858 | |||
859 | |||
860 | Send downlink to ask device send Alarm settings. | ||
861 | |||
862 | (% style="color:blue" %)**Downlink Payload: **(%%)0x26 01 | ||
863 | |||
864 | Sensor will upload Device Status via FPORT=5. See payload section for detail. | ||
865 | |||
866 | |||
867 | === 3.3.3 Get data === | ||
868 | |||
869 | |||
870 | Feature: Get the current sensor data. | ||
871 | |||
872 | **AT Command:** | ||
873 | |||
874 | * **AT+GETSENSORVALUE=0** ~/~/ The serial port gets the reading of the current sensor | ||
875 | * **AT+GETSENSORVALUE=1** ~/~/ The serial port gets the current sensor reading and uploads it. | ||
876 | |||
877 | === 3.3.4 Set Interrupt Mode === | ||
878 | |||
879 | |||
880 | Feature, Set Interrupt mode for GPIO_EXTI of pin. | ||
881 | |||
882 | When AT+INTMOD=0 is set, GPIO_EXTI is used as a digital input port. | ||
883 | |||
884 | (% style="color:blue" %)**AT Command: AT+INTMOD** | ||
885 | |||
886 | (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:510px" %) | ||
887 | |=(% style="width: 155px;background-color:#4F81BD;color:white" %)**Command Example**|=(% style="width: 197px;background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 158px;background-color:#4F81BD;color:white" %)**Response** | ||
888 | |(% style="width:154px" %)AT+INTMOD=?|(% style="width:196px" %)Show current interrupt mode|(% style="width:157px" %)((( | ||
889 | 0 | ||
890 | OK | ||
891 | the mode is 0 =Disable Interrupt | ||
892 | ))) | ||
893 | |(% style="width:154px" %)AT+INTMOD=2|(% style="width:196px" %)((( | ||
894 | Set Transmit Interval | ||
895 | 0. (Disable Interrupt), | ||
896 | ~1. (Trigger by rising and falling edge) | ||
897 | 2. (Trigger by falling edge) | ||
898 | 3. (Trigger by rising edge) | ||
899 | )))|(% style="width:157px" %)OK | ||
900 | |||
901 | (% style="color:blue" %)**Downlink Command: 0x06** | ||
902 | |||
903 | Format: Command Code (0x06) followed by 3 bytes. | ||
904 | |||
905 | This means that the interrupt mode of the end node is set to 0x000003=3 (rising edge trigger), and the type code is 06. | ||
906 | |||
907 | * Example 1: Downlink Payload: 06000000 ~/~/ Turn off interrupt mode | ||
908 | * Example 2: Downlink Payload: 06000003 ~/~/ Set the interrupt mode to rising edge trigger | ||
909 | |||
910 | === 3.3.5 Set Power Output Duration === | ||
911 | |||
912 | |||
913 | Control the output duration 3.3V. Before each sampling, device will | ||
914 | |||
915 | ~1. first enable the power output to external sensor, | ||
916 | |||
917 | 2. keep it on as per duration, read sensor value and construct uplink payload | ||
918 | |||
919 | 3. final, close the power output. | ||
920 | |||
921 | (% style="color:blue" %)**AT Command: AT+3V3T** | ||
922 | |||
923 | (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:510px" %) | ||
924 | |=(% style="width: 155px;background-color:#4F81BD;color:white" %)**Command Example**|=(% style="width: 197px;background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 158px;background-color:#4F81BD;color:white" %)**Response** | ||
925 | |(% style="width:154px" %)AT+3V3T=?|(% style="width:196px" %)Show 3.3V open time.|(% style="width:157px" %)0 (default) | ||
926 | OK | ||
927 | |(% style="width:154px" %)AT+3V3T=1000|(% style="width:196px" %)Close after a delay of 1000 milliseconds.|(% style="width:157px" %)OK | ||
928 | |||
929 | (% style="color:blue" %)**Downlink Command: 0x07** | ||
930 | |||
931 | Format: Command Code (0x07) followed by 3 bytes. | ||
932 | |||
933 | The first byte is which power, the second and third bytes are the time to turn on. | ||
934 | |||
935 | * Example 1: Downlink Payload: 07 01 01 F4 **~-~-->** AT+3V3T=500 | ||
936 | * Example 2: Downlink Payload: 07 01 FF FF **~-~-->** AT+3V3T=65535 | ||
937 | |||
938 | === 3.3.6 Set working mode === | ||
939 | |||
940 | |||
941 | Feature, Get or Set working mode. | ||
942 | |||
943 | (% style="color:blue" %)**AT Command: AT+MOD** | ||
944 | |||
945 | (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %) | ||
946 | |=(% style="width: 155px;background-color:#4F81BD;color:white" %)**Command Example**|=(% style="width: 197px;background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 158px;background-color:#4F81BD;color:white" %)**Response** | ||
947 | |(% style="width:154px" %)AT+MOD=?|(% style="width:196px" %)Shows the current working mode|(% style="width:157px" %)1 (default) | ||
948 | OK | ||
949 | |(% style="width:154px" %)AT+MOD=2,60,5,0|(% style="width:196px" %)Set working mode 2|(% style="width:157px" %)OK | ||
950 | |||
951 | (% style="color:blue" %)**Description of AT instruction for setting working mode 2:** | ||
952 | |||
953 | (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %) | ||
954 | |=(% style="width: 155px; background-color:#4F81BD; color: white" %)**Command Example**|=(% style="width: 186.5px; background-color:#4F81BD; color: white" %)**Function**|=(% style="width: 168.5px; background-color:#4F81BD;color: white" %)Parameter | ||
955 | |(% colspan="1" style="width:158px" %)AT+MOD=1|(% style="width:185px" %)Set General acquisition mode.|(% style="width:165px" %)1:General acquisition mode. | ||
956 | |(% colspan="1" rowspan="5" style="width:158px" %)((( | ||
957 | |||
958 | |||
959 | |||
960 | |||
961 | AT+MOD=2,60,5,0 | ||
962 | )))|(% style="width:185px" %)The first parameter sets the continuous detection mode 2.|(% style="width:165px" %)2: Continuous acquisition mode. | ||
963 | |(% style="width:185px" %)The second parameter sets the detection sampling interval.|(% style="width:165px" %)((( | ||
964 | 60: Data were collected every 60 seconds. | ||
965 | |||
966 | (Min: 5s) | ||
967 | ))) | ||
968 | |(% style="width:185px" %)The third bit parameter sets the number of groups to record data.|(% style="width:165px" %)((( | ||
969 | After 5 groups of data are collected, the uplink is performed. | ||
970 | |||
971 | (Max: 50 groups) | ||
972 | ))) | ||
973 | |(% style="width:185px" %)The fourth parameter setting 5V normally open.|(% style="width:165px" %)((( | ||
974 | 0: Not set 5V normally open | ||
975 | |||
976 | 1: Setting 5V normally open(% style="color:red" %)**(High power consumption)** | ||
977 | ))) | ||
978 | |(% colspan="2" rowspan="1" style="width:185px" %)(% style="color:red" %)**Note: If the collection interval is very short, that is, a group of data needs to be collected in a few seconds, you are advised to set 5V on normally. The module startup time can be removed, but the power consumption is relatively high.** | ||
979 | |||
980 | (% style="color:blue" %)**Downlink Command: 0x0A** | ||
981 | |||
982 | Format: Command Code (0x0A) followed by 1 byte or 5 bytes. | ||
983 | |||
984 | * Example 1: Downlink Payload: 0A 01 **~-~-->** AT+MOD=1 | ||
985 | * Example 2: Downlink Payload: 0A 02 00 3C 05 00 **~-~-->** AT+MOD=2,60,5,0 | ||
986 | |||
987 | === 3.3.7 Set the alarm threshold === | ||
988 | |||
989 | |||
990 | Feature, Get or set current alarm threshold. (% style="color:red" %)**(Takes effect only when AT+MOD=1)** | ||
991 | |||
992 | (% style="color:red" %)**Note:The third, fifth, seventh and ninth parameter units of the v1.0 version are A, and the units of the third, fifth, seventh, and ninth parameters of versions after v1.1 are mA.** | ||
993 | |||
994 | |||
995 | (% style="color:blue" %)**AT Command: AT+CALARM** | ||
996 | |||
997 | (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %) | ||
998 | |=(% style="width: 200px; background-color: rgb(79, 129, 189); color: white;" %)**Command Example**|=(% style="width: 160px; background-color: rgb(79, 129, 189); color: white;" %)**Function**|=(% style="width: 150px; background-color: rgb(79, 129, 189); color: white;" %)**Response** | ||
999 | |(% style="width:283px" %)((( | ||
1000 | AT+CALARM=? | ||
1001 | )))|(% style="width:200px" %)Get current alarm threshold.|(% style="width:296px" %)((( | ||
1002 | 0,0,0,0,0,0,0,0,0(default) | ||
1003 | OK | ||
1004 | ))) | ||
1005 | |(% style="width:283px" %)((( | ||
1006 | AT+CALARM=1,1,20,1,20,0,0,0,0 | ||
1007 | (v1.0 version) | ||
1008 | )))|(% style="width:200px" %)When the current of channel 1 and channel 2 exceeds 20A, it will alarm and send a data packet.|(% style="width:296px" %)OK | ||
1009 | |||
1010 | (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %) | ||
1011 | |=(% style="width: 150px; background-color:#4F81BD; color: white" %)**Command Example**|=(% style="width: 180px; background-color:#4F81BD; color: white" %)**Function**|=(% style="width: 180px; background-color: rgb(79, 129, 189); color: white;" %)Parameter | ||
1012 | |(% colspan="1" rowspan="5" style="width:158px" %)((( | ||
1013 | AT+CALARM=1,1,10000,0,20000,0,0,0,0 | ||
1014 | (Versions after v1.1) | ||
1015 | )))|(% style="width:185px" %)The first parameter enables or disables the threshold alarm. |(% style="width:334px" %)0: Not Alarm | ||
1016 | 1: Alarm | ||
1017 | |(% style="width:185px" %)The second and third parameters set "current 1" below threshold alarm or above threshold alarm. |(% style="width:334px" %)((( | ||
1018 | 0,xx: Means if value <xx, Then Alarm | ||
1019 | 1,xx: Means if value >xx, Then Alarm | ||
1020 | |||
1021 | |||
1022 | **eg:**1,10000: if value >10000mA(10A), Then Alarm | ||
1023 | ))) | ||
1024 | |(% style="width:185px" %)The fourth and fifth parameters set "current 2" below the threshold alarm or above the threshold alarm. |(% style="width:334px" %)((( | ||
1025 | 0,xx: Means if value <xx, Then Alarm | ||
1026 | 1,xx: Means if value >xx, Then Alarm | ||
1027 | |||
1028 | |||
1029 | **eg:**0,20000: if value <20000mA(20A), Then Alarm | ||
1030 | ))) | ||
1031 | |(% style="width:185px" %)The sixth and seventh parameters set "current 3" below the threshold alarm or above the threshold alarm.|(% style="width:334px" %)((( | ||
1032 | 0,0: Means if value <xx, Then Alarm | ||
1033 | 0,0: Means if value >xx, Then Alarm | ||
1034 | |||
1035 | |||
1036 | **eg:**0,0: Disable this channel alarm | ||
1037 | ))) | ||
1038 | |(% style="width:185px" %)The eighth and ninth parameters set "current 4" below the threshold alarm or above the threshold alarm.|(% style="width:334px" %)((( | ||
1039 | 0,0: Means if value <xx, Then Alarm | ||
1040 | 0,0: Means if value >xx, Then Alarm | ||
1041 | |||
1042 | |||
1043 | **eg:**0,0: Disable this channel alarm | ||
1044 | ))) | ||
1045 | |||
1046 | (% style="color:blue" %)**Downlink Command: 0x0B** | ||
1047 | |||
1048 | Format: Command Code (0x0B) followed by 17 bytes. | ||
1049 | |||
1050 | * Example 1: Downlink Payload: 0B 01 01 00 27 10 00 00 4E 20 00 00 00 00 00 00 00 00 **~-~-->** AT+CALARM=1,1,10000,0,20000,0,0,0,0 =>1(01),1(01),10000(00 27 10),0(00),20000(00 4E 20),0(00),0(00 00 00),0(00),0(00 00 00) | ||
1051 | * Example 2: Downlink Payload: 0B 01 00 00 00 00 00 00 00 00 00 00 03 E8 01 00 07 D0 **~-~-->** AT+CALARM=1,0,0,0,0,0,1000,1,2000 =>1(01),0(00),0(00 00 00),0(00),0(00 00 00),0(00),1000(00 03 E8),1(01),2000(00 07 D0) | ||
1052 | * Example 3: Downlink Payload: 0B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 **~-~-->** AT+CALARM=0,0,0,0,0,0,0,0,0 =>0(00),0(00),0(00 00 00),0(00),0(00 00 00),0(00),0(00 00 00),0(00),0(00 00 00) | ||
1053 | |||
1054 | Format: The first byte(Command Code ) is 0x0B, the last byte is 0x01 or 0x02, and the middle 9 bytes. | ||
1055 | |||
1056 | When the last byte is 0x01, you can set the first, second, third, fourth and fifth parameters of the AT command. | ||
1057 | |||
1058 | * Example 1: Downlink Payload: 0B 01 01 00 27 10 00 00 4E 20 01**~-~-->** AT+CALARM=1,1,10000,0,20000,0,0,0,0 =>1(01),1(01),10000(00 27 10),0(00),20000(00 4E 20) | ||
1059 | |||
1060 | When the last byte is 0x02, you can set the first, sixth, seventh, eighth and ninth parameters of the AT command. | ||
1061 | |||
1062 | * Example 2: Downlink Payload: 0B 01 00 00 03 E8 01 00 07 D0 02**~-~-->** AT+CALARM=1,0,0,0,0,0,1000,1,2000 =>1(01),0(00),1000(00 03 E8),1(01),2000(00 07 D0) | ||
1063 | |||
1064 | Format: Command Code (0x0B) followed by 9 bytes. | ||
1065 | |||
1066 | * Example 1: Downlink Payload: 0B 01 01 14 01 14 00 00 00 00 **~-~-->** AT+CALARM=1,1,20,1,20,0,0,0,0 (v1.0 version) =>1(01),1(01),20(14),1(01),20(14),0(00),0(00),0(00),0(00) | ||
1067 | * Example 2: Downlink Payload: 0B 01 01 14 01 14 00 00 00 00 **~-~-->** AT+CALARM=1,1,20000,1,20000,0,0,0,0 (Versions after v1.1) =>1(01),1(01),20(14),1(01),20(14),0(00),0(00),0(00),0(00) | ||
1068 | * Example 3: Downlink Payload: 0B 00 00 00 00 00 00 00 00 00 **~-~-->** AT+CALARM=0,0,0,0,0,0,0,0,0 =>0(00),0(00),0(00),0(00),0(00),0(00),0(00),0(00),0(00) | ||
1069 | |||
1070 | === 3.3.8 Set Alarm Interval === | ||
1071 | |||
1072 | |||
1073 | The shortest time of two Alarm packet(unit: min). The default is 20 minutes. | ||
1074 | |||
1075 | * (% style="color:blue" %)**AT Command:** | ||
1076 | |||
1077 | (% style="color:#037691" %)**AT+ATDC=30** (%%) ~/~/ The shortest interval of two Alarm packets is 30 minutes, Means is there is an alarm packet uplink, there won't be another one in the next 30 minutes. | ||
1078 | |||
1079 | * (% style="color:blue" %)**Downlink Payload:** | ||
1080 | |||
1081 | (% style="color:#037691" %)**0x(0C 1E)**(%%) **~-~--> ** Set AT+ATDC=0x 1E = 30 minutes | ||
1082 | |||
1083 | |||
1084 | === 3.3.9 Set enable or disable of the measurement channel === | ||
1085 | |||
1086 | |||
1087 | This command can be used when user connects **less than four current sensors**. This command can turn off unused measurement channels to **save battery life**. | ||
1088 | |||
1089 | (% style="color:blue" %)**AT Command: AT+ENCHANNEL** | ||
1090 | |||
1091 | (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:500px" %) | ||
1092 | |=(% style="width: 185px; background-color: #4F81BD; color: white" %)**Command Example**|=(% style="width: 193px; background-color: #4F81BD; color: white" %)**Function**|=(% style="width: 122px; background-color: #4F81BD; color: white" %)**Response** | ||
1093 | |(% style="width:199px" %)AT+ENCHANNEL=?|(% style="width:199px" %)Get enabled channels.|(% style="width:150px" %)1,1,1,1 (default) | ||
1094 | OK | ||
1095 | |(% style="width:199px" %)AT+ENCHANNEL=1,1,1,0|(% style="width:199px" %)Channel 4 disabled.|(% style="width:150px" %)OK | ||
1096 | |(% style="width:199px" %)AT+ENCHANNEL=1,1,0,0|(% style="width:199px" %)Channel 3 and 4 disabled.|(% style="width:150px" %)OK | ||
1097 | |||
1098 | (% style="color:blue" %)**Downlink Command: 0x08** | ||
1099 | |||
1100 | Format: Command Code (0x08) followed by 4 bytes. | ||
1101 | |||
1102 | The first byte means the first channel, the second byte means the second channel, the third byte means the third channel, and the fourth byte means the fourth channel.And 1 means enable channel, 0 means disable channel. | ||
1103 | |||
1104 | * Example 1: Downlink Payload: 08 01 01 01 01 **~-~-->** AT+ENCHANNEL=1,1,1,1 ~/~/ All channels are enabled | ||
1105 | |||
1106 | * Example 2: Downlink Payload: 08 01 01 01 00 **~-~-->** AT+ENCHANNEL=1,1,1,0 ~/~/ Channel 4 disabled | ||
1107 | |||
1108 | * Example 3: Downlink Payload: 08 01 01 00 00 **~-~-->** AT+ENCHANNEL=1,1,0,0 ~/~/ Channel 3 and 4 disabled | ||
1109 | |||
1110 | === 3.3.10 Set the current proportion parameter === | ||
1111 | |||
1112 | |||
1113 | (% class="wikigeneratedid" %) | ||
1114 | This command sets the processing multiplier of the actual value to get the displayed value. | ||
1115 | |||
1116 | (% class="wikigeneratedid" %) | ||
1117 | The default current proportion parameter is 100, which means that the displayed value is equal to the actual value multiplied by 1. The value ranges from (% style="color:red" %)**0 to 65535 (cannot be set to 0)**(%%),if the value is 1000, the displayed value is 10 times the actual value. | ||
1118 | |||
1119 | (% class="wikigeneratedid" %) | ||
1120 | (% style="color:blue" %)**AT Command: AT+PROPORTION** | ||
1121 | |||
1122 | (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:500px" %) | ||
1123 | |=(% style="width: 185px; background-color: #4F81BD; color: white" %)**Command Example**|=(% style="width: 193px; background-color: #4F81BD; color: white" %)**Function**|=(% style="width: 122px; background-color: #4F81BD; color: white" %)**Response** | ||
1124 | |(% style="width:199px" %)((( | ||
1125 | AT+PROPORTION=? | ||
1126 | )))|(% style="width:199px" %)Get the current proportion parameter|(% style="width:150px" %)((( | ||
1127 | 100 (Default) | ||
1128 | OK | ||
1129 | ))) | ||
1130 | |(% style="width:199px" %)AT+PROPORTION=1|(% style="width:199px" %)Set the displayed value to 1/100 of the actual value|(% style="width:150px" %)OK | ||
1131 | |(% style="width:199px" %)AT+PROPORTION=200|(% style="width:199px" %)Setting the display value to 2 times the actual value|(% style="width:150px" %)OK | ||
1132 | |||
1133 | (% style="color:blue" %)**Downlink Command: 0x0D** | ||
1134 | |||
1135 | (% class="wikigeneratedid" %) | ||
1136 | Format: Command Code (0x0D) followed by 2 bytes. | ||
1137 | |||
1138 | * Example 1: Downlink Payload: 0D 00 64 **~-~-->** AT+PROPORTION=100 ~/~/ Set the displayed value to the actual value multiplied by 1. | ||
1139 | |||
1140 | * Example 2: Downlink Payload: 0D 01 F4 **~-~-->** AT+PROPORTION=500 ~/~/ Set the displayed value to the actual value multiplied by 5. | ||
1141 | |||
1142 | === 3.3.11 Set the downlink debugging mode(Since firmware v1.1.0) === | ||
1143 | |||
1144 | |||
1145 | Feature: Set the conversion between the standard version and 1T version downlinks. | ||
1146 | |||
1147 | (% style="color:blue" %)**AT command: AT+DOWNTE** | ||
1148 | |||
1149 | (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %) | ||
1150 | |=(% style="width: 134px; 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** | ||
1151 | |(% style="width:134px" %)AT+DOWNTE=?|(% style="width:143px" %)Get current Settings|(% style="width:229px" %)((( | ||
1152 | 0,0 (default) | ||
1153 | |||
1154 | OK | ||
1155 | ))) | ||
1156 | |(% colspan="1" rowspan="2" style="width:134px" %)((( | ||
1157 | |||
1158 | |||
1159 | |||
1160 | |||
1161 | AT+DOWNTE=a,b | ||
1162 | )))|(% style="width:143px" %)**a**: Set the conversion between the downlink of the standard version and 1T version|(% style="width:229px" %)((( | ||
1163 | **0**: Set the downlink of the standard version. | ||
1164 | **1**: Set the downlink of the 1T version(ThingsEye platform) | ||
1165 | ))) | ||
1166 | |(% style="width:143px" %)**b**: Enable/Disable downlink debugging|(% style="width:229px" %)((( | ||
1167 | **0**: Disable downlink debugging mode. | ||
1168 | **1**: Enable downlink debugging mode, users can see the original downlink reception. | ||
1169 | ))) | ||
1170 | |||
1171 | **Example:** | ||
1172 | |||
1173 | * AT+DOWNTE=0,1 ~/~/Set to standard version downlink, and enable downlink debugging. | ||
1174 | * AT+DOWNTE=1,1 ~/~/Set to 1T version downlink, and enable downlink debugging. | ||
1175 | |||
1176 | (% style="color:blue" %)**Downlink Command: ** | ||
1177 | |||
1178 | No downlink commands for feature | ||
1179 | |||
1180 | |||
1181 | === 3.3.12 Domain name resolution settings(Since firmware v1.1.0) === | ||
1182 | |||
1183 | |||
1184 | Feature: Set dynamic domain name resolution IP. | ||
1185 | |||
1186 | (% style="color:blue" %)**AT command: AT+BKDNS** | ||
1187 | |||
1188 | (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %) | ||
1189 | |=(% style="width: 134px; 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: 606px; background-color: rgb(79, 129, 189); color: white;" %)**Response/Explanation** | ||
1190 | |(% style="width:134px" %)((( | ||
1191 | AT+BKDNS=? | ||
1192 | )))|(% style="width:143px" %)Get current Settings|(% style="width:606px" %)((( | ||
1193 | 0,0,NULL (default) | ||
1194 | |||
1195 | OK | ||
1196 | ))) | ||
1197 | |(% colspan="1" rowspan="3" style="width:134px" %)((( | ||
1198 | |||
1199 | |||
1200 | |||
1201 | |||
1202 | |||
1203 | |||
1204 | |||
1205 | |||
1206 | |||
1207 | |||
1208 | |||
1209 | AT+BKDNS=a,b,c | ||
1210 | )))|(% style="width:143px" %)((( | ||
1211 | |||
1212 | |||
1213 | |||
1214 | |||
1215 | |||
1216 | **a**: Enable/Disable dynamic domain name resolution. | ||
1217 | )))|(% 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. | ||
1218 | **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. | ||
1219 | |(% style="width:143px" %)**b**: Set the time to update the domain name resolution at regular intervals.|(% style="width:606px" %)((( | ||
1220 | |||
1221 | |||
1222 | Unit: hour | ||
1223 | ))) | ||
1224 | |(% style="width:143px" %)((( | ||
1225 | |||
1226 | |||
1227 | |||
1228 | **c**: Set the IP address manually. | ||
1229 | )))|(% style="width:606px" %)((( | ||
1230 | The format is the same as AT+SERVADDR. | ||
1231 | |||
1232 | 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. | ||
1233 | ))) | ||
1234 | |||
1235 | **Example:** | ||
1236 | |||
1237 | * AT+BKDNS=1,0 ~/~/Dynamic domain name resolution is disabled. | ||
1238 | * AT+BKDNS=2,1 ~/~/The dynamic domain name resolution function is enabled and the automatic update time is set to 1 hour. | ||
1239 | * 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. | ||
1240 | |||
1241 | (% style="color:blue" %)**Downlink Command: ** | ||
1242 | |||
1243 | No downlink commands for feature | ||
1244 | |||
1245 | |||
1246 | |||
1247 | = 4. [[Use Case>>Main.User Manual for LoRaWAN End Nodes.CS01-LB_LoRaWAN_4_Channels_Current_Sensor_Converter_User_Manual.CS01_Use_Cases.WebHome]] = | ||
1248 | |||
1249 | == 4.1 Monitor the power status of office == | ||
1250 | |||
1251 | |||
1252 | [[image:image-20240505210624-1.png||height="234" width="697"]] | ||
1253 | |||
1254 | This is a case study for CS01-CB/CS current sensor. It shows how to use CS01 to monitor office power use status. | ||
1255 | |||
1256 | Click here for more: **[[Case 1: Monitor the power status of office>>Main.User Manual for LoRaWAN End Nodes.CS01-LB_LoRaWAN_4_Channels_Current_Sensor_Converter_User_Manual.CS01_Use_Cases.WebHome||anchor="HCase1:Monitorthepowerstatusofoffice"]]** | ||
1257 | |||
1258 | |||
1259 | == 4.2 Function setting power consumption calculation case == | ||
1260 | |||
1261 | |||
1262 | Set alarm for, when current = 0.1 send data | ||
1263 | Set alarm interval for 5 mins | ||
1264 | Set regular data interval for 6 hours or so Power outage alarm is the priority. | ||
1265 | Then switch OFF the connected load. | ||
1266 | Look for alarm message, as the current will drop to very minimum. | ||
1267 | Repeat LOAD OFF after 8 mins ( we have set alarm interval as 5 mins) and check for alarm message. | ||
1268 | When a scenario like 4 outages per day, then we should get 4 Alarm + 4 regular current messages (data frequency set to 6 hours), then how much will be the battery life. | ||
1269 | |||
1270 | |||
1271 | (% style="color:red" %)**The third, fifth, seventh and ninth parameter units of the v1.0 version are A, and the units of the third, fifth, seventh, and ninth parameters of versions after v1.1 are mA.** | ||
1272 | |||
1273 | (% style="color:red" %)**Below I set | ||
1274 | AT+CALARM=1,0,0,0,0,0,0,0,100 | ||
1275 | AT+ENCHANNEL=0,0,0,1** | ||
1276 | |||
1277 | [[image:image-20240723152145-3.png||height="61" width="568"]] | ||
1278 | |||
1279 | According to the settings, three aspects need to be calculated, as follows | ||
1280 | (1) The alarm interval is once every five minutes, 12 times per hour, a total of 288 times a day, one alarm is equivalent to one detection, and the consumption per detection is ≈0.0172mAh, so the daily consumption is calculated as follows | ||
1281 | 0.0172*288=4.9536mAh | ||
1282 | (2) The sleep current consumption per day is ≈0.0053268*24=0.1278432mAh | ||
1283 | (3) 4 alarms + 4 regular current messages, equivalent to sending 8 uplink messages a day, each upload will consume | ||
1284 | Single sensor: 0.076761064mAh | ||
1285 | Four sensors: 0.109365489mAh | ||
1286 | So | ||
1287 | Single sensor consumption per day: 0.076761064*8=0.614088512mAh | ||
1288 | Four sensors consumption per day: 0.109365489*8=0.874923912mAh | ||
1289 | The CS01-CB/CS battery capacity is 8500mAh. Calculated by the above data | ||
1290 | Single sensor: 8500/(4.9536+0.1278432+0.614088512)=1492 days | ||
1291 | Four sensors: 8500/(4.9536+0.1278432+0.874923912)=1427 days | ||
1292 | The above calculation is the approximate battery life. | ||
1293 | The battery life is also related to the frequency band and DR you use. See the figure below for details. | ||
1294 | |||
1295 | [[image:image-20240723152001-2.png]] | ||
1296 | |||
1297 | |||
1298 | = 5. Battery & Power Consumption = | ||
1299 | |||
1300 | |||
1301 | CS01-CB/CS use ER26500 + SPC1520 battery pack. See below link for detail information about the battery info and how to replace. | ||
1302 | |||
1303 | [[**Battery Info & Power Consumption Analyze**>>http://wiki.dragino.com/xwiki/bin/view/Main/How%20to%20calculate%20the%20battery%20life%20of%20Dragino%20sensors%3F/]] . | ||
1304 | |||
1305 | |||
1306 | (% style="color:red" %)**Notice: Continuous Sampling Mode will increase the power consumption a lot.** | ||
1307 | |||
1308 | (% style="color:blue" %)**For example, if use all four channels to sampling data:** | ||
1309 | |||
1310 | ~-~- Sample every minute and uplink data every 5 minutes. The battery life is about 10 monthes. | ||
1311 | ~-~- Sample every minute and uplink data every 20 minutes. The battery life is about 12 monthes. | ||
1312 | |||
1313 | If user want to use external DC Adapter, to power the CS01-CB/CS in this case, please refer [[Power Device use 3.3v Power Adapter>>http://wiki.dragino.com/xwiki/bin/view/Main/Can%20I%20use%20an%20external%20power%20adapter%20or%20solar%20panel%20to%20power%20LSN50v2%3F/#H1.1A0Poweritviaexternalpower283.3v29andnoneedbackupbattery]]. | ||
1314 | |||
1315 | |||
1316 | = 6. Firmware update = | ||
1317 | |||
1318 | |||
1319 | User can change device firmware to:: | ||
1320 | |||
1321 | * Update with new features. | ||
1322 | |||
1323 | * Fix bugs. | ||
1324 | |||
1325 | Firmware and changelog can be downloaded from : **[[Firmware download link>>url:https://www.dropbox.com/sh/fhb3uyl4gt6clru/AAAiZVTFcxrfE1JOOyfcgO9ha?dl=0]]** | ||
1326 | |||
1327 | Methods to Update Firmware: | ||
1328 | |||
1329 | * (Recommended way) OTA firmware update via BLE: [[**Instruction**>>url:http://wiki.dragino.com/xwiki/bin/view/Main/BLE_Firmware_Update_NB_Sensors_BC660K-GL/]]. | ||
1330 | |||
1331 | * Update through UART TTL interface : **[[Instruction>>url:http://wiki.dragino.com/xwiki/bin/view/Main/UART_Access_for_NB_ST_BC660K-GL/#H4.2UpdateFirmware28Assumethedevicealreadyhaveabootloader29]]**. | ||
1332 | |||
1333 | = 7. FAQ = | ||
1334 | |||
1335 | |||
1336 | |||
1337 | = 8. Troubleshooting = | ||
1338 | |||
1339 | == 8.1 Why are the collected current values inaccurate? == | ||
1340 | |||
1341 | |||
1342 | When the current value collected by the node is inaccurate, please check whether the calibration value is set by the AT+CCAL command in the node. If so, please change the calibration value to 0, that is: AT+CCAL=0,0,0,0. | ||
1343 | |||
1344 | |||
1345 | = 9. Order Info = | ||
1346 | |||
1347 | |||
1348 | **Part Number: (% style="color:blue" %)CS01-CB/CS(%%)** | ||
1349 | |||
1350 | (% style="color:red" %)**XX**(%%): | ||
1351 | |||
1352 | * (% style="color:#037691" %)**GE**(%%): General version ( Exclude SIM card) | ||
1353 | |||
1354 | * (% style="color:#037691" %)**1T**(%%): with 1NCE* 10 years 500MB SIM card and Pre-configure to ThingsEye server | ||
1355 | |||
1356 | (% style="color:red" %)**Notice: CS01-CB/CS doesn't include current sensor. User need to purchase seperately.** | ||
1357 | |||
1358 | **Reference Model for current sensor:** | ||
1359 | |||
1360 | * (% style="color:red" %)**SCT013G-D-100**(%%): **100A/50mA** | ||
1361 | * (% style="color:red" %)**SCT024-300**(%%): **300A/50mA** | ||
1362 | * (% style="color:red" %)**SCT036-600**(%%): **600A/50mA** | ||
1363 | |||
1364 | = 10. Packing Info = | ||
1365 | |||
1366 | |||
1367 | (% style="color:#037691" %)**Package Includes**: | ||
1368 | |||
1369 | * CS01-CB/CS NB-IoT 4 Channels Current Sensor Converter | ||
1370 | |||
1371 | (% style="color:#037691" %)**Dimension and weight**: | ||
1372 | |||
1373 | * Device Size: cm | ||
1374 | |||
1375 | * Device Weight: g | ||
1376 | |||
1377 | * Package Size / pcs : cm | ||
1378 | |||
1379 | * Weight / pcs : g | ||
1380 | |||
1381 | = 11. Support = | ||
1382 | |||
1383 | |||
1384 | * 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. | ||
1385 | |||
1386 | * 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.cc>>mailto:Support@dragino.cc]]. |