Hide last authors
Xiaoling 75.2 1 (% style="text-align:center" %)
2 [[image:image-20240105101400-2.png]]
Xiaoling 67.2 3
4
5
6
Xiaoling 75.5 7
8
9
Xiaoling 71.2 10 **Table of Contents :**
Ellie Zhang 30.1 11
Edwin Chen 1.1 12 {{toc/}}
13
14
15
16
17
18
kai 31.1 19 = 1. Introduction =
Edwin Chen 1.1 20
Xiaoling 67.9 21 == 1.1 What is LoRaWAN Soil pH Sensor ==
Edwin Chen 1.1 22
Xiaoling 39.6 23
Xiaoling 75.2 24 The Dragino SPH01-LB/LS 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 25
Xiaoling 75.2 26 SPH01-LB/LS 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/LS probe can be buried into soil for long time use.
Edwin Chen 1.1 27
Xiaoling 75.2 28 The LoRa wireless technology used in SPH01-LB/LS 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 29
Xiaoling 75.2 30 SPH01-LB/LS (% style="color:blue" %)**supports BLE configure**(%%) and (% style="color:blue" %)**wireless OTA update**(%%) which make user easy to use.
Edwin Chen 1.1 31
Xiaoling 75.6 32 SPH01-LB/LS is powered by (% style="color:blue" %)**8500mAh Li-SOCI2 battery **(%%)or (% style="color:blue" %)**solar powered + li-on battery**(%%) it is designed for long term use up to 5 years.
Xiaoling 62.4 33
Xiaoling 75.2 34 Each SPH01-LB/LS 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 35
36
Xiaoling 66.2 37 [[image:image-20230530180339-1.png||height="408" width="806"]]
Xiaoling 64.2 38
39
Edwin Chen 1.1 40 == 1.2 ​Features ==
41
Xiaoling 39.6 42
Edwin Chen 1.1 43 * LoRaWAN 1.0.3 Class A
Xiaoling 62.4 44 * Bands: CN470/EU433/KR920/US915/EU868/AS923/AU915/IN865
Edwin Chen 1.1 45 * Ultra-low power consumption
Xiaoling 67.6 46 * Monitor soil pH with temperature compensation.
47 * Monitor soil temperature
48 * Monitor Battery Level
49 * Support pH calibration by end user
Edwin Chen 1.1 50 * Support Bluetooth v5.1 and LoRaWAN remote configure
51 * Support wireless OTA update firmware
Xiaoling 67.6 52 * IP66 Waterproof Enclosure
53 * IP68 rate for the Sensor Probe
54 * AT Commands to change parameters
Edwin Chen 1.1 55 * Downlink to change configure
Xiaoling 75.7 56 * 8500mAh Li/SOCl2 Battery (SPH01-LB)
57 * Solar panel + 3000mAh Li-on battery (SPH01-LS)
Edwin Chen 1.1 58
59 == 1.3 Specification ==
60
61
Xiaoling 67.7 62 (% style="color:blue" %)**Common DC Characteristics:**
Edwin Chen 1.1 63
Xiaoling 75.12 64 * Supply Voltage: Built-in Battery , 2.5v ~~ 3.6v
Edwin Chen 1.1 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 62.4 104 == 1.4 Applications ==
Edwin Chen 1.1 105
Xiaoling 62.4 106
Xiaoling 67.8 107 * Smart Agriculture
Xiaoling 62.4 108
109 == 1.5 Sleep mode and working mode ==
110
111
Edwin Chen 1.1 112 (% 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.
113
114 (% 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.
115
116
Xiaoling 62.9 117 == 1.6 Button & LEDs ==
Edwin Chen 1.1 118
119
Xiaoling 75.15 120 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/RS485-LB_Waterproof_RS485UART_to_LoRaWAN_Converter/WebHome/image-20240103160425-4.png?rev=1.1||alt="image-20240103160425-4.png" height="451" width="633"]]
Edwin Chen 1.1 121
Xiaoling 14.13 122 (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:510px" %)
Xiaoling 75.8 123 |=(% style="width: 167px;background-color:#4F81BD;color:white" %)**Behavior on ACT**|=(% style="width: 117px;background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 225px;background-color:#4F81BD;color:white" %)**Action**
Edwin Chen 1.1 124 |(% style="width:167px" %)Pressing ACT between 1s < time < 3s|(% style="width:117px" %)Send an uplink|(% style="width:225px" %)(((
125 If sensor is already Joined to LoRaWAN network, sensor will send an uplink packet, (% style="color:blue" %)**blue led** (%%)will blink once.
126 Meanwhile, BLE module will be active and user can connect via BLE to configure device.
127 )))
128 |(% style="width:167px" %)Pressing ACT for more than 3s|(% style="width:117px" %)Active Device|(% style="width:225px" %)(((
129 (% 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.
130 (% style="color:green" %)**Green led**(%%) will solidly turn on for 5 seconds after joined in network.
131 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.
132 )))
Edwin Chen 6.1 133 |(% 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 134
Xiaoling 62.9 135 == 1.7 BLE connection ==
Edwin Chen 1.1 136
137
Xiaoling 75.3 138 SPH01-LB/LS support BLE remote configure.
Edwin Chen 1.1 139
140
141 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:
142
143 * Press button to send an uplink
144 * Press button to active device.
145 * Device Power on or reset.
146
147 If there is no activity connection on BLE in 60 seconds, sensor will shut down BLE module to enter low power mode.
148
149
Xiaoling 73.4 150 == 1.8 Mechanical ==
Edwin Chen 1.1 151
Xiaoling 75.16 152 === 1.8.1 for LB version(% style="display:none" %) (%%) ===
Edwin Chen 1.1 153
Edwin Chen 6.1 154 [[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 155
156
Edwin Chen 6.1 157 [[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 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@1675143909447-639.png]]
Edwin Chen 1.1 161
162
Xiaoling 75.16 163 === 1.8.2 for LS version ===
164
165
166 [[image:http://wiki.dragino.com/xwiki/bin/download/Main/User%20Manual%20for%20LoRaWAN%20End%20Nodes/SN50v3-LB/WebHome/image-20231231203439-3.png?width=886&height=385&rev=1.1||alt="image-20231231203439-3.png"]]
167
168
Xiaoling 75.3 169 = 2. Configure SPH01-LB/LS to connect to LoRaWAN network =
Edwin Chen 1.1 170
171 == 2.1 How it works ==
172
173
Xiaoling 75.3 174 The SPH01-LB/LS 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/LS. 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 75.3 190 (% style="color:blue" %)**Step 1:**(%%) Create a device in TTN with the OTAA keys from SPH01-LB/LS.
Edwin Chen 1.1 191
Xiaoling 75.3 192 Each SPH01-LB/LS 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 75.3 221 (% style="color:blue" %)**Step 2:**(%%) Activate on SPH01-LB/LS
Edwin Chen 1.1 222
223
Xiaoling 75.3 224 Press the button for 5 seconds to activate the SPH01-LB/LS.
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 75.3 235 SPH01-LB/LS 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 75.8 246 (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:470px" %)
247 |=(% style="width: 60px;background-color:#4F81BD;color:white" %)(((
Xiaoling 67.9 248 **Size(bytes)**
Xiaoling 75.8 249 )))|=(% style="width: 30px;background-color:#4F81BD;color:white" %)**2**|=(% style="width: 70px;background-color:#4F81BD;color:white" %)**2**|=(% style="width: 50px;background-color:#4F81BD;color:white" %)**2**|=(% style="width: 60px;background-color:#4F81BD;color:white" %)**2**|=(% style="width: 70px;background-color:#4F81BD;color:white" %)**1**|=(% style="width: 50px;background-color:#4F81BD;color:white" %)**1**|=(% style="width: 80px;background-color:#4F81BD;color:white" %)**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 75.3 264 Check the battery voltage for SPH01-LB/LS.
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" %)
Xiaoling 75.8 332 |=(% style="width: 160px;background-color:#4F81BD;color:white" %)**Message Type Code**|=(% style="width: 163px;background-color:#4F81BD;color:white" %)**Description**|=(% style="width: 173px;background-color:#4F81BD;color:white" %)**Payload**
Xiaoling 67.9 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 67.9 337 === 2.3.7 Decode payload in The Things Network ===
Saxer Lin 55.1 338
Edwin Chen 1.1 339
Xiaoling 67.9 340 While using TTN network, you can add the payload format to decode the payload.
Edwin Chen 1.1 341
Xiaoling 67.15 342 [[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 343
Xiaoling 62.5 344 (((
Xiaoling 67.9 345 The payload decoder function for TTN is here:
Xiaoling 62.5 346 )))
Edwin Chen 1.1 347
Xiaoling 67.15 348 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 349
350
Xiaoling 67.15 351 == 2.4 Uplink Interval ==
Edwin Chen 1.1 352
353
Xiaoling 75.3 354 The SPH01-LB/LS 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 355
356
Xiaoling 62.5 357 == 2.5 Datalog Feature ==
Edwin Chen 1.1 358
Saxer Lin 51.1 359
Xiaoling 75.3 360 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/LS will store the reading for future retrieving purposes.
Xiaoling 62.5 361
362
363 === 2.5.1 Ways to get datalog via LoRaWAN ===
364
365
Xiaoling 75.3 366 Set PNACKMD=1, SPH01-LB/LS will wait for ACK for every uplink, when there is no LoRaWAN network, SPH01-LB/LS 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 367
368 * (((
Xiaoling 75.3 369 a) SPH01-LB/LS will do an ACK check for data records sending to make sure every data arrive server.
Xiaoling 62.5 370 )))
371 * (((
Xiaoling 75.3 372 b) SPH01-LB/LS will send data in **CONFIRMED Mode** when PNACKMD=1, but SPH01-LB/LS 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/LS gets a ACK, SPH01-LB/LS will consider there is a network connection and resend all NONE-ACK messages.
Xiaoling 62.5 373 )))
374
375 === 2.5.2 Unix TimeStamp ===
376
377
Xiaoling 75.3 378 SPH01-LB/LS uses Unix TimeStamp format based on
Xiaoling 62.5 379
380 [[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"]]
381
382 User can get this time from link:  [[https:~~/~~/www.epochconverter.com/>>url:https://www.epochconverter.com/]] :
383
384 Below is the converter example
385
386 [[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"]]
387
388
389 So, we can use AT+TIMESTAMP=1611889405 or downlink 3060137afd00 to set the current time 2021 – Jan ~-~- 29 Friday 03:03:25
390
391
392 === 2.5.3 Set Device Time ===
393
394
395 User need to set (% style="color:blue" %)**SYNCMOD=1**(%%) to enable sync time via MAC command.
396
Xiaoling 75.3 397 Once SPH01-LB/LS 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/LS. If SPH01-LB/LS fails to get the time from the server, SPH01-LB/LS 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 398
399 (% 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.**
400
Xiaoling 69.7 401
David Huang 69.1 402 === 2.5.4 Datalog Uplink payload (FPORT~=3) ===
Xiaoling 62.5 403
Xiaoling 69.7 404
David Huang 69.1 405 The Datalog uplinks will use below payload format.
Xiaoling 62.5 406
David Huang 69.1 407 **Retrieval data payload:**
Xiaoling 62.5 408
Xiaoling 69.7 409 (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:500px" %)
Xiaoling 75.8 410 |=(% style="width: 60px;background-color:#4F81BD;color:white" %)**Size(bytes)**|=(% style="width:30px;background-color:#4F81BD;color:white" %)**2**|=(% style="width: 80px;background-color:#4F81BD;color:white" %)**2**|=(% style="width: 120px;background-color:#4F81BD;color:white" %)**2**|=(% style="width: 90px;background-color:#4F81BD;color:white" %)**1**|=(% style="width: 120px;background-color:#4F81BD;color:white" %)**4**
Xiaoling 69.2 411 |(% style="width:95px" %)Value|(% style="width:220px" %)PH|(((
Xiaoling 69.7 412 Temperature
413 )))|DS18B20_Temperature|Level of PA8|Unix Time Stamp
David Huang 69.1 414
Xiaoling 69.6 415 (% style="color:blue" %)**Poll Message Flag**(%%): 1: This message is a poll message reply.
David Huang 69.1 416
417 * Poll Message Flag is set to 1.
418
419 * Each data entry is 11 bytes, to save airtime and battery, devices will send max bytes according to the current DR and Frequency bands.
420
421 For example, in US915 band, the max payload for different DR is:
422
Xiaoling 69.6 423 (% style="color:blue" %)**a) DR0:**(%%) max is 11 bytes so one entry of data
David Huang 69.1 424
Xiaoling 69.6 425 (% style="color:blue" %)**b) DR1:**(%%) max is 53 bytes so devices will upload 4 entries of data (total 44 bytes)
David Huang 69.1 426
Xiaoling 69.6 427 (% style="color:blue" %)**c) DR2:**(%%) total payload includes 11 entries of data
David Huang 69.1 428
Xiaoling 69.7 429 (% style="color:blue" %)**d) DR3: **(%%)total payload includes 22 entries of data.
David Huang 69.1 430
431 If devise doesn't have any data in the polling time. Device will uplink 11 bytes of 0   
432
Xiaoling 69.7 433
David Huang 69.1 434 **Example:**
435
Xiaoling 75.3 436 If SPH01-LB/LS has below data inside Flash:
David Huang 69.1 437
438 [[image:image-20230606170132-1.png]]
439
440 If user sends below downlink command: 31646D84E1646D856C05
441
442 Where : Start time: 646D84E1 = time 23/5/24 03:30:41
443
444 Stop time: 646D856C= time 23/5/24 03:33:00
445
Xiaoling 69.6 446
David Huang 69.1 447 === 2.5.5 Poll sensor value ===
448
449
Xiaoling 62.5 450 Users can poll sensor values based on timestamps. Below is the downlink command.
451
452 (% border="1" cellspacing="5" style="background-color:#f2f2f2; width:425.818px" %)
Xiaoling 75.12 453 |(% colspan="4" style="background-color:#4f81bd; color:white; width:423px" %)**Downlink Command to poll Open/Close status (0x31)**
Xiaoling 62.5 454 |(% style="width:58px" %)**1byte**|(% style="width:127px" %)**4bytes**|(% style="width:124px" %)**4bytes**|(% style="width:114px" %)**1byte**
455 |(% style="width:58px" %)31|(% style="width:127px" %)Timestamp start|(% style="width:124px" %)Timestamp end|(% style="width:114px" %)Uplink Interval
456
457 (((
458 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.
459 )))
460
461 (((
Xiaoling 64.8 462 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 463 )))
464
465 (((
466 Is to check 2021/11/12 12:00:00 to 2021/11/12 15:00:00's data
467 )))
468
469 (((
Xiaoling 75.3 470 Uplink Internal =5s,means SPH01-LB/LS will send one packet every 5s. range 5~~255s.
Xiaoling 62.5 471 )))
472
473
Xiaoling 67.16 474 == 2.6 Installation and Maintain ==
Edwin Chen 1.1 475
Xiaoling 67.16 476 === 2.6.1 Before measurement ===
Edwin Chen 1.1 477
478
Xiaoling 67.15 479 (((
Xiaoling 75.3 480 If the SPH01-LB/LS 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 481 )))
482
483
Xiaoling 67.16 484 === 2.6.2 Measurement ===
Xiaoling 67.15 485
486
487 (((
Xiaoling 67.28 488 (% style="color:blue" %)**Measurement the soil surface:**
Xiaoling 67.15 489 )))
490
491 (((
Xiaoling 67.26 492 [[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 493 )))
494
495 (((
496 Choose the proper measuring position. Split the surface soil according to the measured deep.
497 )))
498
499 (((
500 Put pure water, or rainwater to make the soil of measurement point to moist mud. Remove rocks or hard things.
501 )))
502
503 (((
504 Slowly insert the probe to the measure point. Don't use large force which will break the probe. Make sure not shake when inserting.
505 )))
506
507 (((
508 Put soil over the probe after insert. And start to measure.
509 )))
510
511
512 (((
Xiaoling 67.27 513 (% style="color:blue" %)**Measurement inside soil:**
Xiaoling 67.15 514 )))
515
516 (((
517 Dig a hole with diameter > 20CM.
518 )))
519
520 (((
521 Insert the probe inside, method like measure the surface.
522 )))
523
524
Xiaoling 67.16 525 === 2.6.3 Maintain Probe ===
Xiaoling 67.15 526
527
Xiaoling 67.28 528 (((
529 ~1. pH probe electrode is fragile and no strong. User must avoid strong force or hitting it.
Xiaoling 67.15 530 )))
Xiaoling 67.28 531
532 (((
533 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 534 )))
Xiaoling 67.28 535
536 (((
537 3. Probe reference electrode is also no strong, need to avoid strong force or hitting.
Xiaoling 67.15 538 )))
Xiaoling 67.28 539
540 (((
541 4. User should keep reference electrode wet while not use.
Xiaoling 67.15 542 )))
Xiaoling 67.28 543
544 (((
545 5. Avoid the probes to touch oily matter. Which will cause issue in accuracy.
Xiaoling 67.15 546 )))
Xiaoling 67.28 547
548 (((
549 6. The probe is IP68 can be put in water.
550
551
Xiaoling 67.15 552 )))
553
Xiaoling 67.16 554 == 2.7 Calibration ==
Xiaoling 67.15 555
556
Xiaoling 73.4 557 (% style="color:blue" %)**Step1 :**(%%)** Clean probe**
Xiaoling 73.2 558
Bei Jinggeng 73.1 559 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 560
Xiaoling 73.4 561 (% style="color:blue" %)**Step2 :**(%%)** Immerse the sensor in ph buffer solution to make the sensor values stable**
Bei Jinggeng 72.1 562
Xiaoling 67.15 563 (((
564 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 565
Xiaoling 73.3 566 (% 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 567
Bei Jinggeng 73.1 568
Xiaoling 73.4 569 (% style="color:blue" %)**Step3 :**(%%)** The numerically stable sensors were calibrated using commands**
Xiaoling 67.15 570 )))
571
572 (((
Bei Jinggeng 72.1 573 User can use below command to calibrate.
Xiaoling 67.15 574
Xiaoling 75.10 575 (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:520px" %)
Xiaoling 75.12 576 |(% style="background-color:#4f81bd; color:white; width:120px" %)**pH buffer solution**|(% style="background-color:#4f81bd; color:white; width:150px" %)**AT Command to calibrate**|(% style="background-color:#4f81bd; color:white; width:150px" %)**Downlink Command**|(% style="background-color:#4f81bd; color:white; width:100px" %)**Read Cal Value**
Xiaoling 67.15 577 |(% style="width:149px" %)4.00|(% style="width:197px" %)AT+PHCAL=4|(% style="width:206px" %)(((
578 0x13 04
579 Reply with Calibrate payload
580 )))|(% style="width:136px" %)(((
581 AT+PHCAL=?
582 Example 41,61,91
583 )))
584 |(% style="width:149px" %)6.86|(% style="width:197px" %)AT+PHCAL=6|(% style="width:206px" %)(((
585 0x13 06
586 Reply with Calibrate payload
587 )))|(% style="width:136px" %)AT+PHCAL=?
588 |(% style="width:149px" %)9.18|(% style="width:197px" %)AT+PHCAL=9|(% style="width:206px" %)(((
589 0x13 09
590 Reply with Calibrate payload
591 )))|(% style="width:136px" %)AT+PHCAL=?
592 |(% style="width:149px" %)Factory Default|(% style="width:197px" %)AT+PHCAL=15|(% style="width:206px" %)(((
593 0x13 15
594 Reply with Calibrate payload
595 )))|(% style="width:136px" %)(((
596 AT+PHCAL=?
597 Example 151
598 )))
599 )))
600
Bei Jinggeng 73.1 601 To use the AT COMMAND, refer to this link:
Xiaoling 67.15 602
Bei Jinggeng 73.1 603 * AT Command via Bluetooth Connection (**Recommended**): [[BLE Configure Instruction>>url:http://wiki.dragino.com/xwiki/bin/view/Main/BLE%20Bluetooth%20Remote%20Configure/]].
604
605 * 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]].
606
607 To use Downlink, take TTN as an example, please refer to this link:
608
609 * LoRaWAN Downlink.  Instruction for different platforms: See [[IoT LoRaWAN Server>>url:http://wiki.dragino.com/xwiki/bin/view/Main/]] section.
610
Bei Jinggeng 72.1 611 When the command is successfully used, the node sends a uplink.
612 This is the payload for uplink
613
Xiaoling 67.15 614 (% style="color:#037691" %)**Calibration Payload**
615
Xiaoling 75.8 616 (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:500px" %)
617 |=(% style="width: 60px;background-color:#4F81BD;color:white" %)(((
Xiaoling 67.15 618 **Size(bytes)**
Xiaoling 75.8 619 )))|=(% style="width: 100px;background-color:#4F81BD;color:white" %)**1**|=(% style="width: 100px;background-color:#4F81BD;color:white" %)**1**|=(% style="width: 100px;background-color:#4F81BD;color:white" %)**1**|=(% style="width: 50px;background-color:#4F81BD;color:white" %)**7**|=(% style="width: 90px;background-color:#4F81BD;color:white" %)**1**
Xiaoling 67.15 620 |Value|(((
621 PH4 Calibrate value
622 )))|PH6.86 Calibrate value|(((
623 PH9.18 Calibrate value
624 )))|Reserve|(((
625 [[Message Type>>||anchor="H2.3.6MessageType"]]
626 Always 0x03
627 )))
628
629 User can also send 0x14 downlink command to poll the current calibration payload.
630
631 (% border="1" cellspacing="5" style="background-color:#f2f2f2; width:480px" %)
Xiaoling 75.11 632 |=(% style="width: 183px; background-color:#4F81BD;color:white" %)**Downlink Control Type**|=(% style="width: 55px; background-color:#4F81BD;color:white" %)FPort|=(% style="width: 93px; background-color:#4F81BD;color:white" %)**Type Code**|=(% style="width: 146px; background-color:#4F81BD;color:white" %)**Downlink payload size(bytes)**
Xiaoling 67.15 633 |(% style="width:183px" %)Get Calibration Version Info|(% style="width:55px" %)Any|(% style="width:93px" %)14|(% style="width:146px" %)2
634
635 * Reply to the confirmation package: 14 01
Xiaoling 67.29 636
Xiaoling 67.15 637 * Reply to non-confirmed packet: 14 00
Xiaoling 67.16 638
Xiaoling 73.4 639 (% 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 640
Bei Jinggeng 73.1 641 Examples:
642 After using the command AT+PH=9 in 9.18ph buffer
643 The readout returned by the sensor in 9.18ph buffer should be pH=9
Bei Jinggeng 72.1 644
Bei Jinggeng 73.1 645
Xiaoling 67.16 646 == 2.8 Frequency Plans ==
647
648
Xiaoling 75.19 649 The SPH01-LB/LS uses OTAA mode and below frequency plans by default. Each frequency band use different firmware, user update the firmware to the corresponding band for their country.
Xiaoling 67.16 650
651 [[http:~~/~~/wiki.dragino.com/xwiki/bin/view/Main/End%20Device%20Frequency%20Band/>>http://wiki.dragino.com/xwiki/bin/view/Main/End%20Device%20Frequency%20Band/]]
652
653
Xiaoling 75.3 654 = 3. Configure SPH01-LB/LS =
Edwin Chen 1.1 655
kai 16.4 656 == 3.1 Configure Methods ==
Edwin Chen 1.1 657
658
Xiaoling 75.3 659 SPH01-LB/LS supports below configure method:
Edwin Chen 1.1 660
661 * AT Command via Bluetooth Connection (**Recommended**): [[BLE Configure Instruction>>http://wiki.dragino.com/xwiki/bin/view/Main/BLE%20Bluetooth%20Remote%20Configure/]].
Xiaoling 64.12 662
Edwin Chen 11.1 663 * 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 664
Edwin Chen 1.1 665 * LoRaWAN Downlink.  Instruction for different platforms: See [[IoT LoRaWAN Server>>http://wiki.dragino.com/xwiki/bin/view/Main/]] section.
666
667 == 3.2 General Commands ==
668
669
670 These commands are to configure:
671
672 * General system settings like: uplink interval.
Xiaoling 64.12 673
Edwin Chen 1.1 674 * LoRaWAN protocol & radio related command.
675
676 They are same for all Dragino Devices which support DLWS-005 LoRaWAN Stack. These commands can be found on the wiki:
677
678 [[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/]]
679
680
Xiaoling 75.3 681 == 3.3 Commands special design for SPH01-LB/LS ==
Edwin Chen 1.1 682
683
Xiaoling 75.3 684 These commands only valid for SPH01-LB/LS, as below:
Edwin Chen 1.1 685
686
687 === 3.3.1 Set Transmit Interval Time ===
688
689
Xiaoling 62.5 690 (((
Edwin Chen 1.1 691 Feature: Change LoRaWAN End Node Transmit Interval.
Xiaoling 62.5 692 )))
693
694 (((
Edwin Chen 1.1 695 (% style="color:blue" %)**AT Command: AT+TDC**
Xiaoling 62.5 696 )))
Edwin Chen 1.1 697
Xiaoling 14.34 698 (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:510px" %)
Xiaoling 75.10 699 |=(% style="width: 156px;background-color:#4F81BD;color:white" %)**Command Example**|=(% style="width: 137px;background-color:#4F81BD;color:white" %)**Function**|=(% style="background-color:#4F81BD;color:white" %)**Response**
Edwin Chen 1.1 700 |(% style="width:156px" %)AT+TDC=?|(% style="width:137px" %)Show current transmit Interval|(((
701 30000
702 OK
703 the interval is 30000ms = 30s
704 )))
705 |(% style="width:156px" %)AT+TDC=60000|(% style="width:137px" %)Set Transmit Interval|(((
706 OK
707 Set transmit interval to 60000ms = 60 seconds
708 )))
709
Xiaoling 62.5 710 (((
Edwin Chen 1.1 711 (% style="color:blue" %)**Downlink Command: 0x01**
Xiaoling 62.5 712 )))
Edwin Chen 1.1 713
Xiaoling 62.5 714 (((
Edwin Chen 1.1 715 Format: Command Code (0x01) followed by 3 bytes time value.
Xiaoling 62.5 716 )))
Edwin Chen 1.1 717
Xiaoling 62.5 718 (((
Edwin Chen 1.1 719 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 720 )))
Edwin Chen 1.1 721
Xiaoling 62.5 722 * (((
723 Example 1: Downlink Payload: 0100001E  ~/~/ Set Transmit Interval (TDC) = 30 seconds
724 )))
Xiaoling 64.13 725
Xiaoling 62.5 726 * (((
727 Example 2: Downlink Payload: 0100003C  ~/~/ Set Transmit Interval (TDC) = 60 seconds
Xiaoling 67.30 728
729
730
Xiaoling 62.5 731 )))
Edwin Chen 1.1 732
Xiaoling 67.20 733 === 3.3.2 Set Interrupt Mode ===
Xiaoling 62.5 734
735
Ellie Zhang 71.1 736 Feature, Set Interrupt mode for GPIO_EXTI of pin.
Xiaoling 62.5 737
Ellie Zhang 71.1 738 When AT+INTMOD=0 is set, GPIO_EXTI is used as a digital input port.
Xiaoling 62.5 739
Xiaoling 67.20 740 (% style="color:blue" %)**AT Command: AT+INTMOD**
Xiaoling 62.5 741
Xiaoling 67.20 742 (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:510px" %)
Xiaoling 75.8 743 |=(% style="width: 155px;background-color:#4F81BD;color:white" %)**Command Example**|=(% style="width: 197px;background-color:#4F81BD;color:white" %)**Function**|=(% style="width: 158px;background-color:#4F81BD;color:white" %)**Response**
Xiaoling 67.20 744 |(% style="width:154px" %)AT+INTMOD=?|(% style="width:196px" %)Show current interrupt mode|(% style="width:157px" %)(((
745 0
746 OK
747 the mode is 0 =Disable Interrupt
Xiaoling 62.5 748 )))
Xiaoling 67.20 749 |(% style="width:154px" %)AT+INTMOD=2|(% style="width:196px" %)(((
750 Set Transmit Interval
751 0. (Disable Interrupt),
752 ~1. (Trigger by rising and falling edge)
753 2. (Trigger by falling edge)
754 3. (Trigger by rising edge)
755 )))|(% style="width:157px" %)OK
Edwin Chen 1.1 756
Xiaoling 67.20 757 (% style="color:blue" %)**Downlink Command: 0x06**
Xiaoling 62.7 758
Xiaoling 67.20 759 Format: Command Code (0x06) followed by 3 bytes.
Edwin Chen 1.1 760
Xiaoling 67.20 761 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 762
Xiaoling 67.20 763 * Example 1: Downlink Payload: 06000000  ~/~/  Turn off interrupt mode
Edwin Chen 1.1 764
Xiaoling 67.20 765 * Example 2: Downlink Payload: 06000003  ~/~/  Set the interrupt mode to rising edge trigger
Xiaoling 62.7 766
Xiaoling 67.20 767 === 3.3.3 Calibrate Sensor ===
Edwin Chen 1.1 768
769
Xiaoling 67.20 770 Detail See [[Calibration Guide>>||anchor="H2.7Calibration"]] for the user of 0x13 and 0x14 downlink commands
Edwin Chen 1.1 771
772
Xiaoling 67.20 773 === 3.3.4 Get Firmware Version Info ===
Edwin Chen 1.1 774
Xiaoling 39.6 775
Xiaoling 67.20 776 Feature: use downlink to get firmware version.
Edwin Chen 1.1 777
Xiaoling 67.20 778 (% style="color:#037691" %)**Downlink Command: 0x26**
Edwin Chen 1.1 779
Xiaoling 75.10 780 (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:500px" %)
Xiaoling 75.12 781 |(% style="background-color:#4f81bd; color:white; width:193px" %)**Downlink Control Type**|(% style="background-color:#4f81bd; color:white; width:57px" %)**FPort**|(% style="background-color:#4f81bd; color:white; width:91px" %)**Type Code**|(% style="background-color:#4f81bd; color:white; width:159px" %)**Downlink payload size(bytes)**
Xiaoling 67.20 782 |(% style="width:193px" %)Get Firmware Version Info|(% style="width:57px" %)Any|(% style="width:91px" %)26|(% style="width:149px" %)2
Xiaoling 62.5 783
Xiaoling 67.20 784 * Reply to the confirmation package: 26 01
Xiaoling 67.29 785
Xiaoling 67.20 786 * Reply to non-confirmed packet: 26 00
Xiaoling 62.5 787
Xiaoling 67.20 788 Device will send an uplink after got this downlink command. With below payload:
Xiaoling 62.5 789
Xiaoling 67.20 790 Configures info payload:
Xiaoling 62.5 791
Xiaoling 71.3 792 (% border="1" cellspacing="4" style="background-color:#f2f2f2; width:470px" %)
Xiaoling 75.12 793 |(% style="background-color:#4f81bd; color:white; width:70px" %)**Size(bytes)**|(% style="background-color:#4f81bd; color:white; width:70px" %)**1**|(% style="background-color:#4f81bd; color:white; width:100px" %)**2**|(% style="background-color:#4f81bd; color:white; width:100px" %)**1**|(% style="background-color:#4f81bd; color:white; width:70px" %)**1**|(% style="background-color:#4f81bd; color:white; width:60px" %)**2**
Ellie Zhang 71.1 794 |Value|Sensor Model|Firmware Version|Frequency Band|Sub-band|BAT
Xiaoling 62.5 795
Xiaoling 75.3 796 (% style="color:#037691" %)**Software Type**(%%): Always 0x2C for SPH01-LB/LS
Xiaoling 62.5 797
Ellie Zhang 71.1 798 (% style="color:#037691" %)**Firmware Version**(%%): 0x0100, Means: v1.0.0 version
799
Xiaoling 67.20 800 (% style="color:#037691" %)**Frequency Band**:
Xiaoling 62.5 801
Xiaoling 71.4 802 0x01: EU868
Xiaoling 62.5 803
Xiaoling 71.4 804 0x02: US915
Xiaoling 62.5 805
Xiaoling 71.4 806 0x03: IN865
Xiaoling 62.5 807
Xiaoling 71.4 808 0x04: AU915
Xiaoling 62.5 809
Xiaoling 71.4 810 0x05: KZ865
Xiaoling 62.5 811
Xiaoling 71.4 812 0x06: RU864
Xiaoling 62.5 813
Xiaoling 71.4 814 0x07: AS923
Xiaoling 62.5 815
Xiaoling 71.4 816 0x08: AS923-1
Xiaoling 62.5 817
Xiaoling 71.4 818 0x09: AS923-2
Xiaoling 62.5 819
Xiaoling 71.4 820 0x0a: AS923-3
Xiaoling 62.5 821
Xiaoling 71.4 822 0x0b: CN470
Xiaoling 62.5 823
Xiaoling 71.4 824 0x0c: EU433
Xiaoling 62.5 825
Xiaoling 71.4 826 0x0d: KR920
Xiaoling 62.5 827
Xiaoling 71.4 828 0x0e: MA869
Xiaoling 62.6 829
Xiaoling 62.5 830
Ellie Zhang 71.1 831 (% style="color:#037691" %)**Sub-Band**(%%):
Xiaoling 62.5 832
Xiaoling 71.5 833 AU915 and US915: value 0x00 ~~ 0x08
Xiaoling 62.5 834
Xiaoling 71.5 835 CN470: value 0x0B ~~ 0x0C
836
837 Other Bands: Always 0x00
838
839
Ellie Zhang 71.1 840 (% style="color:#037691" %)**Battery Info**:
Edwin Chen 1.1 841
Ellie Zhang 71.1 842 Check the battery voltage.
Saxer Lin 46.1 843
Ellie Zhang 71.1 844 Ex1: 0x0B45 = 2885mV
Edwin Chen 1.1 845
Ellie Zhang 71.1 846 Ex2: 0x0B49 = 2889mV
Edwin Chen 1.1 847
848
kai 16.4 849 = 4. Battery & Power Consumption =
Xiaoling 14.45 850
Edwin Chen 1.1 851
Xiaoling 75.4 852 SPH01-LB use ER26500 + SPC1520 battery pack and SPH01-LS use 3000mAh Recharable Battery with Solar Panel. See below link for detail information about the battery info and how to replace.
Edwin Chen 1.1 853
854 [[**Battery Info & Power Consumption Analyze**>>http://wiki.dragino.com/xwiki/bin/view/Main/How%20to%20calculate%20the%20battery%20life%20of%20Dragino%20sensors%3F/]] .
855
856
kai 16.4 857 = 5. OTA Firmware update =
Edwin Chen 1.1 858
859
Edwin Chen 13.1 860 (% class="wikigeneratedid" %)
Xiaoling 75.3 861 User can change firmware SPH01-LB/LS to:
Edwin Chen 1.1 862
Edwin Chen 13.1 863 * Change Frequency band/ region.
Xiaoling 62.7 864
Edwin Chen 13.1 865 * Update with new features.
Xiaoling 62.7 866
Edwin Chen 13.1 867 * Fix bugs.
Edwin Chen 1.1 868
Xiaoling 69.11 869 Firmware and changelog can be downloaded from : **[[Firmware download link>>https://www.dropbox.com/sh/p1tiy43naiyy75u/AACzHWEGlYNeHDjMe2bkxotUa?dl=0]]**
Edwin Chen 1.1 870
kai 31.1 871 Methods to Update Firmware:
Edwin Chen 1.1 872
kai 31.1 873 * (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 874
Xiaoling 39.6 875 * 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 876
kai 31.1 877 = 6. FAQ =
Edwin Chen 1.1 878
Xiaoling 62.7 879 == 6.1  AT Commands input doesn't work ==
Edwin Chen 1.1 880
881
Xiaoling 62.7 882 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.
883
884
kai 31.1 885 = 7. Order Info =
Edwin Chen 1.1 886
887
Xiaoling 75.18 888 **Part Number: (% style="color:blue" %)SPH01-LB-XX(%%) or (% style="color:blue" %)SPH01-LS-XX(%%)**
Edwin Chen 1.1 889
Xiaoling 75.3 890 (% style="color:red" %)**XX**(%%): The default frequency band
Edwin Chen 1.1 891
Ellie Zhang 38.1 892 * (% style="color:red" %)**AS923**(%%): LoRaWAN AS923 band
Edwin Chen 1.1 893
Ellie Zhang 38.1 894 * (% style="color:red" %)**AU915**(%%): LoRaWAN AU915 band
Edwin Chen 1.1 895
Ellie Zhang 38.1 896 * (% style="color:red" %)**EU433**(%%): LoRaWAN EU433 band
Edwin Chen 1.1 897
Ellie Zhang 38.1 898 * (% style="color:red" %)**EU868**(%%): LoRaWAN EU868 band
Edwin Chen 1.1 899
Ellie Zhang 38.1 900 * (% style="color:red" %)**KR920**(%%): LoRaWAN KR920 band
Edwin Chen 1.1 901
Ellie Zhang 38.1 902 * (% style="color:red" %)**US915**(%%): LoRaWAN US915 band
Edwin Chen 1.1 903
Ellie Zhang 38.1 904 * (% style="color:red" %)**IN865**(%%): LoRaWAN IN865 band
Edwin Chen 1.1 905
Ellie Zhang 38.1 906 * (% style="color:red" %)**CN470**(%%): LoRaWAN CN470 band
Edwin Chen 1.1 907
kai 31.1 908 = 8. ​Packing Info =
Edwin Chen 1.1 909
Xiaoling 39.6 910
Ellie Zhang 39.1 911 (% style="color:#037691" %)**Package Includes**:
Edwin Chen 1.1 912
Xiaoling 75.3 913 * SPH01-LB or SPH01-LS LoRaWAN Soil Ph Sensor x 1
Edwin Chen 1.1 914
Ellie Zhang 39.1 915 (% style="color:#037691" %)**Dimension and weight**:
Edwin Chen 1.1 916
kai 31.1 917 * Device Size: cm
Edwin Chen 1.1 918
kai 31.1 919 * Device Weight: g
Edwin Chen 1.1 920
kai 31.1 921 * Package Size / pcs : cm
Edwin Chen 1.1 922
kai 31.1 923 * Weight / pcs : g
Edwin Chen 1.1 924
kai 31.1 925 = 9. Support =
Edwin Chen 1.1 926
927
kai 31.1 928 * 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 929
930 * 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