Last modified by Mengting Qiu on 2025/07/03 14:59

Show last authors
1 [[image:image-20240705094013-3.png||data-xwiki-image-style-alignment="center"]]
2
3
4
5
6
7 (% _mstvisible="1" %)
8 (% _msthash="315238" _msttexthash="18964465" _mstvisible="3" %)**Table of Contents:**
9
10 {{toc/}}
11
12
13
14
15
16
17
18
19 = 1.  Introduction =
20
21 == 1.1  What is the PB01 LoRaWAN Push Button? ==
22
23
24 The (% style="color:blue" %)**PB01 LoRaWAN Push Button**(%%) is a wireless LoRaWAN device equipped with (% style="color:blue" %)**a single push button**(%%). When the user presses the button, the PB01 sends an uplink to the LoRaWAN Network Server using the long-range LoRaWAN wireless protocol. Additionally, the PB01 measures (% style="color:blue" %)**environment temperature & humidity**(%%) and periodically uplinks this data to the LoRaWAN Network Server.
25
26 The PB01 is powered by (% style="color:blue" %)**2 x AAA batteries**(%%), allowing it to operate for several years.* Users can easily replace the batteries once they are drained.
27
28 The PB01 also features a built-in speaker that can produce different sounds when the button is pressed or when a reply (downlink) is received from the Network Server. The speaker can be disabled if the user prefers.
29
30 The PB01 is fully compatible with the LoRaWAN v1.0.3 protocol, and works seamlessly with standard LoRaWAN gateways.
31
32 ~* Battery life depends on the frequency of data transmission. Please refer to the [[battery analyzer>>||anchor="H4.2A0PowerConsumptionAnalyze"]] for details.
33
34
35 == 1.2  Features ==
36
37
38 * Wall-mountable
39 * LoRaWAN v1.0.3 protocol, Class A mode
40 * 1 x push button (available in different colors)
41 * Built-in temperature and humidity sensor
42 * Built-in speaker
43 * Frequency bands: CN470, EU433, KR920, US915, EU868, AS923, AU915
44 * AT commands for parameter changes
45 * Remote parameter configuration via LoRaWAN downlink
46 * Firmware upgradable via programming port
47 * Supports 2 x AAA LR03 batteries
48 * IP rating: IP52
49
50 == 1.3  Specification ==
51
52
53 (% style="color:blue" %)**Built-in Temperature Sensor:**
54
55 * **Resolution**: 0.01 °C
56 * **Accuracy Tolerance**: Typ ±0.2 °C
57 * **Long-Term Drift**: < 0.03 °C/year
58 * **Operating Range**: -10 ~~ 50 °C or -40 ~~ 60 °C (depends on battery type; see [[FAQ>>||anchor="H6.5Whyiseedifferentworkingtemperatureforthedevice3F"]])
59
60 (% style="color:blue" %)**Built-in Humidity Sensor:**
61
62 * **Resolution**: 0.01 %RH
63 * **Accuracy Tolerance**: Typ ±1.8 %RH
64 * **Long-Term Drift**: < 0.2 %RH/year
65 * **Operating Range**: 0 ~~ 99.0 %RH (no dew)
66
67 == 1.4  Power Consumption ==
68
69
70 PB01 : Idle: 5 uA, Transmit: max 110 mA
71
72
73 == 1.5  Storage & Operation Temperature ==
74
75
76 -10 ~~ 50 °C  or -40 ~~ 60 °C (depends on battery type; see [[FAQ>>||anchor="H6.5Whyiseedifferentworkingtemperatureforthedevice3F"]])
77
78
79 == 1.6  Applications ==
80
81
82 * Smart buildings & home automation
83 * Logistics & supply chain management
84 * Smart metering
85 * Smart agriculture
86 * Smart cities
87 * Smart factories
88
89 = 2.  Operation Mode =
90
91 == 2.1  How It Works? ==
92
93
94 Each PB01 is shipped with registration information that can be used to register and activate the device with a LoRaWAN Network Server using Over-The-Air Activation (OTAA), which is the most secure method for activating an end device on a LoRaWAN Network Server. It also supports Activation-By-Personalization (ABP), but this method is not recommended as it is less secure.
95
96 After registration, if the PB01 is within the LoRaWAN network's coverage area, it can join the network and start transmitting sensor data to the LoRaWAN Network Server. The default uplink interval is **20 minutes**.
97
98
99 == 2.2  How to turn on PB01? ==
100
101
102 (% style="color:red" %)** 1.  Open the enclosure from the bottom.**
103
104 [[image:image-20220621093835-1.png]]
105
106
107 (% style="color:red" %)** 2.  Insert 2 x AAA LR03 batteries to turn on the device.**
108
109 [[image:image-20220621093835-2.png]]
110
111
112 (% style="color:#ff0000" %)** 3. After **(% style="caret-color:#ff0000; color:#ff0000" %)**activating with a LoRaWAN network**(% style="color:#ff0000" %)**, you can re-join/restart the device by long pressing the ACT button as shown in the image below.**
113
114 [[image:image-20220621093835-3.png]]
115
116 You can check the [[LED Status>>||anchor="H2.8LEDIndicator"]] to determine the working state of the PB01.
117
118
119 == 2.3 Registering with a LoRaWAN network ==
120
121
122 This section explains how to register the PB01 with a LoRaWAN Network Server, such as The Things Stack Cloud. After registering, the PB01 can join the network once you long-press the ACT button.
123
124 (% class="wikigeneratedid" _mstvisible="1" %)
125 The following network diagram shows how the PB01 communicates with The Things Stack Cloud (similarly to other LoRaWAN Network Servers) end to end.
126
127
128 [[image:pb01-ttn.jpg]]
129
130
131 Each PB01 is shipped with its unique registration information printed on a sticker affixed inside the cardboard package that the device is packed in. The registration information includes the following:
132
133 * DevEUI
134 * AppEUI
135 * AppKey
136
137 This information is required to perform the OTAA (Over-the-Air Activation) of the device, which is the most secure way of activating the device with a LoRaWAN network server.
138
139 [[image:image-20230426083617-1.png||height="294" width="633"]]
140
141
142 === 2.3.1 Add PB01 to The Things Stack ===
143
144
145 PB01 currently supports only **manual **registartion with The Things Stack.
146
147
148 ==== 2.3.1.1 Creating an application ====
149
150
151 Sign up for a free account with [[The Things Stack Sandbox>>url:https://eu1.cloud.thethings.network/]] if you do not have one yet. Then, create an **application **as shown in the screenshots below.
152
153
154 ==== 2.3.1.2 Adding manually ====
155
156
157 You can refer to the screenshots below to register your PB01 using The Things Stack's manual registration option.
158
159 On The Things Stack console:
160
161 * Click **Applications**.
162 * Click <**your application**>. E.g. dragino-docs
163 * Click **End devices**.
164 * Click **+ Register end devic**e button.
165
166 [[image:5.png]]
167
168
169 * Select **Enter end device specifies manually** option.
170 * **Frequency plan**: Select the frequency plan that matches your device. E.g.: Europe 863-870 MHz (SF9 for RX2 - recommended).
171 * **LoRaWAN version**: LoRaWAN Specification 1.0.3
172 * Regional Parameters version: You can't change it and it will select automatically.
173
174 [[image:2.png]]
175
176
177 * **JoinEUI**: Enter the **AppEUI** of the device (see the registration information sticker) and Click the **Confirm** button.
178 * **DevEUI**: Enter the DevEUI of the device (see the registration information sticker).
179 * **AppKey**: Enter the AppKey of the device (see the registration information sticker).
180 * **End device ID**: Enter a name for your end device to uniquely identify it within this application.
181 * Click **View registered end device** option.
182 * Click **Register end device** button.
183
184 [[image:3.png]]
185
186
187 You will be navigated to the **Device overview **page.
188 (% style="display:none" %)
189
190
191 ==== 2.3.1.3 Activate the PB01 ====
192
193
194 Long press the **ACT** button to activate the PB01. It will then join The Things Stack. Once successfully connected, the device will begin uplinking sensor data to The Things Stack, which can be viewed on the **Live data** panel.
195
196 [[image:image-20240507143104-5.png||height="434" width="1398"]]
197
198
199 == 2.4  Uplink Payload ==
200
201
202 Uplink payloads include two types: Valid Sensor Value and other status / control command.
203
204 * Valid Sensor Value: Use FPORT=2
205 * Other control command: Use FPORT other than 2.
206
207 === 2.4.1  Uplink FPort~=5, Device Status ===
208
209
210 The 'Device Status' uplink is sent by the PB01 as its first uplink after successfully joining a LoRaWAN network. However, you can manually retrieve the device status as an uplink by sending a command as a downlink to the device. The format of the downlink command should be in hexadecimal.
211
212 (% style="color:#4472c4" %)**Downlink:  **(%%)**0x2601 **
213
214 The device uplinks its status via FPort=5, and the payload format is as follows:
215
216 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:370px" %)
217 |=(% style="width: 60px;background-color:#4F81BD;color:white" %)**Size(bytes)(% style="display:none" %) (%%)**|=(% style="width: 60px;background-color:#4F81BD;color:white" %)**1**|=(% style="width: 80px;background-color:#4F81BD;color:white" %)**2**|=(% style="width: 80px;background-color:#4F81BD;color:white" %)**1**|=(% style="width: 60px;background-color:#4F81BD;color:white" %)**1**|=(% style="width: 30px;background-color:#4F81BD;color:white" %)**2**
218 |(% style="width:99px" %)Value|(% style="width:62px" %)Sensor Model|(% style="width:80px" %)Firmware Version|(% style="width:82px" %)Frequency Band|(% style="width:85px" %)Sub-band|(% style="width:46px" %)BAT
219
220 The following figure shows the decoded device status payload as displayed on The Things Stack.
221
222 [[image:image-20240507152130-12.png||height="469" width="1366"]](% style="display:none" %)
223
224
225 For example, if the device status uplink includes the payload, [[image:image-20240507152254-13.png||height="26" width="130"]]
226
227
228 (% style="color:#4472c4" %)**Sensor model**(%%): 0x35 - for PB01, this value is 0x35.
229
230 (% style="color:#4472c4" %)**Firmware version**(%%): 0x0100 - value 0x0100 means v1.0.0.
231
232 (% style="color:#4472c4" %)**Frequency band**(%%): 01 - means EU868. The following are the possible values for other frequency bands.
233
234 *0x01: EU868
235
236 *0x02: US915
237
238 *0x03: IN865
239
240 *0x04: AU915
241
242 *0x05: KZ865
243
244 *0x06: RU864
245
246 *0x07: AS923
247
248 *0x08: AS923-1
249
250 *0x09: AS923-2
251
252 *0x0A: AS923-3
253
254 (% style="color:#4472c4" %)**Sub band**(%%): 0xFF - value 0x00 ~~ 0x08 (only for CN470, AU915, US915. Others are 0x00)
255
256 (% style="color:#4472c4" %)**BAT**(%%): 0x 0CDE - represents the battery voltage for PB01. The values 0x0CDE means 3294 mV = 3.294 V
257
258
259 === 2.4.2  Uplink FPort~=2, Real time sensor values ===
260
261
262 The PB01 sends real time sensor values after the Device Status uplink. The device will continue to send this uplink periodically. The default interval is 20 minutes, but it can be changed.
263
264 This type of uplink uses FPort=2 and, by default, is sent every 20 minutes. The default uplink interval [[can be changed>>||anchor="H3.1A0DownlinkCommandSet"]] using AT commands.
265
266 (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:460px" %)
267 |=(% style="width: 60px;background-color:#4F81BD;color:white" %)(((
268 **Size(bytes)**
269 )))|=(% style="width: 60px;background-color:#4F81BD;color:white" %)2|=(% style="width: 140px;background-color:#4F81BD;color:white" %)(((
270 **1**
271 )))|=(% style="width: 60px;background-color:#4F81BD;color:white" %)(((
272 **1**
273 )))|=(% style="width: 90px;background-color:#4F81BD;color:white" %)(((
274 **2**
275 )))|=(% style="width: 50px;background-color:#4F81BD;color:white" %)(((
276 **2**
277 )))
278 |(% style="width:97px" %)(((
279 Value
280 )))|(% style="width:39px" %)Battery|(% style="width:39px" %)(((
281 Sound_ACK & Sound_key
282 )))|(% style="width:100px" %)(((
283 (((
284 Alarm
285 )))
286 )))|(% style="width:77px" %)(((
287 (((
288 Temperature
289 )))
290 )))|(% style="width:47px" %)(((
291 Humidity
292 )))
293
294 The following figure shows the decoded real time sensor values payload as displayed on The Things Stack.
295
296 [[image:image-20240507150155-11.png||height="549" width="1261"]]
297
298
299 For example, if the real time sensor values uplink includes the payload (FPort=2):  (% style="background-color:yellow" %)**0C EA 03 01 01 11 02 A8**
300
301
302 ==== (% style="color:blue" %)**Battery:**(%%) ====
303
304 Byte 1 and 2: Check the battery voltage.
305
306 * Example 1: 0x0CEA = 3306mV
307 * Example 2: 0x0D08 = 3336mV
308
309 ==== (% style="color:blue" %)**Sound_ACK & Sound_key:**(%%) ====
310
311 Byte 3: Key sound and ACK sound are enabled by default.
312
313 * Example1: 0x03
314
315 Sound_ACK: (03>>1) & 0x01=1, OPEN.
316
317 **~ ** Sound_key:  03 & 0x01=1, OPEN.
318
319 * Example 2: 0x01
320
321 Sound_ACK: (01>>1) & 0x01=0, CLOSE.
322
323 **~ ** Sound_key:  01 & 0x01=1, OPEN.
324
325
326 ==== (% style="color:blue" %)**Alarm:**(%%) ====
327
328 Byte 4: Key alarm.
329
330 * Example 1: 0x01 & 0x01=1, TRUE.
331 * Example 2: 0x00 & 0x01=0, FALSE.
332
333 ==== (% style="color:blue" %)**Temperature:**(%%) ====
334
335 Byte 5 and 6: Temperature.
336
337 * Example 1: 0x0111/10=27.3°C
338 * Example 2: (0xFF0D-65536)/10=-24.3°C
339
340 If payload is: FF0D : (FF0D & 8000 == 1) , temp = (FF0D - 65536)/100 =-24.3°C
341
342 (FF0D & 8000 : Check whether the highest bit is 1. If the highest bit is 1, the value is negative)
343
344
345 ==== (% style="color:blue" %)**Humidity:**(%%) ====
346
347 Byte 7 and 8: Humidity
348
349 * Humidity: 0x02A8/10=68.0%
350
351 === 2.4.3  Uplink FPort~=3, Datalog sensor value ===
352
353
354 PB01 stores sensor values, and you can retrieve these historical values via a downlink command. The Datalog sensor values are sent via FPort=3.
355
356 [[image:image-20240510144912-1.png||height="471" width="1178"]](% style="display:none" %)
357
358
359 Each data entry is 11 bytes. To save airtime and battery, the maximum payload size is depending on the current Date Rate and the frequency band.(% style="display:none" %) (%%) For example, in US915 band, the maximum payload for different DR is as follows:
360
361 1. **DR0**: maximum payload is 11 bytes. The device will uplink one entry of data.
362 1. **DR1**: maximum payload is 53 bytes. The device will upload 4 entries of data (total of 44 bytes)
363 1. **DR2**: A payload includes 11 entries of data
364 1. **DR3**: A payload includes 22 entries of data.
365
366 (% style="color:red" %)**Note: The PB01 will save 178 sets of historical data. If the device doesn't have any data during the polling time, it will uplink 11 bytes of 0s.**
367
368 See [[Datalog feature>>||anchor="H2.6A0DatalogFeature"]] for more information.
369
370 (% style="display:none" %) (%%)
371
372 === 2.4.4  Decoding the payload in The Things Stack Cloud ===
373
374
375 In the LoRaWAN protocol, the uplink payload uses HEX format to store data. You need to add a payload formatter or decoder in the LoRaWAN server to extract each field and convert them into readable values.
376
377 The following figure shows how to add the uplink payload formatter in The Things Stack. The uplink decoder for PB01 can be found here:  [[https:~~/~~/github.com/dragino/dragino-end-node-decoder>>https://github.com/dragino/dragino-end-node-decoder]]
378
379 Select your **end device**, then click the **Payload Formatters **tab, followed by the **Uplink** tab. Next, select '**Custom Javascript Formatte**r' from the '**Formatter Type**' dropdown list. Finally, paste the payload formatter in the '**Formatter Code**' box and click the '**Save Changes**' button.
380
381 [[image:image-20240507162814-16.png||height="778" width="1135"]]
382
383
384 == 2.5 Show data on Datacake ==
385
386
387 (((
388 The Datacake IoT platform contains a user-friendly interface for displaying sensor data. Once sensor data is available in The Things Stack, Datacake can be used to connect to The Things Stack and visualize the data.
389 )))
390
391 (((
392 We assume that you have successfully registered and activated your PB01 with The Things Stack Cloud. To configure your application to forward data to Datacake, you will need to add an integration. Follow the steps below:
393 )))
394
395 (((
396
397
398 **Step 1:**
399
400 * Go to The Things Stack Cloud Console ~-~-> Applications ~-~-> <your application> ~-~-> Integrations ~-~-> Webhooks.
401 )))
402
403 (((
404 * On the **Choose webhook template** page, select **Datacake**.
405 * The **Setup webhook for Datacake** page appears. Do not close this window until you complete **Step 2**. You will need this page open to continue with **Step 3**.
406
407
408 )))
409
410 (((
411
412 )))
413
414 [[image:image-20240510150924-2.png||height="612" width="1186"]]
415
416
417 **Step 2:**
418
419 * Log in to your [[**Datacake**>>https://datacake.co]] account. In the left navigation, click on **Account Settings**. On the Account Settings page, in the **API Token** tab, copy the **API token** by clicking the **Copy** button.
420
421 [[image:image-20240510151944-3.png||height="581" width="1191"]]
422
423
424 **Step 3:**
425
426 * On the **Setup webhook for Datacake** page, in the **Webhook ID** textbox, type a name to identify your webhook.
427 * Paste the **Datacake API Token** you copied in the previous step into the **Token** textbox.
428 * Click the **Create Datacake webhook** button.
429
430 [[image:image-20240510152150-4.png||height="697" width="1188"]]
431
432
433 **Step 4:**
434
435 On the **Datacake** **Devices** page, select **+ Add Device** button.
436
437 [[image:image-20240510152300-5.png||height="298" width="1191"]]
438
439
440 **Step 5:**
441
442 In the **Add Device** window, select **LoRaWAN** as the connectivity type for the **PB01**
443
444 [[image:image-20240510152355-6.png||height="782" width="1193"]]
445
446
447 **Step 6:**
448
449 * On the **Add LoRaWAN Device** window, **STEP 1 - Product** tab:
450 ** Select the **New Product** option and then provide a **name** for your device in the **Product Name**, for example, **pb01-1**.
451 ** Click on the **Next** button.
452
453 [[image:image-20240510152542-8.png||height="545" width="739"]]
454
455
456 **Step 7:**
457
458 * On the **Add LoRaWAN Device** window, **STEP 2 - Network Server** tab:
459 ** Select **The Things Stack V3**.
460 ** Click on the **Next** button.
461
462 [[image:image-20240510152634-9.png||height="748" width="740"]]
463
464
465 **Step 8:**
466
467 * On the **Add LoRaWAN Device** window, **STEP 3 - Devices** tab:
468 ** Under **Add Devices**, select the **Manual **tab if it is not selected by default.
469 ** In the **DEVEUI** box, type the **DevEUI** of your PB01.
470 ** In the **NAME** textbox, provide a name for your PB01 to identify within Datacake.
471 ** Click on the **Next** button.
472
473 [[image:image-20240510152809-10.png||height="607" width="732"]]
474
475
476 **Step 9:**
477
478 * The PB01 is now successfully integrated with Datacake, and you will receive all PB01 uplinks from The Things Stack.
479 * Go to **Fleet ~-~-> PB01** and then select the **Debug** tab. You can see all the uplinks from your PB01.
480
481 [[image:image-20240510153934-14.png||height="460" width="1199"]]
482
483
484 **Step 10:**
485
486 * Go to the **Configuration** tab.
487
488 [[image:image-20240510153435-12.png||height="428" width="1197"]]
489
490
491 **Step 11:**
492
493 * Scroll down the page and locate the **Payload Decoder **section.
494 * Copy the payload decoder for The Things Stack from [[here>>https://github.com/dragino/dragino-end-node-decoder/blob/main/PB01/PB01_TTN_decoder.txt]] and paste it in the Payload Decoder box.
495
496 [[image:image-20240510153624-13.png||height="468" width="1195"]]
497
498
499 **Step 12:**
500
501 * With Datacake, you can build **dashboards** to visualize your data on various widgets. Please read the [[Datacake documentation>>https://docs.datacake.de]] for more information.
502
503 (% style="display:none" %) (%%)
504
505 == 2.6 Show data on ThingsEye.io ==
506
507
508 The Things Stack application supports integration with **ThingsEye.io**. Once integrated, ThingsEye.io acts as an MQTT client for The Things Stack MQTT broker, allowing it to subscribe to upstream traffic and publish downlink traffic.
509
510
511 === 2.6.1 Configuring The Things Stack ===
512
513 We use The Things Stack Sandbox in this example:
514
515 * In **The Things Stack Sandbox**, go to the **Application **of the PB01 you added.
516 * Select **MQTT** under **Integrations** in the left menu.
517 * In the **Connection information **section, under **Connection credentials**, The Things Stack displays an auto-generated **username**. You can use it or provide a new one.
518 * Click the **Generate new API key** button to generate a password. You can view it by clicking on the **visibility toggle/eye** icon. The API key works as the password.
519
520 {{info}}
521 The username and  password (API key) you created here are required in the next section.
522 {{/info}}
523
524 [[image:https://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LT-22222-L/WebHome/tts-mqtt-integration.png?rev=1.1||alt="tts-mqtt-integration.png"]]
525
526
527 === 2.6.2 Configuring ThingsEye.io ===
528
529
530 The ThingsEye.io IoT platform is not open for self-registration at the moment. If you are interested in testing the platform, please send your project information to [[admin@thingseye.io>>mailto:admin@thingseye.io]], and we will create an account for you.
531
532 * Login to your [[ThingsEye.io >>url:https://thingseye.io]]account.
533 * Under the **Integrations center**, click **Integrations**.
534 * Click the **Add integration** button (the button with the **+** symbol).
535
536 [[image:https://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LT-22222-L/WebHome/thingseye-io-step-1.png?rev=1.2||alt="thingseye-io-step-1.png"]]
537
538
539 On the **Add integration** window, configure the following:
540
541 **Basic settings:**
542
543 * Select **The Things Stack Community** from the **Integration type** list.
544 * Enter a suitable name for your integration in the **Name **text** **box or keep the default name.
545 * Ensure the following options are turned on.
546 ** Enable integration
547 ** Debug mode
548 ** Allow creating devices or assets
549 * Click the **Next** button. you will be navigated to the **Uplink data converter** tab.
550
551 [[image:https://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LT-22222-L/WebHome/thingseye-io-step-2.png?rev=1.1||alt="thingseye-io-step-2.png"]]
552
553
554 **Uplink data converter:**
555
556 * Click the **Create new** button if it is not selected by default.
557 * Enter a suitable name for the uplink data converter in the **Name **text** **box or keep the default name.
558 * Click the **JavaScript** button.
559 * Paste the uplink decoder function into the text area (first, delete the default code). The demo uplink decoder function can be found [[here>>url:https://raw.githubusercontent.com/ThingsEye-io/te-platform/refs/heads/main/Data%20Converters/The_Things_Network_MQTT_Uplink_Converter.js]].
560 * Click the **Next** button. You will be navigated to the **Downlink data converter **tab.
561
562 [[image:https://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LT-22222-L/WebHome/thingseye-io-step-3.png?rev=1.1||alt="thingseye-io-step-3.png"]]
563
564
565 **Downlink data converter (this is an optional step):**
566
567 * Click the **Create new** button if it is not selected by default.
568 * Enter a suitable name for the downlink data converter in the **Name **text** **box or keep the default name.
569 * Click the **JavaScript** button.
570 * Paste the downlink decoder function into the text area (first, delete the default code). The demo downlink decoder function can be found [[here>>url:https://raw.githubusercontent.com/ThingsEye-io/te-platform/refs/heads/main/Data%20Converters/The_Things_Network_MQTT_Downlink_Converter.js]].
571 * Click the **Next** button. You will be navigated to the **Connection** tab.
572
573 [[image:https://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LT-22222-L/WebHome/thingseye-io-step-4.png?rev=1.1||alt="thingseye-io-step-4.png"]]
574
575
576 **Connection:**
577
578 * Choose **Region** from the **Host type**.
579 * Enter the **cluster** of your **The Things Stack** in the **Region** textbox. You can find the cluster in the url (e.g., https:~/~/**eu1**.cloud.thethings.network/...).
580 * Enter the **Username** and **Password** of the MQTT integration in the **Credentials** section. The **username **and **password **can be found on the MQTT integration page of your The Things Stack account (See **2.5.1 Configuring The Things Stack**).
581 * Click the **Check connection** button to test the connection. If the connection is successful, you will see the message saying **Connected**.
582
583 [[image:https://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LT-22222-L/WebHome/message-1.png?rev=1.1||alt="message-1.png"]]
584
585
586 * Click the **Add** button.
587
588 [[image:https://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LT-22222-L/WebHome/thingseye-io-step-5.png?rev=1.1||alt="thingseye-io-step-5.png"]]
589
590
591 Your integration has been added to the** Integrations** list and will be displayed on the **Integrations** page. Check whether the status is shown as **Active**. If not, review your configuration settings and correct any errors.
592
593
594 [[image:https://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LT-22222-L/WebHome/thingseye.io_integrationsCenter_integrations.png?rev=1.2||alt="thingseye.io_integrationsCenter_integrations.png"]]
595
596
597 ==== 2.6.2.1 Viewing integration details ====
598
599
600 Click on your integration from the list. The **Integration details** window will appear with the **Details **tab selected. The **Details **tab shows all the settings you have provided for this integration.
601
602
603 [[image:https://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LT-22222-L/WebHome/integration-details.png?rev=1.1||alt="integration-details.png"]]
604
605
606 If you want to edit the settings you have provided, click on the **Toggle edit mode** button. Once you have done click on the **Apply changes **button.
607
608 {{info}}
609 See also [[ThingsEye documentation>>url:https://wiki.thingseye.io/xwiki/bin/view/Main/]].
610 {{/info}}
611
612 ==== 2.6.2.2 Viewing events ====
613
614
615 The **Events **tab displays all the uplink messages from the **PB01**.
616
617 * Select **Debug **from the **Event type** dropdown.
618 * Select the** time frame** from the **time window**.
619
620 [[image:https://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LT-22222-L/WebHome/thingseye-events.png?rev=1.1||alt="thingseye-events.png"]]
621
622
623 * To view the **JSON payload** of a message, click on the **three dots (...)** in the **Message** column of the desired message.
624
625 [[image:pb01-payload.png]]
626
627
628 ==== 2.6.2.3 Deleting an integration ====
629
630
631 If you want to delete an integration, click the **Delete integratio**n button on the Integrations page.
632
633
634 ==== 2.6.2.4 Viewing sensor data on a dashboard ====
635
636
637 You can create a dashboard with ThingsEye to visualize the sensor data coming from the PB01. The following image shows a dashboard created for the PB01. See **Creating a dashboard** in ThingsEye documentation for more information.
638
639
640 [[image:Screenshot 2025-01-11 at 21.15.59.png]]
641
642
643 == 2.7 Datalog Feature ==
644
645
646 Datalog Feature is to ensure IoT Server can get all sampling data from Sensor even if the LoRaWAN network is down. For each sampling, PB01 will store the reading for future retrieving purposes.
647
648
649 === 2.5.1 How datalog works ===
650
651
652 PB01 will wait for ACK for every uplink, when there is no LoRaWAN network,PB01 will mark these records with non-ack messages and store the sensor data, and it will send all messages (10s interval) after the network recovery.
653
654 * (((
655 a) PB01 will do an ACK check for data records sending to make sure every data arrive server.
656 )))
657 * (((
658 b) PB01 will send data in **CONFIRMED Mode**, but PB01 won't re-transmit the packet if it doesn't get ACK, it will just mark it as a NONE-ACK message. In a future uplink if PB01 gets a ACK, PB01 will consider there is a network connection and resend all NONE-ACK messages.
659
660
661 )))
662
663 === 2.5.2 Enable Datalog ===
664
665
666 User need to make sure below two settings are enable to use datalog;
667
668 * (% style="color:blue" %)**SYNCMOD=1(Default)**(%%) to enable sync time via LoRaWAN MAC command, click here ([[AT+SYNCMOD>>https://wiki.dragino.com/xwiki/bin/view/Main/End%20Device%20AT%20Commands%20and%20Downlink%20Command/#H4.6Settimesynchronizationmethod28ThenetworkservermustsupportLoRaWANv1.0.329]]) for detailed instructions.
669 * (% style="color:blue" %)**PNACKMD=1**(%%)** **to enable datalog feature, click here ([[AT+PNACKMD>>https://wiki.dragino.com/xwiki/bin/view/Main/End%20Device%20AT%20Commands%20and%20Downlink%20Command/#H7.26RequesttheservertosendanACK]]) for detailed instructions.
670
671
672
673 Once PB01 Joined LoRaWAN network, it will send the MAC command (DeviceTimeReq) and the server will reply with (DeviceTimeAns) to send the current time to PB01 . If PB01 fails to get the time from the server, PB01 will use the internal time and wait for next time request (AT+SYNCTDC to set the time request period, default is 10 days).
674
675 (% style="color:red" %)**Note: LoRaWAN Server need to support LoRaWAN v1.0.3(MAC v1.0.3) or higher to support this MAC command feature, Chirpstack,TTN V3 v3 and loriot support but TTN V3 v2 doesn't support. If server doesn't support this command, it will through away uplink packet with this command, so user will lose the packet with time request for TTN V3 v2 if SYNCMOD=1.**
676
677
678
679 === 2.7.1  Unix Timestamp ===
680
681
682 The Unix timestamp indicates the sampling time of the uplink payload, based on the following format:
683
684 [[image:image-20220523001219-11.png||_mstalt="450450" _mstvisible="3" height="97" width="627"]]
685
686 You can get this time from the link:  [[https:~~/~~/www.epochconverter.com/>>url:https://www.epochconverter.com/||_mstvisible="3"]] :
687
688 For example, if the Unix timestamp is in HEX format as 0x60137afd, you can convert it to decimal: 1611889405, and then convert it to the time: 2021-Jan-29, Friday, 03:03:25 (GMT).
689
690 [[image:1655782409139-256.png]]
691
692
693 === 2.7.2  Poll sensor value ===
694
695
696 (((
697 You can poll sensor values based on timestamps from the server. The start and end timestamps use the Unix timestamp format as mentioned above. The device will reply with all data logs from this time period, using the uplink interval.
698 )))
699
700 (((
701 For example, if the downlink command is: [[image:image-20220621113526-13.png]] (% _mstvisible="3" style="display:none" %)
702 )))
703
704 (((
705 **0x31 **: Prefix
706
707 **0x5FC5F350** and **0x5FC60160 **: This is equivalent to checking the stored data between **2020/12/1 07:40:00** and **2020/12/1 08:40:00**.
708
709 **0x05 **: The uplink interval is 5 seconds, which means the PB01 will send one packet every 5 seconds. The uplink interval can be mentioned in the downlink payload with a range of 5 to 255 seconds.
710 )))
711
712
713 === 2.7.3  Datalog Uplink payload ===
714
715
716 See [[Uplink FPort=3, Datalog sensor value>>||anchor="H2.4.3A0UplinkFPort3D32CDatalogsensorvalue"]]
717
718 (% style="display:none" %) (%%) (% style="display:none" %)
719
720 == 2.8 Buttons ==
721
722
723 * **ACT button**
724
725 Long press this button, and the PB01 will reset and rejoin the network.
726
727 [[image:image-20240510161626-17.png||height="192" width="224"]]
728
729
730 * **Alarm button**
731
732 Press this button to immediately send an uplink, and the alarm will be set to 'TRUE'.
733
734 [[image:image-20240705095149-5.png||height="164" width="162"]](% style="display:none" %)
735
736
737 == 2.9 LED Indicators ==
738
739
740 (((
741 The PB01 has a single LED that displays different colors to indicate various stages:
742
743 1. **Hold the ACT button:** The LED will light up GREEN. GREEN flashing indicates the node is restarting. A BLUE flash signals a request for network access, and a solid GREEN light for 5 seconds signifies successful network access.
744 1. (((
745 **Normal Working State:**
746
747 * When the node restarts, hold the ACT button, and the LED will turn GREEN. GREEN flashing indicates a restart. A BLUE flash signals a request for network access, and a solid GREEN light for 5 seconds indicates successful network access.
748 )))
749 1. (((
750 **During OTAA Join:**
751
752 * For each Join Request uplink, the LED will blink GREEN once.
753 * Once the join is successful, the LED will remain solid GREEN for 5 seconds.
754 * After joining, for each uplink, the LED will blink either BLUE or GREEN.
755 )))
756 1. (((
757 **Alarm Button:**
758
759 * When the alarm button is pressed, the LED will flash RED until the node receives an acknowledgment (ACK) from the platform, followed by the LED staying BLUE for 5 seconds.
760 )))
761 )))
762
763 (((
764
765 )))
766
767 == 2.10 Buzzer ==
768
769
770 The PB01 produces different sounds or tones for the following events, which can be turned on or off using the [[AT+SOUND>>||anchor="H3.3A0SetbuttonsoundandACKsound"]] command.
771
772 * **Button Sound:** This is the tone produced by the node after the alarm button is pressed. Users can use the [[AT+OPTION>>||anchor="H3.4A0Setbuzzermusictype2807E429"]] command to set different button sounds.
773 * **ACK Sound:** This is the notification tone emitted when the node receives an acknowledgment (ACK).
774
775 = 3.  Configure PB01 via AT command or LoRaWAN downlink =
776
777
778 You can configure PB01 via AT Commands or LoRaWAN Downlinks.
779
780 * See [[FAQ>>||anchor="H6.FAQ"]] to find out how to connect PB01 with a computer to configure it using AT commands.
781
782 * LoRaWAN Downlink instruction for different platforms can be found at: [[IoT LoRaWAN Server>>doc:Main.WebHome]]
783
784 (% style="display:none" %)
785
786 There are two types of commands to configure the PB01:
787
788 1. (((
789 **General Commands:**
790 These commands are used to configure:
791
792 * General system settings, such as the uplink interval.
793 * LoRaWAN protocol and radio-related parameters.
794
795 These commands are the same for all Dragino devices that support the DLWS-005 LoRaWAN stack (Note~*~*). You can find these commands on the wiki: [[End Device Downlink Command>>path:#]].
796 )))
797 1. **Commands Specifically Designed for PB01:**
798 These commands are valid only for the PB01, as listed below (see Downlink Commands):
799
800 == 3.1  Downlink Commands ==
801
802
803 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:510px" %)
804 |=(% style="width: 130px; background-color: rgb(79, 129, 189); color: white;" %)**Command Example**|=(% style="width: 150px; background-color: rgb(79, 129, 189); color: white;" %)**Function**|=(% style="width: 90px; background-color: rgb(79, 129, 189); color: white;" %)**Response**|=(% style="width: 140px; background-color: rgb(79, 129, 189); color: white;" %)**Downlink**
805 |(% style="width:130px" %)AT+TDC=?|(% style="width:151px" %)(((
806 Get the current TDC (uplink) time
807 )))|(% style="width:92px" %)(((
808 1200000
809 OK
810 )))|(% style="width:206px" %)Default 1200000(ms)
811 |(% style="width:130px" %)AT+TDC=300000|(% style="width:151px" %)Set the TDC (uplink) time|(% style="width:92px" %)OK|(% style="width:206px" %)(((
812 (((
813 0x0100012C:
814 01: Prefix
815 00012C: 0X00012C=300(seconds)
816 )))
817
818 (((
819
820 )))
821 )))
822 |(% style="width:130px" %)ATZ|(% style="width:151px" %)Reset the node|(% style="width:92px" %) |(% style="width:206px" %)0x04FF
823 |(% style="width:130px" %)AT+FDR|(% style="width:151px" %)Restore to factory settings|(% style="width:92px" %) |(% style="width:206px" %)0x04FE
824 |(% style="width:130px" %)AT+CFM=?|(% style="width:151px" %)View the current confirmation mode status|(% style="width:92px" %)(((
825 0,7,0
826 OK
827 )))|(% style="width:206px" %)Default 0,7,0
828 |(% style="width:130px" %)AT+CFM=1,7,1|(% style="width:151px" %)(((
829 Confirmed uplink mode, the maximum number of retries is seven, and uplink fcnt increase by 1 for each retry
830 )))|(% style="width:92px" %)(((
831 OK
832 )))|(% style="width:206px" %)(((
833 05010701
834 05: fixed command
835 01:confirmed uplink
836 07: retry 7 times
837 01: fcnt count plus 1
838 )))
839 |(% style="width:130px" %)AT+NJM=?|(% style="width:151px" %)(((
840 Check the current network connection method
841 )))|(% style="width:92px" %)(((
842 1
843 OK
844 )))|(% style="width:206px" %)Default 1
845 |(% style="width:130px" %)AT+NJM=0|(% style="width:151px" %)Change the network connection method to ABP|(% style="width:92px" %)(((
846 Attention:Take effect after ATZ
847 OK
848 )))|(% style="width:206px" %)(((
849 0x2000: ABP
850 0x2001: OTAA
851 20: fixed command
852 )))
853 |(% style="width:130px" %)AT+RPL=?|(% style="width:151px" %)View current RPL settings|(% style="width:92px" %)(((
854 0
855 OK
856 )))|(% style="width:206px" %)Default 0
857 |(% style="width:130px" %)AT+RPL=1|(% style="width:151px" %)Set RPL=1    |(% style="width:92px" %)OK|(% style="width:206px" %)(((
858 0x2101:
859 21: fixed command
860 01: for details, check wiki
861 )))
862 |(% style="width:130px" %)AT+ADR=?|(% style="width:151px" %)View current ADR status|(% style="width:92px" %)(((
863 1
864 OK
865 )))|(% style="width:206px" %)Default 0
866 |(% style="width:130px" %)AT+ADR=0|(% style="width:151px" %)Set the ADR state to off|(% style="width:92px" %)OK|(% style="width:206px" %)(((
867 0x2200: close
868 0x2201: open
869 22: fixed command
870 )))
871 |(% style="width:130px" %)AT+DR=?|(% style="width:151px" %)View the current DR settings|(% style="width:92px" %)OK|(% style="width:206px" %)
872 |(% style="width:130px" %)AT+DR=1|(% style="width:151px" %)(((
873 Set DR to 1.
874 It takes effect only when ADR=0
875 )))|(% style="width:92px" %)OK|(% style="width:206px" %)(((
876 0x22000101:
877 00: ADR=0
878 01: DR=1
879 01: TXP=1
880 22: fixed command
881 )))
882 |(% style="width:130px" %)AT+TXP=?|(% style="width:151px" %)View the current TXP|(% style="width:92px" %)OK|(% style="width:206px" %)
883 |(% style="width:130px" %)AT+TXP=1|(% style="width:151px" %)(((
884 Set TXP to 1.
885 It takes effect only when ADR=0
886 )))|(% style="width:92px" %)OK|(% style="width:206px" %)(((
887 0x22000101:
888 00: ADR=0
889 01: DR=1
890 01: TXP=1
891 22: fixed command
892 )))
893 |(% style="width:130px" %)AT+RJTDC=10|(% style="width:151px" %)Set RJTDC time interval|(% style="width:92px" %)OK|(% style="width:206px" %)(((
894 0x26000A:
895 26: fixed command
896 000A: 0X000A=10(min)
897 for details, check wiki
898 )))
899 |(% style="width:130px" %) |(% style="width:151px" %)(((
900 (((
901 ~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_~_
902
903 Retrieve stored data for a specified period of time
904 )))
905
906 (((
907
908 )))
909 )))|(% style="width:92px" %) |(% style="width:206px" %)(((
910 0x3161DE7C7061DE8A800A:
911 31: fixed command
912 61DE7C70:0X61DE7C70=2022/1/12 15:00:00
913 61DE8A80:0X61DE8A80=2022/1/12 16:00:00
914 0A: 0X0A=10(second)
915 View details 2.6.2
916 )))
917 |(% style="width:130px" %)AT+DDETECT=?|(% style="width:151px" %)View the current DDETECT setting status and time|(% style="width:92px" %)(((
918 1,1440,2880
919 OK
920 )))|(% style="width:206px" %)Default 1,1440,2880(min)
921 |(% style="width:130px" %)AT+DDETECT=(((
922 1,1440,2880
923 )))|(% style="width:151px" %)(((
924 Set DDETECT setting status and time
925 ((% style="color:red" %)When the node does not receive the downlink packet within the set time, it will re-enter the network(%%))
926 )))|(% style="width:92px" %)OK|(% style="width:206px" %)(((
927 0x320005A0: close
928 0x320105A0: open
929 32: fixed command
930 05A0: 0X05A0=1440(min)
931 )))
932
933 == 3.2  Set Password ==
934
935
936 **Feature**: Set the device password with a maximum of 9 digits.
937
938 (% style="color:#4f81bd" %)**AT command:**
939
940 (% border="2" style="width:500px" %)
941 |(% style="width:141px" %)**Command**|(% style="width:357px" %)**AT+PWORD**
942 |(% style="width:141px" %)**Parameters**|(% style="width:357px" %)**password** : maximum up to 9 digits
943 |(% style="width:141px" %)**Get**|(% style="width:357px" %)AT+PWORD=?
944 |(% style="width:141px" %)**Response**|(% style="width:357px" %)(((
945 Returns the current password
946 OK
947 )))
948 |(% style="width:141px" %)**Set**|(% style="width:357px" %)AT+PWORD=<password>
949 |(% style="width:141px" %)**Response**|(% style="width:357px" %)OK
950 |(% style="width:141px" %)**Example**|(% style="width:357px" %)(((
951 AT+PWORD=999999999
952 Set the password 999999999
953 )))
954
955 (% style="color:#4f81bd" %)**Downlink command:**
956
957 There is no downlink command for this feature.
958
959
960 == 3.3  Set button sound and ACK sound ==
961
962
963 **Feature**: Turn on/off button sound and ACK alarm.
964
965 (% style="color:#4f81bd" %)**AT command:**
966
967 (% border="2" style="width:500px" %)
968 |(% style="width:143px" %)**Command**|(% style="width:355px" %)**AT+SOUND**
969 |(% style="width:143px" %)**Parameters**|(% style="width:355px" %)(((
970 **button_sound** :
971 **0** - off
972 **1** - on
973 **ack_sound** :
974 **0** - off
975 **1** - on
976 )))
977 |(% style="width:143px" %)**Get**|(% style="width:355px" %)AT+SOUND=?
978 |(% style="width:143px" %)**Response**|(% style="width:355px" %)(((
979 Returns the current sound settings. <button_sound>,<ack_sound>
980 OK
981 )))
982 |(% style="width:143px" %)**Set**|(% style="width:355px" %)(((
983 AT+SOUND=<button_sound>,<ack_sound>
984 )))
985 |(% style="width:143px" %)**Response**|(% style="width:355px" %)OK
986 |(% style="width:143px" %)**Example**|(% style="width:355px" %)(((
987 AT+SOUND=0,1
988 This will turn off the button sound and turn on the ACK sound.
989 )))
990
991 (% style="color:#4f81bd" %)**Downlink command:**
992
993 (% border="2" style="width:500px" %)
994 |(% style="width:143px" %)**Prefix**|(% style="width:355px" %)**0xA1**
995 |(% style="width:143px" %)**Parameters**|(% style="width:355px" %)(((
996 **button_sound** : 1 byte in hexadecimal.
997 **00** - off
998 **01** - on
999 **ack_sound** : 1 byte in hexadecimal.
1000 **00** - off
1001 **01** - on
1002 )))
1003 |(% style="width:143px" %)**Payload format**|(% style="width:355px" %)<prefix><button_sound><ack_sound>
1004 |(% style="width:143px" %)**Example**|(% style="width:355px" %)(((
1005 A10001
1006 Turn off the button sound and turn on ACK sound.
1007 )))
1008
1009 == 3.4  Set buzzer music type (0~~4) ==
1010
1011
1012 Feature: Set different alarm key response sounds.There are five different types of button music.
1013
1014 (% style="color:#4f81bd" %)**AT Command:**
1015
1016 (% border="2" style="width:500px" %)
1017 |(% style="width:146px" %)**Command**|(% style="width:352px" %)**AT+OPTION**
1018 |(% style="width:146px" %)**Parameters**|(% style="width:352px" %)(((
1019 **<buzzer_music_type> :**
1020 **0**
1021 **1**
1022 **2**
1023 **3**
1024 **4**
1025 )))
1026 |(% style="width:146px" %)**Get**|(% style="width:352px" %)AT+OPTION=?
1027 |(% style="width:146px" %)**Response**|(% style="width:352px" %)(((
1028 Return the current music type.
1029 OK
1030 )))
1031 |(% style="width:146px" %)**Set**|(% style="width:352px" %)AT+OPTION=<buzzer_music_type>
1032 |(% style="width:146px" %)**Response**|(% style="width:352px" %)OK
1033 |(% style="width:146px" %)**Example**|(% style="width:352px" %)(((
1034 AT+OPTION=1
1035 Set the buzzer music to type 1
1036 )))
1037
1038 (% style="color:#4f81bd" %)**Downlink command:**
1039
1040 (% border="2" style="width:500px" %)
1041 |(% style="width:145px" %)**Prefix**|(% style="width:353px" %)**0xA3**
1042 |(% style="width:145px" %)**Parameters**|(% style="width:353px" %)(((
1043 **<buzzer_music_type> : **1 byte in hexadecimal
1044 **0**
1045 **1**
1046 **2**
1047 **3**
1048 )))
1049 |(% style="width:145px" %)**Payload format**|(% style="width:353px" %)<prefix><buzzer_music-type>
1050 |(% style="width:145px" %)**Example**|(% style="width:353px" %)(((
1051 A300
1052 Set the buzzer music to type 0.
1053 )))
1054
1055 == 3.5  Set Button Press Time ==
1056
1057
1058 **Feature**: Set the holding time for pressing the alarm button to prevent accidental activation. The values range from 0 to 1000 ms.
1059
1060 (% style="color:#4f81bd" %)**AT Command:**
1061
1062 (% border="2" style="width:500px" %)
1063 |(% style="width:145px" %)**Command**|(% style="width:353px" %)**AT+STIME**
1064 |(% style="width:145px" %)**Parameters**|(% style="width:353px" %)**button_press_duration** : in milliseconds
1065 |(% style="width:145px" %)**Get**|(% style="width:353px" %)AT+STIME=?
1066 |(% style="width:145px" %)**Response**|(% style="width:353px" %)Returns the current button press duration.
1067 |(% style="width:145px" %)**Set**|(% style="width:353px" %)(((
1068 AT+STIME=<button_press_duration>
1069 )))
1070 |(% style="width:145px" %)**Response**|(% style="width:353px" %)OK
1071 |(% style="width:145px" %)**Example**|(% style="width:353px" %)(((
1072 AT+STIME=1000
1073 Set the button sound duration to 1000 ms.
1074 )))
1075
1076 (% style="color:#4f81bd" %)**Downlink Command:**
1077
1078 (% border="2" style="width:500px" %)
1079 |(% style="width:146px" %)**Prefix**|(% style="width:352px" %)**0xA2**
1080 |(% style="width:146px" %)**Parameters**|(% style="width:352px" %)**button_press_duration** : in milliseconds, 2 bytes in hex
1081 |(% style="width:146px" %)**Payload format**|(% style="width:352px" %)<prefix><button_press_duration>
1082 |(% style="width:146px" %)**Example**|(% style="width:352px" %)(((
1083 A203E8
1084 Hold the alarm button for 10 seconds before the node sends the alarm uplink packet.
1085 )))
1086
1087 = 4.  Battery =
1088
1089
1090 PB01 uses 2xAAA LR03 (1.5V) batteries.
1091
1092
1093 == 4.1  Replacing batteries ==
1094
1095
1096 If the batteries are running low (if the battery voltage drops to 2.1V), you can use any two generic AAA batteries to replace them.
1097
1098 (% style="color:red" %)**Note: **
1099
1100 1. The PB01 doesn't have any screws; you can use a nail to open the battery cover.
1101
1102 [[image:image-20220621143535-5.png]]
1103
1104
1105 2. Make sure the direction is correct when installing the AAA batteries.
1106
1107 [[image:image-20220621143535-6.png]]
1108
1109
1110 == 4.2  Power Consumption Analysis ==
1111
1112
1113 Dragino's battery-powered products all operate in Low Power mode. We provide an updated battery calculator based on real device measurements. You can use this calculator to estimate battery life and calculate it for different transmission intervals.
1114
1115 **Instructions for use:**
1116
1117 **Step 1:** Download the latest version of the **DRAGINO_Battery_Life_Prediction_Table.xlsx** from the [[battery calculator>>https://www.dropbox.com/sh/sxrgszkac4ips0q/AAA4XjBI3HAHNpdbU3ALN1j0a/Battery%20Document/Battery_Analyze?dl=0&subfolder_nav_tracking=1]].
1118
1119 **Step 2:** Open the file and select:
1120
1121 * Product Model
1122 * Uplink Interval
1123 * Working Mode
1124
1125 The expected battery life for different scenarios will be displayed on the right.
1126
1127 [[image:image-20220621143643-7.png||height="429" width="1326"]]
1128
1129
1130 = 5.  Accessories =
1131
1132
1133 * (((
1134 **AS-02 USB Type-C Converter**
1135
1136 The AS-02 is an optional accessory. It is a USB Type-C converter that provides access to the AT console of the PB01 when used with a USB-TTL adapter. For more details, see this [[link>>||anchor="H6.1HowtouseATCommandtoconfigurePB01"]].
1137 )))
1138
1139 [[image:image-20220621141724-3.png]]
1140
1141
1142 = 6. FAQ =
1143
1144 == 6.1 How to use AT Commands to configure PB01 ==
1145
1146
1147 PB01 supports the AT Command set. Users can use a USB-to-TTL adapter along with the AS-02 USB Type-C converter to connect to the PB01 and issue AT commands, as shown below.
1148
1149 [[image:image-20240511085914-1.png||height="570" width="602"]]
1150
1151
1152 **Connection:**
1153
1154 * (% style="background-color:yellow" %)USB to TTL GND <~-~-> Program Converter GND pin
1155 * (% style="background-color:yellow" %)USB to TTL RXD  <~-~-> Program Converter D+ pin
1156 * (% style="background-color:yellow" %)USB to TTL TXD  <~-~-> Program Converter A11 pin
1157
1158 (((
1159
1160 )))
1161
1162 (((
1163 On the PC, you need to set the serial tool (such as [[PuTTY>>https://www.chiark.greenend.org.uk/~~sgtatham/putty/latest.html]], SecureCRT) baud rate to **9600** to access the serial console for the PB01. The AT commands are disabled by default, and you need to enter the password (default: **123456**) to activate them. The timeout for entering AT commands is 5 minutes; after 5 minutes, the user will need to enter the password again.
1164
1165 Enter the password 123456 and type "ATZ" to reboot the PB01, as shown below:
1166 )))
1167
1168 [[image:image-20240510174509-18.png||height="572" width="791"]]
1169
1170
1171 == 6.2  AT Commands ==
1172
1173
1174 (((
1175 * Sending "ATZ" will reboot the device.
1176 * Sending "AT+FDR" will restore the device to factory settings.
1177 * Get the device's AT command settings by sending "AT+CFG." The following is the output after issuing the AT+CFG command.
1178 )))
1179
1180 (((
1181
1182 )))
1183
1184 (((
1185 **Sample output:**                                           
1186 )))
1187
1188 (((
1189 AT+DEUI=FA 23 45 55 55 55 55 51
1190
1191 AT+APPEUI=FF AA 23 45 42 42 41 11
1192
1193 AT+APPKEY=AC D7 35 81 63 3C B6 05 F5 69 44 99 C1 12 BA 95
1194
1195 AT+DADDR=FFFFFFFF
1196
1197 AT+APPSKEY=FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
1198
1199 AT+NWKSKEY=FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
1200
1201 AT+ADR=1
1202
1203 AT+TXP=7
1204
1205 AT+DR=5
1206
1207 AT+DCS=0
1208
1209 AT+PNM=1
1210
1211 AT+RX2FQ=869525000
1212
1213 AT+RX2DR=0
1214
1215 AT+RX1DL=5000
1216
1217 AT+RX2DL=6000
1218
1219 AT+JN1DL=5000
1220
1221 AT+JN2DL=6000
1222
1223 AT+NJM=1
1224
1225 AT+NWKID=00 00 00 13
1226
1227 AT+FCU=61
1228
1229 AT+FCD=11
1230
1231 AT+CLASS=A
1232
1233 AT+NJS=1
1234
1235 AT+RECVB=0:
1236
1237 AT+RECV=
1238
1239 AT+VER=EU868 v1.0.0
1240
1241 AT+CFM=0,7,0
1242
1243 AT+SNR=0
1244
1245 AT+RSSI=0
1246
1247 AT+TDC=1200000
1248
1249 AT+PORT=2
1250
1251 AT+PWORD=123456
1252
1253 AT+CHS=0
1254
1255 AT+RX1WTO=24
1256
1257 AT+RX2WTO=6
1258
1259 AT+DECRYPT=0
1260
1261 AT+RJTDC=20
1262
1263 AT+RPL=0
1264
1265 AT+TIMESTAMP=systime= 2024/5/11 01:10:58 (1715389858)
1266
1267 AT+LEAPSEC=18
1268
1269 AT+SYNCMOD=1
1270
1271 AT+SYNCTDC=10
1272
1273 AT+SLEEP=0
1274
1275 AT+ATDC=1
1276
1277 AT+UUID=003C0C53013259E0
1278
1279 AT+DDETECT=1,1440,2880
1280
1281 AT+SETMAXNBTRANS=1,0
1282
1283 AT+DISFCNTCHECK=0
1284
1285 AT+DISMACANS=0
1286
1287 AT+PNACKMD=0
1288
1289 AT+SOUND=0,0
1290
1291 AT+STIME=0
1292
1293 AT+OPTION=3
1294
1295
1296 )))
1297
1298 (((
1299 **Example:**
1300 )))
1301
1302 [[image:image-20240511091518-2.png||height="601" width="836"]]
1303
1304
1305 == 6.3  How to update the firmware? ==
1306
1307
1308 PB01 requires a USB-to-TTL adapter along with the AS-02 USB Type-C converter to upload a new firmware image to PB01: Upgrading the device firmware,
1309
1310 * supports new features
1311 * fixes bugs
1312 * allows change the LoRaWAN frequency bands.
1313
1314 The PB01 is shipped with firmware preloaded. The firmware is divided into a bootloader and a work program.
1315
1316 If the bootloader is erased for any reason, you will need to download the firmware (which includes both the bootloader and the work program).
1317
1318 The latest firmware version for the PB01 can be downloaded from this link: [[firmware>>url:https://www.dropbox.com/scl/fo/y7pvm58wcr8319d5o4ujr/APZtqlbzRCNbHoPWTmmMMWs?rlkey=wfh93x2dhcev3ydn0846rinf0&st=kdp6lg7t&dl=0]]
1319
1320
1321 === 6.3.1 Update firmware (Assume device have bootloader) ===
1322
1323
1324 Follow the steps below only if the firmware needs to be updated and the bootloader of your device is already there, is not corrupted, and is working properly.
1325
1326 (% style="color:blue" %)**Step 1**(%%):** Connect UART as per FAQ 6.1**
1327
1328 (% style="color:blue" %)**Step 2**(%%):** Update follow [[Instruction for update via DraginoSensorManagerUtility.exe>>url:http://wiki.dragino.com/xwiki/bin/view/Main/UART%20Access%20for%20LoRa%20ST%20v4%20base%20model/#H3.2.1UpdateafirmwareviaDraginoSensorManagerUtility.exe]]. **
1329
1330
1331 === 6.3.2 Update firmware (Assume device doesn't have bootloader) ===
1332
1333
1334 This method is required if the bootloader of your device is corrupted, and the firmware needs to be updated along with the bootloader.
1335
1336 Download both the bootloader and the work program. After updating the firmware, the device will have the bootloader installed, allowing you to use the above 6.3.1 method to update the work program.
1337
1338
1339 (% style="color:blue" %)**Step 1**(%%):** Installing/downloading the required software**
1340
1341 * Install [[TremoProgrammer>>url:https://www.dropbox.com/scl/fo/gk1rb5pnnjw4kv5m5cs0z/h?rlkey=906ouvgbvif721f9bj795vfrh&dl=0]]
1342
1343 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LHT65N%20LoRaWAN%20Temperature%20%26%20Humidity%20Sensor%20Manual/WebHome/image-20220615170542-5.png?rev=1.1||alt="image-20220615170542-5.png"]]
1344
1345 * Download the **firmware** file from this [[location>>https://www.dropbox.com/scl/fo/y7pvm58wcr8319d5o4ujr/APZtqlbzRCNbHoPWTmmMMWs?rlkey=wfh93x2dhcev3ydn0846rinf0&st=kdp6lg7t&dl=0]].
1346 * Download the bootloader, **LoRa_OTA_Bootloder_v1.3.bin** from this [[location>>https://www.dropbox.com/sh/g4cp2lm85ovr8hu/AADX-4aEE-7SuKQAKTWrgKHIa?dl=0]].
1347
1348 (% style="color:blue" %)**Step 2**(%%):** Connecting the hardware together **
1349
1350 * Connect the PC to the PB01 via a USB-TTL adapter.
1351
1352 {{info}}
1353 **Note:** To download the firmware this way, you need to pull the boot pin (Program Converter D- pin) high to enter burn mode. After burning, disconnect the node's boot pin and the USB-TTL adapter's 3V3 pin, then reset the node to exit burn mode.
1354 {{/info}}
1355
1356 **Connection:**
1357
1358 * (% style="background-color:yellow" %)USB-TTL GND <~-~-> Program Converter GND pin
1359 * (% style="background-color:yellow" %)USB-TTL RXD  <~-~-> Program Converter D+ pin
1360 * (% style="background-color:yellow" %)USB-TTL TXD  <~-~-> Program Converter A11 pin
1361 * (% style="background-color:yellow" %)USB-TTL 3V3 <~-~-> Program Converter D- pin
1362
1363 (% style="color:blue" %)**Step 3**(%%):** Downloading firmware to the PB01**
1364
1365 * Configure the Serial Settings such as Port (COM port) and Baudrate (921600).
1366 * Under the **Download Files**, select the downloaded bootloader file and set the memory address to **0x08000000**. Then select the downloaded firmware file from your local drive, for example, eu868.bin. See the image below for more information.
1367 * Reset the PB01 to start downloading the program. This will switch the PB01 to program mode. To do that, you can follow one of the following methods.
1368 ** Reinstall the batteries to reset the PB01
1369 ** Hold down the ACT button to reset the node (See [[2.7>>http://wiki.dragino.com/xwiki/bin/view/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/PB01--LoRaWAN_Button_User_Manual/#H2.7Button]] ).
1370 * Click on the **Start** button to download the files into PB01.
1371
1372 [[image:image-20240701160913-1.png]]
1373
1374
1375 * The download progress is shown on the progress bar. Once completed, you will see the message '**Download files successfully**'.
1376
1377 [[image:image-20240701160924-2.png]]
1378
1379
1380 (% style="color:blue" %)**Step 4**(%%):** Completing the process**
1381
1382 Finally, disconnect the Program Converter D- pin, reset the node again, and the node will exit burn mode.
1383
1384
1385 == 6.4  How to change the LoRa Frequency Bands/Region? ==
1386
1387
1388 If you want to change the frequency band/region of your device, the only way is to** upgrade its firmware** to support the desired frequency band/region. When downloading the firmware, ensure you choose the correct image that supports the required frequency band/region.
1389
1390 We have named each firmware file to make it easy for you to identify its frequency band/region. For example, for the **EU868** band, the file name is **eu868.bin.** You can follow the instructions in the section [[How to update the firmware>>||anchor="H6.3A0Howtoupgradethefirmware3F"]] to complete the process.
1391
1392
1393 == 6.5 Why do I see a different working temperature for the device? ==
1394
1395
1396 The working temperature range of device depends on the battery the user chooses.
1397
1398 * A normal AAA battery can support a working range of -10 to 50°C.
1399 * A special AAA battery can support a working range of -40 to 60°C. For example, [[Energizer L92>>https://data.energizer.com/pdfs/l92.pdf]]
1400
1401 = 7. Ordering Information =
1402
1403 == 7.1 PB01 ==
1404
1405
1406 Part Number: (% style="color:#4472c4" %)PB01-LW-XX(%%) (white button) / (% style="color:#4472c4" %)PB01-LR-XX (%%)(Red Button)
1407
1408 (% style="color:#4472c4" %)**XX **(%%): The default frequency band
1409
1410 * (% style="color:red" %)**AS923**(%%)**: **LoRaWAN AS923 band
1411 * (% style="color:red" %)**AU915**(%%)**: **LoRaWAN AU915 band
1412 * (% style="color:red" %)**EU433**(%%)**: **LoRaWAN EU433 band
1413 * (% style="color:red" %)**EU868**(%%)**:** LoRaWAN EU868 band
1414 * (% style="color:red" %)**KR920**(%%)**: **LoRaWAN KR920 band
1415 * (% style="color:red" %)**US915**(%%)**: **LoRaWAN US915 band
1416 * (% style="color:red" %)**IN865**(%%)**:  **LoRaWAN IN865 band
1417 * (% style="color:red" %)**CN470**(%%)**: **LoRaWAN CN470 band
1418
1419 = 8. Packaging Information =
1420
1421
1422 **Package Includes**:
1423
1424 * PB01 LoRaWAN Push Button x 1
1425
1426 = 9. Support =
1427
1428
1429 * Support is provided Monday to Friday, from 09:00 to 18:00 GMT+8. Due to different time zones, we cannot offer live support. However, your questions will be answered as soon as possible within the aforementioned schedule.
1430 * Please provide as much information as possible regarding your inquiry (e.g., product models, an accurate description of your problem, and steps to replicate it) and send an email to [[support@dragino.com>>mailto:support@dragino.com]].
1431
1432 = 10.  Reference material =
1433
1434
1435 * [[Datasheets, photos, payload decoders, firmware>>https://www.dropbox.com/scl/fo/y7pvm58wcr8319d5o4ujr/APZtqlbzRCNbHoPWTmmMMWs?rlkey=wfh93x2dhcev3ydn0846rinf0&st=kdp6lg7t&dl=0]]
1436
1437 = 11. FCC Warning =
1438
1439
1440 **This device complies with Part 15 of the FCC Rules. Operation is subject to the following two conditions:**
1441
1442 (1) This device may not cause harmful interference;
1443 (2) This device must accept any interference received, including interference that may cause undesired operation.
1444
1445