Hide last authors
Xiaoling 67.2 1 (% style="text-align:center" %)
2 [[image:image-20230530181207-3.jpeg||height="552" width="552"]]
Edwin Chen 1.1 3
Xiaoling 67.2 4
5
6
7
8
Xiaoling 71.2 9 **Table of Contents :**
Ellie Zhang 30.1 10
Edwin Chen 1.1 11 {{toc/}}
12
13
14
15
16
17
kai 31.1 18 = 1. Introduction =
Edwin Chen 1.1 19
Xiaoling 67.9 20 == 1.1 What is LoRaWAN Soil pH Sensor ==
Edwin Chen 1.1 21
Xiaoling 39.6 22
Xiaoling 67.6 23 The Dragino SPH01-LB is a (% style="color:blue" %)**LoRaWAN Soil pH Sensor**(%%) for IoT of Agriculture. It is designed to measure the soil PH and soil temperature, so to send to the platform to analyze the soil acid or alkali level. The probe is IP68 waterproof.
Edwin Chen 1.1 24
Xiaoling 67.6 25 SPH01-LB probe is made by Solid AgCl reference electrode and Pure metal pH sensitive electrode. It can detect(% style="color:blue" %) **soil's pH **(%%)with high accuracy and stable value. The SPH01-LB probe can be buried into soil for long time use.
Edwin Chen 1.1 26
Xiaoling 67.6 27 The LoRa wireless technology used in SPH01-LB allows device to send data and reach extremely long ranges at low data-rates. It provides ultra-long range spread spectrum communication and high interference immunity whilst minimizing current consumption.
Edwin Chen 1.1 28
Xiaoling 67.6 29 SPH01-LB (% style="color:blue" %)**supports BLE configure**(%%) and (% style="color:blue" %)**wireless OTA update**(%%) which make user easy to use.
Edwin Chen 1.1 30
Xiaoling 67.6 31 SPH01-LB is powered by (% style="color:blue" %)**8500mAh Li-SOCI2 battery**(%%), it is designed for long term use up to 5 years.
Xiaoling 62.4 32
Xiaoling 67.6 33 Each SPH01-LB is pre-load with a set of unique keys for LoRaWAN registrations, register these keys to local LoRaWAN server and it will auto connect after power on.
Edwin Chen 1.1 34
35
Xiaoling 66.2 36 [[image:image-20230530180339-1.png||height="408" width="806"]]
Xiaoling 64.2 37
38
Edwin Chen 1.1 39 == 1.2 ​Features ==
40
Xiaoling 39.6 41
Edwin Chen 1.1 42 * LoRaWAN 1.0.3 Class A
Xiaoling 62.4 43 * Bands: CN470/EU433/KR920/US915/EU868/AS923/AU915/IN865
Edwin Chen 1.1 44 * Ultra-low power consumption
Xiaoling 67.6 45 * Monitor soil pH with temperature compensation.
46 * Monitor soil temperature
47 * Monitor Battery Level
48 * Support pH calibration by end user
Edwin Chen 1.1 49 * Support Bluetooth v5.1 and LoRaWAN remote configure
50 * Support wireless OTA update firmware
Xiaoling 67.6 51 * IP66 Waterproof Enclosure
52 * IP68 rate for the Sensor Probe
53 * AT Commands to change parameters
Edwin Chen 1.1 54 * Downlink to change configure
55 * 8500mAh Battery for long term use
56
Xiaoling 73.4 57
58
Edwin Chen 1.1 59 == 1.3 Specification ==
60
61
Xiaoling 67.7 62 (% style="color:blue" %)**Common DC Characteristics:**
Edwin Chen 1.1 63
64 * Supply Voltage: built in 8500mAh Li-SOCI2 battery , 2.5v ~~ 3.6v
65 * Operating Temperature: -40 ~~ 85°C
66
Xiaoling 67.7 67 (% style="color:blue" %)**Soil pH:**
Edwin Chen 1.1 68
Xiaoling 67.7 69 * Range: 3 ~~ 10 pH
70 * Resolution: 0.01 pH
71 * Accuracy: ±2% under (0~~50 ℃, Accuracy will poor under 0 due to frozen)
72 * Temperature Compensation Range: 0 ~~ 50℃
73 * IP68 Protection
74 * Length: 3.5 meters
75
76 (% style="color:blue" %)**Soil Temperature:**
77
78 * Range -40℃~85℃
79 * Resolution: 0.1℃
80 * Accuracy: <±0.5℃(-10℃~40℃),<±0.8℃ (others)
81 * IP68 Protection
82 * Length: 3.5 meters
83
84 (% style="color:blue" %)**LoRa Spec:**
85
Edwin Chen 1.1 86 * Frequency Range,  Band 1 (HF): 862 ~~ 1020 Mhz
87 * Max +22 dBm constant RF output vs.
88 * RX sensitivity: down to -139 dBm.
89 * Excellent blocking immunity
90
Xiaoling 67.7 91 (% style="color:blue" %)**Battery:**
Edwin Chen 1.1 92
93 * Li/SOCI2 un-chargeable battery
94 * Capacity: 8500mAh
95 * Self-Discharge: <1% / Year @ 25°C
96 * Max continuously current: 130mA
97 * Max boost current: 2A, 1 second
98
Xiaoling 67.7 99 (% style="color:blue" %)**Power Consumption**
Edwin Chen 1.1 100
101 * Sleep Mode: 5uA @ 3.3v
102 * LoRa Transmit Mode: 125mA @ 20dBm, 82mA @ 14dBm
103
Xiaoling 73.4 104
105
Xiaoling 62.4 106 == 1.4 Applications ==
Edwin Chen 1.1 107
Xiaoling 62.4 108
Xiaoling 67.8 109 * Smart Agriculture
Xiaoling 62.4 110
Xiaoling 73.4 111
112
Xiaoling 62.4 113 == 1.5 Sleep mode and working mode ==
114
115
Edwin Chen 1.1 116 (% style="color:blue" %)**Deep Sleep Mode: **(%%)Sensor doesn't have any LoRaWAN activate. This mode is used for storage and shipping to save battery life.
117
118 (% style="color:blue" %)**Working Mode:** (%%)In this mode, Sensor will work as LoRaWAN Sensor to Join LoRaWAN 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.
119
120
Xiaoling 62.9 121 == 1.6 Button & LEDs ==
Edwin Chen 1.1 122
123
Edwin Chen 6.1 124 [[image:Main.User Manual for LoRaWAN End Nodes.D20-LBD22-LBD23-LB_LoRaWAN_Temperature_Sensor_User_Manual.WebHome@1675071855856-879.png]]
Edwin Chen 1.1 125
126
Xiaoling 14.13 127 (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:510px" %)
Xiaoling 14.11 128 |=(% style="width: 167px;background-color:#D9E2F3;color:#0070C0" %)**Behavior on ACT**|=(% style="width: 117px;background-color:#D9E2F3;color:#0070C0" %)**Function**|=(% style="width: 225px;background-color:#D9E2F3;color:#0070C0" %)**Action**
Edwin Chen 1.1 129 |(% style="width:167px" %)Pressing ACT between 1s < time < 3s|(% style="width:117px" %)Send an uplink|(% style="width:225px" %)(((
130 If sensor is already Joined to LoRaWAN network, sensor will send an uplink packet, (% style="color:blue" %)**blue led** (%%)will blink once.
131 Meanwhile, BLE module will be active and user can connect via BLE to configure device.
132 )))
133 |(% style="width:167px" %)Pressing ACT for more than 3s|(% style="width:117px" %)Active Device|(% style="width:225px" %)(((
134 (% 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 JOIN LoRaWAN network.
135 (% style="color:green" %)**Green led**(%%) will solidly turn on for 5 seconds after joined in network.
136 Once sensor is active, BLE module will be active and user can connect via BLE to configure device, no matter if device join or not join LoRaWAN network.
137 )))
Edwin Chen 6.1 138 |(% 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.
Edwin Chen 1.1 139
Xiaoling 73.4 140
141
Xiaoling 62.9 142 == 1.7 BLE connection ==
Edwin Chen 1.1 143
144
Xiaoling 67.9 145 SPH01-LB support BLE remote configure.
Edwin Chen 1.1 146
147
148 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:
149
150 * Press button to send an uplink
151 * Press button to active device.
152 * Device Power on or reset.
153
154 If there is no activity connection on BLE in 60 seconds, sensor will shut down BLE module to enter low power mode.
155
156
Xiaoling 73.4 157 == 1.8 Mechanical ==
Edwin Chen 1.1 158
159
Edwin Chen 6.1 160 [[image:Main.User Manual for LoRaWAN End Nodes.D20-LBD22-LBD23-LB_LoRaWAN_Temperature_Sensor_User_Manual.WebHome@1675143884058-338.png]]
Edwin Chen 1.1 161
162
Edwin Chen 6.1 163 [[image:Main.User Manual for LoRaWAN End Nodes.D20-LBD22-LBD23-LB_LoRaWAN_Temperature_Sensor_User_Manual.WebHome@1675143899218-599.png]]
Edwin Chen 1.1 164
165
Edwin Chen 6.1 166 [[image:Main.User Manual for LoRaWAN End Nodes.D20-LBD22-LBD23-LB_LoRaWAN_Temperature_Sensor_User_Manual.WebHome@1675143909447-639.png]]
Edwin Chen 1.1 167
168
Xiaoling 67.23 169 = 2. Configure SPH01-LB to connect to LoRaWAN network =
Edwin Chen 1.1 170
171 == 2.1 How it works ==
172
173
Xiaoling 67.10 174 The SPH01-LB is configured as (% style="color:#037691" %)**LoRaWAN OTAA Class A**(%%) mode by default. It has OTAA keys to join LoRaWAN network. To connect a local LoRaWAN network, you need to input the OTAA keys in the LoRaWAN IoT server and press the button to activate the SPH01-LB. It will automatically join the network via OTAA and start to send the sensor value. The default uplink interval is 20 minutes.
Edwin Chen 1.1 175
Xiaoling 64.2 176 (% style="display:none" %) (%%)
Edwin Chen 1.1 177
178 == 2.2 ​Quick guide to connect to LoRaWAN server (OTAA) ==
179
180
181 Following is an example for how to join the [[TTN v3 LoRaWAN Network>>url:https://console.cloud.thethings.network/]]. Below is the network structure; we use the [[LPS8v2>>url:https://www.dragino.com/products/lora-lorawan-gateway/item/228-lps8v2.html]] as a LoRaWAN gateway in this example.
182
Xiaoling 67.11 183 [[image:image-20230530180406-2.png||height="408" width="806"]]
184
Xiaoling 62.5 185 The LPS8v2 is already set to connected to [[TTN network >>url:https://console.cloud.thethings.network/]], so what we need to now is configure the TTN server.
Edwin Chen 1.1 186
Xiaoling 67.11 187 (% style="display:none" %)
Edwin Chen 1.1 188
Xiaoling 64.2 189
Xiaoling 67.12 190 (% style="color:blue" %)**Step 1:**(%%) Create a device in TTN with the OTAA keys from SPH01-LB.
Edwin Chen 1.1 191
Xiaoling 67.12 192 Each SPH01-LB is shipped with a sticker with the default device EUI as below:
Edwin Chen 1.1 193
Ellie Zhang 30.1 194 [[image:image-20230426084152-1.png||alt="图片-20230426084152-1.png" height="233" width="502"]]
Edwin Chen 1.1 195
196
197 You can enter this key in the LoRaWAN Server portal. Below is TTN screen shot:
198
199
200 (% style="color:blue" %)**Register the device**
201
Xiaoling 14.13 202 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LSN50v2-S31-S31B%20LoRaWAN%20Temperature%20%26%20Humidity%20Sensor%20User%20Manual/WebHome/1654935135620-998.png?rev=1.1||alt="1654935135620-998.png"]]
Edwin Chen 1.1 203
204
205 (% style="color:blue" %)**Add APP EUI and DEV EUI**
206
Ellie Zhang 30.1 207 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LSN50v2-S31-S31B%20LoRaWAN%20Temperature%20%26%20Humidity%20Sensor%20User%20Manual/WebHome/image-20220611161308-4.png?width=753&height=551&rev=1.1||alt="图片-20220611161308-4.png"]]
Edwin Chen 1.1 208
209
210 (% style="color:blue" %)**Add APP EUI in the application**
211
212
Ellie Zhang 30.1 213 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LSN50v2-S31-S31B%20LoRaWAN%20Temperature%20%26%20Humidity%20Sensor%20User%20Manual/WebHome/image-20220611161308-5.png?width=742&height=601&rev=1.1||alt="图片-20220611161308-5.png"]]
Edwin Chen 1.1 214
215
216 (% style="color:blue" %)**Add APP KEY**
217
Ellie Zhang 30.1 218 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LSN50v2-S31-S31B%20LoRaWAN%20Temperature%20%26%20Humidity%20Sensor%20User%20Manual/WebHome/image-20220611161308-6.png?width=744&height=485&rev=1.1||alt="图片-20220611161308-6.png"]]
Edwin Chen 1.1 219
220
Xiaoling 67.13 221 (% style="color:blue" %)**Step 2:**(%%) Activate on SPH01-LB
Edwin Chen 1.1 222
223
Xiaoling 67.13 224 Press the button for 5 seconds to activate the SPH01-LB.
Edwin Chen 6.1 225
Edwin Chen 1.1 226 (% style="color:green" %)**Green led**(%%) will fast blink 5 times, device will enter (% style="color:blue" %)**OTA mode**(%%) for 3 seconds. And then start to JOIN LoRaWAN network. (% style="color:green" %)**Green led**(%%) will solidly turn on for 5 seconds after joined in network.
227
228 After join success, it will start to upload messages to TTN and you can see the messages in the panel.
229
230
231 == 2.3 ​Uplink Payload ==
232
233
Xiaoling 62.5 234 (((
Xiaoling 67.14 235 SPH01-LB will uplink payload via LoRaWAN with below payload format: 
Xiaoling 62.5 236 )))
Saxer Lin 58.1 237
Xiaoling 62.5 238 (((
Xiaoling 67.9 239 Uplink payload includes in total 11 bytes.
Xiaoling 62.5 240 )))
Edwin Chen 1.1 241
Xiaoling 62.5 242 (((
Xiaoling 67.9 243 Normal uplink payload:
Xiaoling 62.5 244 )))
Edwin Chen 1.1 245
Xiaoling 67.9 246 (% border="1" cellspacing="5" style="background-color:#f2f2f2; width:470px" %)
247 |=(% style="width: 60px;background-color:#D9E2F3;color:#0070C0" %)(((
248 **Size(bytes)**
249 )))|=(% style="width: 30px;background-color:#D9E2F3;color:#0070C0" %)**2**|=(% style="width: 70px;background-color:#D9E2F3;color:#0070C0" %)**2**|=(% style="width: 50px;background-color:#D9E2F3;color:#0070C0" %)**2**|=(% style="width: 60px;background-color:#D9E2F3;color:#0070C0" %)**2**|=(% style="width: 70px;background-color:#D9E2F3;color:#0070C0" %)**1**|=(% style="width: 50px;background-color:#D9E2F3;color:#0070C0" %)**1**|=(% style="width: 80px;background-color:#D9E2F3;color:#0070C0" %)**1**
Xiaoling 67.14 250 |(% style="width:62.5px" %)Value|(% style="width:62.5px" %)[[BAT>>||anchor="H2.3.1BatteryInfo"]]|(% style="width:62.5px" %)(((
Xiaoling 67.9 251 [[Temperature (Optional)>>||anchor="H2.3.2DS18B20Temperaturesensor"]]
252 )))|[[Soil pH>>||anchor="H2.3.3SoilpH"]]|[[Soil Temperature>>||anchor="H2.3.4SoilTemperature"]]|(((
253 [[Digital Interrupt (Optional)>>||anchor="H2.3.5InterruptPin"]]
254 )))|Reserve|(((
255 [[Message Type>>||anchor="H2.3.6MessageType"]]
Xiaoling 62.5 256 )))
Edwin Chen 1.1 257
Xiaoling 67.14 258 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LSPH01-LoRaWAN%20Soil%20pH%20Sensor%20User%20Manual/WebHome/1654592721645-318.png?rev=1.1||alt="1654592721645-318.png"]]
Edwin Chen 1.1 259
260
Xiaoling 67.9 261 === 2.3.1 Battery Info ===
Edwin Chen 1.1 262
263
Xiaoling 67.24 264 Check the battery voltage for SPH01-LB.
Edwin Chen 1.1 265
Xiaoling 67.9 266 Ex1: 0x0B45 = 2885mV
Edwin Chen 1.1 267
Xiaoling 67.9 268 Ex2: 0x0B49 = 2889mV
Edwin Chen 1.1 269
270
Xiaoling 67.9 271 === 2.3.2 DS18B20 Temperature sensor ===
Edwin Chen 1.1 272
273
Xiaoling 67.9 274 This is optional, user can connect external DS18B20 sensor to the +3.3v, 1-wire and GND pin . and this field will report temperature.
Edwin Chen 1.1 275
276
Xiaoling 67.9 277 **Example**:
Edwin Chen 1.1 278
Xiaoling 67.9 279 If payload is: 0105H:  (0105 & FC00 == 0), temp = 0105H /10 = 26.1 degree
Edwin Chen 1.1 280
Xiaoling 67.9 281 If payload is: FF3FH :  (FF3F & FC00 == 1) , temp = (FF3FH - 65536)/10 = -19.3 degrees.
Edwin Chen 1.1 282
283
Xiaoling 67.9 284 === 2.3.3 Soil pH ===
Edwin Chen 1.1 285
Saxer Lin 46.1 286
Xiaoling 67.9 287 Range: 0 ~~ 14 pH
Saxer Lin 46.1 288
Xiaoling 67.9 289 **Example:**
Edwin Chen 1.1 290
Xiaoling 67.9 291 (% style="color:#037691" %)** 0x02B7(H) = 695(D) = 6.95pH**
Edwin Chen 1.1 292
293
Xiaoling 67.9 294 === 2.3.4 Soil Temperature ===
Xiaoling 14.22 295
Edwin Chen 1.1 296
Xiaoling 67.9 297 Get Soil Temperature 
Edwin Chen 1.1 298
299
Xiaoling 67.9 300 **Example**:
Edwin Chen 10.1 301
Xiaoling 67.9 302 If payload is: **0105H**:  (0105 & FC00 == 0), temp = 0105H /10 = 26.1 degree
Edwin Chen 1.1 303
Xiaoling 67.9 304 If payload is: **FF3FH** :  (FF3F & FC00 == 1) , temp = (FF3FH - 65536)/10 = -19.3 degrees.
Edwin Chen 1.1 305
306
Xiaoling 67.9 307 === 2.3.5 Interrupt Pin ===
Edwin Chen 1.1 308
309
Xiaoling 67.22 310 This data field shows if this packet is generated by interrupt or not. [[Click here>>||anchor="H3.3.2SetInterruptMode"]] for the hardware and software set up.
Edwin Chen 1.1 311
312
Xiaoling 67.9 313 **Example:**
Xiaoling 62.5 314
Xiaoling 67.9 315 0x00: Normal uplink packet.
Edwin Chen 1.1 316
Xiaoling 67.9 317 0x01: Interrupt Uplink Packet.
Edwin Chen 1.1 318
319
Xiaoling 67.9 320 === 2.3.6 Message Type ===
Xiaoling 39.5 321
Edwin Chen 1.1 322
Saxer Lin 55.1 323 (((
Xiaoling 67.9 324 For a normal uplink payload, the message type is always 0x01.
Saxer Lin 55.1 325 )))
326
327 (((
Xiaoling 67.9 328 Valid Message Type:
Saxer Lin 55.1 329 )))
Saxer Lin 46.1 330
Xiaoling 67.9 331 (% border="1" cellspacing="5" style="background-color:#f2f2f2; width:496px" %)
332 |=(% style="width: 160px;background-color:#D9E2F3;color:#0070C0" %)**Message Type Code**|=(% style="width: 163px;background-color:#D9E2F3;color:#0070C0" %)**Description**|=(% style="width: 173px;background-color:#D9E2F3;color:#0070C0" %)**Payload**
333 |(% style="width:160px" %)0x01|(% style="width:163px" %)Normal Uplink|(% style="width:173px" %)[[Normal Uplink Payload>>||anchor="H2.3200BUplinkPayload"]]
334 |(% style="width:160px" %)0x02|(% style="width:163px" %)Reply configures info|(% style="width:173px" %)[[Configure Info Payload>>||anchor="H3.4GetFirmwareVersionInfo"]]
335 |(% style="width:160px" %)0x03|(% style="width:163px" %)Reply Calibration Info|(% style="width:173px" %)[[Calibration Payload>>||anchor="H2.7Calibration"]]
Edwin Chen 1.1 336
Xiaoling 73.4 337
338
Xiaoling 67.9 339 === 2.3.7 Decode payload in The Things Network ===
Saxer Lin 55.1 340
Edwin Chen 1.1 341
Xiaoling 67.9 342 While using TTN network, you can add the payload format to decode the payload.
Edwin Chen 1.1 343
Xiaoling 67.15 344 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LSPH01-LoRaWAN%20Soil%20pH%20Sensor%20User%20Manual/WebHome/1654592762713-715.png?rev=1.1||alt="1654592762713-715.png"]]
Edwin Chen 1.1 345
Xiaoling 62.5 346 (((
Xiaoling 67.9 347 The payload decoder function for TTN is here:
Xiaoling 62.5 348 )))
Edwin Chen 1.1 349
Xiaoling 67.15 350 In the page (% style="color:#037691" %)**Applications ~-~-> Payload Formats ~-~-> Custom ~-~-> decoder**(%%) to add the decoder from: [[https:~~/~~/github.com/dragino/dragino-end-node-decoder>>https://github.com/dragino/dragino-end-node-decoder]]
Edwin Chen 1.1 351
352
Xiaoling 67.15 353 == 2.4 Uplink Interval ==
Edwin Chen 1.1 354
355
Xiaoling 67.24 356 The SPH01-LB by default uplink the sensor data every 20 minutes. User can change this interval by AT Command or LoRaWAN Downlink Command. See this link: [[Change Uplink Interval>>doc:Main.End Device AT Commands and Downlink Command.WebHome||anchor="H4.1ChangeUplinkInterval"]]
Edwin Chen 1.1 357
358
Xiaoling 62.5 359 == 2.5 Datalog Feature ==
Edwin Chen 1.1 360
Saxer Lin 51.1 361
Xiaoling 67.15 362 Datalog Feature is to ensure IoT Server can get all sampling data from Sensor even if the LoRaWAN network is down. For each sampling, SPH01-LB will store the reading for future retrieving purposes.
Xiaoling 62.5 363
364
365 === 2.5.1 Ways to get datalog via LoRaWAN ===
366
367
Xiaoling 67.23 368 Set PNACKMD=1, SPH01-LB will wait for ACK for every uplink, when there is no LoRaWAN network,SPH01-LB 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.
Xiaoling 62.5 369
370 * (((
Xiaoling 67.15 371 a) SPH01-LB will do an ACK check for data records sending to make sure every data arrive server.
Xiaoling 62.5 372 )))
373 * (((
Xiaoling 67.15 374 b) SPH01-LB will send data in **CONFIRMED Mode** when PNACKMD=1, but SPH01-LB 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 SPH01-LB gets a ACK, SPH01-LB will consider there is a network connection and resend all NONE-ACK messages.
Xiaoling 62.5 375 )))
376
377 Below is the typical case for the auto-update datalog feature (Set PNACKMD=1)
378
379 [[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-20220703111700-2.png?width=1119&height=381&rev=1.1||alt="图片-20220703111700-2.png" height="381" width="1119"]]
380
381
382 === 2.5.2 Unix TimeStamp ===
383
384
Xiaoling 67.15 385 SPH01-LB uses Unix TimeStamp format based on
Xiaoling 62.5 386
387 [[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-20220523001219-11.png?width=627&height=97&rev=1.1||alt="图片-20220523001219-11.png" height="97" width="627"]]
388
389 User can get this time from link:  [[https:~~/~~/www.epochconverter.com/>>url:https://www.epochconverter.com/]] :
390
391 Below is the converter example
392
393 [[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-20220523001219-12.png?width=720&height=298&rev=1.1||alt="图片-20220523001219-12.png" height="298" width="720"]]
394
395
396 So, we can use AT+TIMESTAMP=1611889405 or downlink 3060137afd00 to set the current time 2021 – Jan ~-~- 29 Friday 03:03:25
397
398
399 === 2.5.3 Set Device Time ===
400
401
402 User need to set (% style="color:blue" %)**SYNCMOD=1**(%%) to enable sync time via MAC command.
403
Xiaoling 67.23 404 Once SPH01-LB Joined LoRaWAN network, it will send the MAC command (DeviceTimeReq) and the server will reply with (DeviceTimeAns) to send the current time to SPH01-LB. If SPH01-LB fails to get the time from the server, SPH01-LB will use the internal time and wait for next time request (AT+SYNCTDC to set the time request period, default is 10 days).
Xiaoling 62.5 405
406 (% 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.**
407
Xiaoling 69.7 408
David Huang 69.1 409 === 2.5.4 Datalog Uplink payload (FPORT~=3) ===
Xiaoling 62.5 410
Xiaoling 69.7 411
David Huang 69.1 412 The Datalog uplinks will use below payload format.
Xiaoling 62.5 413
David Huang 69.1 414 **Retrieval data payload:**
Xiaoling 62.5 415
Xiaoling 69.7 416 (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:500px" %)
Xiaoling 69.5 417 |=(% style="width: 60px;background-color:#D9E2F3;color:#0070C0" %)**Size(bytes)**|=(% style="width:30px;background-color:#D9E2F3;color:#0070C0" %)**2**|=(% style="width: 80px;background-color:#D9E2F3;color:#0070C0" %)**2**|=(% style="width: 120px;background-color:#D9E2F3;color:#0070C0" %)**2**|=(% style="width: 90px;background-color:#D9E2F3;color:#0070C0" %)**1**|=(% style="width: 120px;background-color:#D9E2F3;color:#0070C0" %)**4**
Xiaoling 69.2 418 |(% style="width:95px" %)Value|(% style="width:220px" %)PH|(((
Xiaoling 69.7 419 Temperature
420 )))|DS18B20_Temperature|Level of PA8|Unix Time Stamp
David Huang 69.1 421
Xiaoling 69.6 422 (% style="color:blue" %)**Poll Message Flag**(%%): 1: This message is a poll message reply.
David Huang 69.1 423
424 * Poll Message Flag is set to 1.
425
426 * Each data entry is 11 bytes, to save airtime and battery, devices will send max bytes according to the current DR and Frequency bands.
427
428 For example, in US915 band, the max payload for different DR is:
429
Xiaoling 69.6 430 (% style="color:blue" %)**a) DR0:**(%%) max is 11 bytes so one entry of data
David Huang 69.1 431
Xiaoling 69.6 432 (% style="color:blue" %)**b) DR1:**(%%) max is 53 bytes so devices will upload 4 entries of data (total 44 bytes)
David Huang 69.1 433
Xiaoling 69.6 434 (% style="color:blue" %)**c) DR2:**(%%) total payload includes 11 entries of data
David Huang 69.1 435
Xiaoling 69.7 436 (% style="color:blue" %)**d) DR3: **(%%)total payload includes 22 entries of data.
David Huang 69.1 437
438 If devise doesn't have any data in the polling time. Device will uplink 11 bytes of 0   
439
Xiaoling 69.7 440
David Huang 69.1 441 **Example:**
442
443 If SPH01-LB has below data inside Flash:
444
445 [[image:image-20230606170132-1.png]]
446
447 If user sends below downlink command: 31646D84E1646D856C05
448
449 Where : Start time: 646D84E1 = time 23/5/24 03:30:41
450
451 Stop time: 646D856C= time 23/5/24 03:33:00
452
Xiaoling 69.6 453
David Huang 69.1 454 === 2.5.5 Poll sensor value ===
455
456
Xiaoling 62.5 457 Users can poll sensor values based on timestamps. Below is the downlink command.
458
459 (% border="1" cellspacing="5" style="background-color:#f2f2f2; width:425.818px" %)
460 |(% colspan="4" style="background-color:#d9e2f3; color:#0070c0; width:423px" %)**Downlink Command to poll Open/Close status (0x31)**
461 |(% style="width:58px" %)**1byte**|(% style="width:127px" %)**4bytes**|(% style="width:124px" %)**4bytes**|(% style="width:114px" %)**1byte**
462 |(% style="width:58px" %)31|(% style="width:127px" %)Timestamp start|(% style="width:124px" %)Timestamp end|(% style="width:114px" %)Uplink Interval
463
464 (((
465 Timestamp start and Timestamp end-use Unix TimeStamp format as mentioned above. Devices will reply with all data logs during this period, using the uplink interval.
466 )))
467
468 (((
Xiaoling 64.8 469 For example, downlink command [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/CPL01%20LoRaWAN%20Outdoor%20PulseContact%20%20Sensor%20Manual/WebHome/image-20220518162852-1.png?rev=1.1||alt="image-20220518162852-1.png"]]
Xiaoling 62.5 470 )))
471
472 (((
473 Is to check 2021/11/12 12:00:00 to 2021/11/12 15:00:00's data
474 )))
475
476 (((
Xiaoling 67.23 477 Uplink Internal =5s,means SPH01-LB will send one packet every 5s. range 5~~255s.
Xiaoling 62.5 478 )))
479
480
Xiaoling 67.16 481 == 2.6 Installation and Maintain ==
Edwin Chen 1.1 482
Xiaoling 67.16 483 === 2.6.1 Before measurement ===
Edwin Chen 1.1 484
485
Xiaoling 67.15 486 (((
Xiaoling 67.24 487 If the SPH01-LB has more than 7 days not use or just clean the pH probe. User should put the probe inside pure water for more than 24 hours for activation. If no put in water, user need to put inside soil for more than 24 hours to ensure the measurement accuracy. 
Xiaoling 67.15 488 )))
489
490
Xiaoling 67.16 491 === 2.6.2 Measurement ===
Xiaoling 67.15 492
493
494 (((
Xiaoling 67.28 495 (% style="color:blue" %)**Measurement the soil surface:**
Xiaoling 67.15 496 )))
497
498 (((
Xiaoling 67.26 499 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/LSPH01-LoRaWAN%20Soil%20pH%20Sensor%20User%20Manual/WebHome/1654592946732-634.png?rev=1.1||alt="1654592946732-634.png"]]
Xiaoling 67.15 500 )))
501
502 (((
503 Choose the proper measuring position. Split the surface soil according to the measured deep.
504 )))
505
506 (((
507 Put pure water, or rainwater to make the soil of measurement point to moist mud. Remove rocks or hard things.
508 )))
509
510 (((
511 Slowly insert the probe to the measure point. Don't use large force which will break the probe. Make sure not shake when inserting.
512 )))
513
514 (((
515 Put soil over the probe after insert. And start to measure.
516 )))
517
518
519 (((
Xiaoling 67.27 520 (% style="color:blue" %)**Measurement inside soil:**
Xiaoling 67.15 521 )))
522
523 (((
524 Dig a hole with diameter > 20CM.
525 )))
526
527 (((
528 Insert the probe inside, method like measure the surface.
529 )))
530
531
Xiaoling 67.16 532 === 2.6.3 Maintain Probe ===
Xiaoling 67.15 533
534
Xiaoling 67.28 535 (((
536 ~1. pH probe electrode is fragile and no strong. User must avoid strong force or hitting it.
Xiaoling 67.15 537 )))
Xiaoling 67.28 538
539 (((
540 2. After long time use (3~~ 6  months). The probe electrode needs to be clean; user can use high grade sandpaper to polish it or put in 5% hydrochloric acid for several minutes. After the metal probe looks like new, user can use pure water to wash it.
Xiaoling 67.15 541 )))
Xiaoling 67.28 542
543 (((
544 3. Probe reference electrode is also no strong, need to avoid strong force or hitting.
Xiaoling 67.15 545 )))
Xiaoling 67.28 546
547 (((
548 4. User should keep reference electrode wet while not use.
Xiaoling 67.15 549 )))
Xiaoling 67.28 550
551 (((
552 5. Avoid the probes to touch oily matter. Which will cause issue in accuracy.
Xiaoling 67.15 553 )))
Xiaoling 67.28 554
555 (((
556 6. The probe is IP68 can be put in water.
557
558
Xiaoling 67.15 559 )))
560
Xiaoling 67.16 561 == 2.7 Calibration ==
Xiaoling 67.15 562
563
Xiaoling 73.4 564 (% style="color:blue" %)**Step1 :**(%%)** Clean probe**
Xiaoling 73.2 565
Bei Jinggeng 73.1 566 user can use high grade sandpaper to polish it or put in 5% hydrochloric acid for several minutes. After the metal probe looks new, users can clean it to remove hydrochloric acid or other liquids from the surface.
Bei Jinggeng 72.1 567
Xiaoling 73.4 568 (% style="color:blue" %)**Step2 :**(%%)** Immerse the sensor in ph buffer solution to make the sensor values stable**
Bei Jinggeng 72.1 569
Xiaoling 67.15 570 (((
571 User can do calibration for the probe. It is limited to use below pH buffer solution to calibrate: 4.00, 6.86, 9.18. When calibration, user need to clean the electrode and put the probe in the pH buffer solution to wait the value stable ( a new clean electrode might need max 24 hours to be stable).
Bei Jinggeng 72.1 572
Xiaoling 73.3 573 (% style="color:red" %)**Note:Only one ph buffer with one of the ph values needs to be calibrated during calibration. Wait for the sensor measurement value to be stable, it does not need to be the same as the ph marked by the ph buffer**
Bei Jinggeng 72.1 574
Bei Jinggeng 73.1 575
Xiaoling 73.4 576 (% style="color:blue" %)**Step3 :**(%%)** The numerically stable sensors were calibrated using commands**
Xiaoling 67.15 577 )))
578
579 (((
Bei Jinggeng 72.1 580 User can use below command to calibrate.
Xiaoling 67.15 581
582 (% border="1" cellspacing="5" style="background-color:#f2f2f2; width:520px" %)
583 |(% style="background-color:#d9e2f3; color:#0070c0; width:120px" %)**pH buffer solution**|(% style="background-color:#d9e2f3; color:#0070c0; width:150px" %)**AT Command to calibrate**|(% style="background-color:#d9e2f3; color:#0070c0; width:150px" %)**Downlink Command**|(% style="background-color:#d9e2f3; color:#0070c0; width:100px" %)**Read Cal Value**
584 |(% style="width:149px" %)4.00|(% style="width:197px" %)AT+PHCAL=4|(% style="width:206px" %)(((
585 0x13 04
586 Reply with Calibrate payload
587 )))|(% style="width:136px" %)(((
588 AT+PHCAL=?
589 Example 41,61,91
590 )))
591 |(% style="width:149px" %)6.86|(% style="width:197px" %)AT+PHCAL=6|(% style="width:206px" %)(((
592 0x13 06
593 Reply with Calibrate payload
594 )))|(% style="width:136px" %)AT+PHCAL=?
595 |(% style="width:149px" %)9.18|(% style="width:197px" %)AT+PHCAL=9|(% style="width:206px" %)(((
596 0x13 09
597 Reply with Calibrate payload
598 )))|(% style="width:136px" %)AT+PHCAL=?
599 |(% style="width:149px" %)Factory Default|(% style="width:197px" %)AT+PHCAL=15|(% style="width:206px" %)(((
600 0x13 15
601 Reply with Calibrate payload
602 )))|(% style="width:136px" %)(((
603 AT+PHCAL=?
604 Example 151
605 )))
606 )))
607
Bei Jinggeng 73.1 608 To use the AT COMMAND, refer to this link:
Xiaoling 67.15 609
Bei Jinggeng 73.1 610 * AT Command via Bluetooth Connection (**Recommended**): [[BLE Configure Instruction>>url:http://wiki.dragino.com/xwiki/bin/view/Main/BLE%20Bluetooth%20Remote%20Configure/]].
611
612 * 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]].
613
614 To use Downlink, take TTN as an example, please refer to this link:
615
616 * LoRaWAN Downlink.  Instruction for different platforms: See [[IoT LoRaWAN Server>>url:http://wiki.dragino.com/xwiki/bin/view/Main/]] section.
617
Bei Jinggeng 72.1 618 When the command is successfully used, the node sends a uplink.
619 This is the payload for uplink
620
Xiaoling 67.15 621 (% style="color:#037691" %)**Calibration Payload**
622
623 (% border="1" cellspacing="5" style="background-color:#f2f2f2; width:500px" %)
624 |=(% style="width: 60px;background-color:#D9E2F3;color:#0070C0" %)(((
625 **Size(bytes)**
626 )))|=(% style="width: 100px;background-color:#D9E2F3;color:#0070C0" %)**1**|=(% style="width: 100px;background-color:#D9E2F3;color:#0070C0" %)**1**|=(% style="width: 100px;background-color:#D9E2F3;color:#0070C0" %)**1**|=(% style="width: 50px;background-color:#D9E2F3;color:#0070C0" %)**7**|=(% style="width: 90px;background-color:#D9E2F3;color:#0070C0" %)**1**
627 |Value|(((
628 PH4 Calibrate value
629 )))|PH6.86 Calibrate value|(((
630 PH9.18 Calibrate value
631 )))|Reserve|(((
632 [[Message Type>>||anchor="H2.3.6MessageType"]]
633 Always 0x03
634 )))
635
636 User can also send 0x14 downlink command to poll the current calibration payload.
637
638 (% border="1" cellspacing="5" style="background-color:#f2f2f2; width:480px" %)
639 |=(% style="width: 183px; background-color:#D9E2F3;color:#0070C0" %)**Downlink Control Type**|=(% style="width: 55px; background-color:#D9E2F3;color:#0070C0" %)FPort|=(% style="width: 93px; background-color:#D9E2F3;color:#0070C0" %)**Type Code**|=(% style="width: 146px; background-color: rgb(217, 226, 243); color: rgb(0, 112, 192);" %)**Downlink payload size(bytes)**
640 |(% style="width:183px" %)Get Calibration Version Info|(% style="width:55px" %)Any|(% style="width:93px" %)14|(% style="width:146px" %)2
641
642 * Reply to the confirmation package: 14 01
Xiaoling 67.29 643
Xiaoling 67.15 644 * Reply to non-confirmed packet: 14 00
Xiaoling 67.16 645
Xiaoling 73.4 646 (% style="color:blue" %)**Step4:**(%%)**After the calibration is completed, its measurement results in this ph buffer solution should be consistent with the numerical value of the command used in the calibration.**
Xiaoling 71.7 647
Bei Jinggeng 73.1 648 Examples:
649 After using the command AT+PH=9 in 9.18ph buffer
650 The readout returned by the sensor in 9.18ph buffer should be pH=9
Bei Jinggeng 72.1 651
Bei Jinggeng 73.1 652
Xiaoling 67.16 653 == 2.8 Frequency Plans ==
654
655
Xiaoling 67.18 656 The SPH01-LB uses OTAA mode and below frequency plans by default. If user want to use it with different frequency plan, please refer the AT command sets.
Xiaoling 67.16 657
658 [[http:~~/~~/wiki.dragino.com/xwiki/bin/view/Main/End%20Device%20Frequency%20Band/>>http://wiki.dragino.com/xwiki/bin/view/Main/End%20Device%20Frequency%20Band/]]
659
660
Xiaoling 67.17 661 = 3. Configure SPH01-LB =
Edwin Chen 1.1 662
kai 16.4 663 == 3.1 Configure Methods ==
Edwin Chen 1.1 664
665
Xiaoling 67.18 666 SPH01-LB supports below configure method:
Edwin Chen 1.1 667
668 * AT Command via Bluetooth Connection (**Recommended**): [[BLE Configure Instruction>>http://wiki.dragino.com/xwiki/bin/view/Main/BLE%20Bluetooth%20Remote%20Configure/]].
Xiaoling 64.12 669
Edwin Chen 11.1 670 * AT Command via UART Connection : See [[UART Connection>>http://wiki.dragino.com/xwiki/bin/view/Main/UART%20Access%20for%20LoRa%20ST%20v4%20base%20model/#H2.3UARTConnectionforSN50v3basemotherboard]].
Xiaoling 64.12 671
Edwin Chen 1.1 672 * LoRaWAN Downlink.  Instruction for different platforms: See [[IoT LoRaWAN Server>>http://wiki.dragino.com/xwiki/bin/view/Main/]] section.
673
Xiaoling 73.4 674
675
Edwin Chen 1.1 676 == 3.2 General Commands ==
677
678
679 These commands are to configure:
680
681 * General system settings like: uplink interval.
Xiaoling 64.12 682
Edwin Chen 1.1 683 * LoRaWAN protocol & radio related command.
684
685 They are same for all Dragino Devices which support DLWS-005 LoRaWAN Stack. These commands can be found on the wiki:
686
687 [[http:~~/~~/wiki.dragino.com/xwiki/bin/view/Main/End%20Device%20AT%20Commands%20and%20Downlink%20Command/>>http://wiki.dragino.com/xwiki/bin/view/Main/End%20Device%20AT%20Commands%20and%20Downlink%20Command/]]
688
689
Xiaoling 67.23 690 == 3.3 Commands special design for SPH01-LB ==
Edwin Chen 1.1 691
692
Xiaoling 67.23 693 These commands only valid for SPH01-LB, as below:
Edwin Chen 1.1 694
695
696 === 3.3.1 Set Transmit Interval Time ===
697
698
Xiaoling 62.5 699 (((
Edwin Chen 1.1 700 Feature: Change LoRaWAN End Node Transmit Interval.
Xiaoling 62.5 701 )))
702
703 (((
Edwin Chen 1.1 704 (% style="color:blue" %)**AT Command: AT+TDC**
Xiaoling 62.5 705 )))
Edwin Chen 1.1 706
Xiaoling 14.34 707 (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:510px" %)
Xiaoling 62.5 708 |=(% style="width: 156px;background-color:#D9E2F3; color:#0070c0" %)**Command Example**|=(% style="width: 137px;background-color:#D9E2F3; color:#0070c0" %)**Function**|=(% style="background-color:#D9E2F3; color:#0070c0" %)**Response**
Edwin Chen 1.1 709 |(% style="width:156px" %)AT+TDC=?|(% style="width:137px" %)Show current transmit Interval|(((
710 30000
711 OK
712 the interval is 30000ms = 30s
713 )))
714 |(% style="width:156px" %)AT+TDC=60000|(% style="width:137px" %)Set Transmit Interval|(((
715 OK
716 Set transmit interval to 60000ms = 60 seconds
717 )))
718
Xiaoling 62.5 719 (((
Edwin Chen 1.1 720 (% style="color:blue" %)**Downlink Command: 0x01**
Xiaoling 62.5 721 )))
Edwin Chen 1.1 722
Xiaoling 62.5 723 (((
Edwin Chen 1.1 724 Format: Command Code (0x01) followed by 3 bytes time value.
Xiaoling 62.5 725 )))
Edwin Chen 1.1 726
Xiaoling 62.5 727 (((
Edwin Chen 1.1 728 If the downlink payload=0100003C, it means set the END Node's Transmit Interval to 0x00003C=60(S), while type code is 01.
Xiaoling 62.5 729 )))
Edwin Chen 1.1 730
Xiaoling 62.5 731 * (((
732 Example 1: Downlink Payload: 0100001E  ~/~/ Set Transmit Interval (TDC) = 30 seconds
733 )))
Xiaoling 64.13 734
Xiaoling 62.5 735 * (((
736 Example 2: Downlink Payload: 0100003C  ~/~/ Set Transmit Interval (TDC) = 60 seconds
Xiaoling 67.30 737
738
739
Xiaoling 62.5 740 )))
Edwin Chen 1.1 741
Xiaoling 67.20 742 === 3.3.2 Set Interrupt Mode ===
Xiaoling 62.5 743
744
Ellie Zhang 71.1 745 Feature, Set Interrupt mode for GPIO_EXTI of pin.
Xiaoling 62.5 746
Ellie Zhang 71.1 747 When AT+INTMOD=0 is set, GPIO_EXTI is used as a digital input port.
Xiaoling 62.5 748
Xiaoling 67.20 749 (% style="color:blue" %)**AT Command: AT+INTMOD**
Xiaoling 62.5 750
Xiaoling 67.20 751 (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:510px" %)
752 |=(% style="width: 155px;background-color:#D9E2F3;color:#0070C0" %)**Command Example**|=(% style="width: 197px;background-color:#D9E2F3;color:#0070C0" %)**Function**|=(% style="width: 158px;background-color:#D9E2F3;color:#0070C0" %)**Response**
753 |(% style="width:154px" %)AT+INTMOD=?|(% style="width:196px" %)Show current interrupt mode|(% style="width:157px" %)(((
754 0
755 OK
756 the mode is 0 =Disable Interrupt
Xiaoling 62.5 757 )))
Xiaoling 67.20 758 |(% style="width:154px" %)AT+INTMOD=2|(% style="width:196px" %)(((
759 Set Transmit Interval
760 0. (Disable Interrupt),
761 ~1. (Trigger by rising and falling edge)
762 2. (Trigger by falling edge)
763 3. (Trigger by rising edge)
764 )))|(% style="width:157px" %)OK
Edwin Chen 1.1 765
Xiaoling 67.20 766 (% style="color:blue" %)**Downlink Command: 0x06**
Xiaoling 62.7 767
Xiaoling 67.20 768 Format: Command Code (0x06) followed by 3 bytes.
Edwin Chen 1.1 769
Xiaoling 67.20 770 This means that the interrupt mode of the end node is set to 0x000003=3 (rising edge trigger), and the type code is 06.
Edwin Chen 1.1 771
Xiaoling 67.20 772 * Example 1: Downlink Payload: 06000000  ~/~/  Turn off interrupt mode
Edwin Chen 1.1 773
Xiaoling 67.20 774 * Example 2: Downlink Payload: 06000003  ~/~/  Set the interrupt mode to rising edge trigger
Xiaoling 62.7 775
Xiaoling 73.4 776
777
Xiaoling 67.20 778 === 3.3.3 Calibrate Sensor ===
Edwin Chen 1.1 779
780
Xiaoling 67.20 781 Detail See [[Calibration Guide>>||anchor="H2.7Calibration"]] for the user of 0x13 and 0x14 downlink commands
Edwin Chen 1.1 782
783
Xiaoling 67.20 784 === 3.3.4 Get Firmware Version Info ===
Edwin Chen 1.1 785
Xiaoling 39.6 786
Xiaoling 67.20 787 Feature: use downlink to get firmware version.
Edwin Chen 1.1 788
Xiaoling 67.20 789 (% style="color:#037691" %)**Downlink Command: 0x26**
Edwin Chen 1.1 790
Xiaoling 62.5 791 (% border="1" cellspacing="5" style="background-color:#f2f2f2; width:500px" %)
Xiaoling 67.20 792 |(% style="background-color:#d9e2f3; color:#0070c0; width:193px" %)**Downlink Control Type**|(% style="background-color:#d9e2f3; color:#0070c0; width:57px" %)**FPort**|(% style="background-color:#d9e2f3; color:#0070c0; width:91px" %)**Type Code**|(% style="background-color:#d9e2f3; color:#0070c0; width:159px" %)**Downlink payload size(bytes)**
793 |(% style="width:193px" %)Get Firmware Version Info|(% style="width:57px" %)Any|(% style="width:91px" %)26|(% style="width:149px" %)2
Xiaoling 62.5 794
Xiaoling 67.20 795 * Reply to the confirmation package: 26 01
Xiaoling 67.29 796
Xiaoling 67.20 797 * Reply to non-confirmed packet: 26 00
Xiaoling 62.5 798
Xiaoling 67.20 799 Device will send an uplink after got this downlink command. With below payload:
Xiaoling 62.5 800
Xiaoling 67.20 801 Configures info payload:
Xiaoling 62.5 802
Xiaoling 71.3 803 (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:470px" %)
804 |(% style="background-color:#d9e2f3; color:#0070c0; width:70px" %)**Size(bytes)**|(% style="background-color:#d9e2f3; color:#0070c0; width:70px" %)**1**|(% style="background-color:#d9e2f3; color:#0070c0; width:100px" %)**2**|(% style="background-color:#d9e2f3; color:#0070c0; width:100px" %)**1**|(% style="background-color:#d9e2f3; color:#0070c0; width:70px" %)**1**|(% style="background-color:#d9e2f3; color:#0070c0; width:60px" %)**2**
Ellie Zhang 71.1 805 |Value|Sensor Model|Firmware Version|Frequency Band|Sub-band|BAT
Xiaoling 62.5 806
Ellie Zhang 71.1 807 (% style="color:#037691" %)**Software Type**(%%): Always 0x2C for SPH01-LB
Xiaoling 62.5 808
Ellie Zhang 71.1 809 (% style="color:#037691" %)**Firmware Version**(%%): 0x0100, Means: v1.0.0 version
810
Xiaoling 67.20 811 (% style="color:#037691" %)**Frequency Band**:
Xiaoling 62.5 812
Xiaoling 71.4 813 0x01: EU868
Xiaoling 62.5 814
Xiaoling 71.4 815 0x02: US915
Xiaoling 62.5 816
Xiaoling 71.4 817 0x03: IN865
Xiaoling 62.5 818
Xiaoling 71.4 819 0x04: AU915
Xiaoling 62.5 820
Xiaoling 71.4 821 0x05: KZ865
Xiaoling 62.5 822
Xiaoling 71.4 823 0x06: RU864
Xiaoling 62.5 824
Xiaoling 71.4 825 0x07: AS923
Xiaoling 62.5 826
Xiaoling 71.4 827 0x08: AS923-1
Xiaoling 62.5 828
Xiaoling 71.4 829 0x09: AS923-2
Xiaoling 62.5 830
Xiaoling 71.4 831 0x0a: AS923-3
Xiaoling 62.5 832
Xiaoling 71.4 833 0x0b: CN470
Xiaoling 62.5 834
Xiaoling 71.4 835 0x0c: EU433
Xiaoling 62.5 836
Xiaoling 71.4 837 0x0d: KR920
Xiaoling 62.5 838
Xiaoling 71.4 839 0x0e: MA869
Xiaoling 62.6 840
Xiaoling 62.5 841
Ellie Zhang 71.1 842 (% style="color:#037691" %)**Sub-Band**(%%):
Xiaoling 62.5 843
Xiaoling 71.5 844 AU915 and US915: value 0x00 ~~ 0x08
Xiaoling 62.5 845
Xiaoling 71.5 846 CN470: value 0x0B ~~ 0x0C
847
848 Other Bands: Always 0x00
849
850
Ellie Zhang 71.1 851 (% style="color:#037691" %)**Battery Info**:
Edwin Chen 1.1 852
Ellie Zhang 71.1 853 Check the battery voltage.
Saxer Lin 46.1 854
Ellie Zhang 71.1 855 Ex1: 0x0B45 = 2885mV
Edwin Chen 1.1 856
Ellie Zhang 71.1 857 Ex2: 0x0B49 = 2889mV
Edwin Chen 1.1 858
859
kai 16.4 860 = 4. Battery & Power Consumption =
Xiaoling 14.45 861
Edwin Chen 1.1 862
Xiaoling 67.23 863 SPH01-LB use ER26500 + SPC1520 battery pack. See below link for detail information about the battery info and how to replace.
Edwin Chen 1.1 864
865 [[**Battery Info & Power Consumption Analyze**>>http://wiki.dragino.com/xwiki/bin/view/Main/How%20to%20calculate%20the%20battery%20life%20of%20Dragino%20sensors%3F/]] .
866
867
kai 16.4 868 = 5. OTA Firmware update =
Edwin Chen 1.1 869
870
Edwin Chen 13.1 871 (% class="wikigeneratedid" %)
Xiaoling 67.23 872 User can change firmware SPH01-LB to:
Edwin Chen 1.1 873
Edwin Chen 13.1 874 * Change Frequency band/ region.
Xiaoling 62.7 875
Edwin Chen 13.1 876 * Update with new features.
Xiaoling 62.7 877
Edwin Chen 13.1 878 * Fix bugs.
Edwin Chen 1.1 879
Xiaoling 69.11 880 Firmware and changelog can be downloaded from : **[[Firmware download link>>https://www.dropbox.com/sh/p1tiy43naiyy75u/AACzHWEGlYNeHDjMe2bkxotUa?dl=0]]**
Edwin Chen 1.1 881
kai 31.1 882 Methods to Update Firmware:
Edwin Chen 1.1 883
kai 31.1 884 * (Recommanded way) OTA firmware update via wireless:   [[http:~~/~~/wiki.dragino.com/xwiki/bin/view/Main/Firmware%20OTA%20Update%20for%20Sensors/>>url:http://wiki.dragino.com/xwiki/bin/view/Main/Firmware%20OTA%20Update%20for%20Sensors/]]
Xiaoling 62.7 885
Xiaoling 39.6 886 * Update through UART TTL interface. **[[Instruction>>url:http://wiki.dragino.com/xwiki/bin/view/Main/UART%20Access%20for%20LoRa%20ST%20v4%20base%20model/#H1.LoRaSTv4baseHardware]]**.
Edwin Chen 1.1 887
Xiaoling 73.4 888
889
kai 31.1 890 = 6. FAQ =
Edwin Chen 1.1 891
Xiaoling 62.7 892 == 6.1  AT Commands input doesn't work ==
Edwin Chen 1.1 893
894
Xiaoling 62.7 895 In the case if user can see the console output but can't type input to the device. Please check if you already include the (% style="color:green" %)**ENTER**(%%) while sending out the command. Some serial tool doesn't send (% style="color:green" %)**ENTER**(%%) while press the send key, user need to add ENTER in their string.
896
897
kai 31.1 898 = 7. Order Info =
Edwin Chen 1.1 899
900
Xiaoling 67.23 901 Part Number: (% style="color:blue" %)**SPH01-LB-XXX**
Edwin Chen 1.1 902
Xiaoling 62.7 903 (% style="color:red" %)**XXX**(%%): The default frequency band
Edwin Chen 1.1 904
Ellie Zhang 38.1 905 * (% style="color:red" %)**AS923**(%%): LoRaWAN AS923 band
Edwin Chen 1.1 906
Ellie Zhang 38.1 907 * (% style="color:red" %)**AU915**(%%): LoRaWAN AU915 band
Edwin Chen 1.1 908
Ellie Zhang 38.1 909 * (% style="color:red" %)**EU433**(%%): LoRaWAN EU433 band
Edwin Chen 1.1 910
Ellie Zhang 38.1 911 * (% style="color:red" %)**EU868**(%%): LoRaWAN EU868 band
Edwin Chen 1.1 912
Ellie Zhang 38.1 913 * (% style="color:red" %)**KR920**(%%): LoRaWAN KR920 band
Edwin Chen 1.1 914
Ellie Zhang 38.1 915 * (% style="color:red" %)**US915**(%%): LoRaWAN US915 band
Edwin Chen 1.1 916
Ellie Zhang 38.1 917 * (% style="color:red" %)**IN865**(%%): LoRaWAN IN865 band
Edwin Chen 1.1 918
Ellie Zhang 38.1 919 * (% style="color:red" %)**CN470**(%%): LoRaWAN CN470 band
Edwin Chen 1.1 920
Xiaoling 73.4 921
922
kai 31.1 923 = 8. ​Packing Info =
Edwin Chen 1.1 924
Xiaoling 39.6 925
Ellie Zhang 39.1 926 (% style="color:#037691" %)**Package Includes**:
Edwin Chen 1.1 927
Xiaoling 67.23 928 * SPH01-LB LoRaWAN Soil Ph Sensor x 1
Edwin Chen 1.1 929
Ellie Zhang 39.1 930 (% style="color:#037691" %)**Dimension and weight**:
Edwin Chen 1.1 931
kai 31.1 932 * Device Size: cm
Edwin Chen 1.1 933
kai 31.1 934 * Device Weight: g
Edwin Chen 1.1 935
kai 31.1 936 * Package Size / pcs : cm
Edwin Chen 1.1 937
kai 31.1 938 * Weight / pcs : g
Edwin Chen 1.1 939
Xiaoling 73.4 940
941
kai 31.1 942 = 9. Support =
Edwin Chen 1.1 943
944
kai 31.1 945 * 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.
Xiaoling 39.6 946
947 * 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]].
Copyright ©2010-2022 Dragino Technology Co., LTD. All rights reserved
Dragino Wiki v2.0