Hide last authors
Edwin Chen 1.1 1 {{box cssClass="floatinginfobox" title="**Contents**"}}
2 {{toc/}}
3 {{/box}}
4
Xiaoling 4.2 5 = **1. Overview** =
Edwin Chen 1.1 6
Xiaoling 6.1 7 (((
Edwin Chen 1.1 8 Shipped LT-22222-L is base on LoRaWAN protocol. We also develop a open source Point to Point LoRa protocol for LT-22222-L. The source code and hex file can be found at:
Xiaoling 6.1 9 )))
Edwin Chen 1.1 10
Xiaoling 6.1 11 (((
Edwin Chen 1.1 12 [[Point to Point Software for LT-22222-L>>https://github.com/dragino/LT-22222-L]].
Xiaoling 6.1 13 )))
Edwin Chen 1.1 14
15 == ==
16
Xiaoling 4.2 17 = **2. Features for this firmware** =
Edwin Chen 1.1 18
Xiaoling 4.2 19
Xiaoling 8.2 20 == **2.1  Point To Point** ==
Xiaoling 4.2 21
Xiaoling 12.2 22 === **2.1.1 Overview** ===
Xiaoling 8.1 23
Xiaoling 8.2 24 [[image:image-20220602111219-1.png||height="472" width="972"]]
Xiaoling 4.2 25
26
Xiaoling 12.2 27 === **2.2.2 Configure** ===
Xiaoling 4.2 28
Xiaoling 4.3 29 (% border="1" style="background-color:#f7faff; color:black; width:500px" %)
30 |=**A's configuration**|=**B's configuration**
31 |AT+GROUPMOD=0|AT+GROUPMOD=0
32 |AT+TXCHS=868700000|AT+TXCHS=869000000
33 |AT+RXCHS=869000000|AT+RXCHS=868700000
34 |AT+TRIG1=2,50|AT+TRIG1=2,50
35 |AT+TRIG2=2,50|AT+TRIG2=2,50
36 |AT+DI1TODO1=2|AT+DI1TODO1=2
37 |AT+DI1TORO1=2|AT+DI1TORO1=2
38 |AT+DI2TODO2=2 |AT+DI2TODO2=2
39 |AT+DI2TORO2=2|AT+DI2TORO2=2
Xiaoling 4.2 40
41
Xiaoling 7.1 42
Xiaoling 15.2 43 === **2.2.3 Serial port display** ===
Xiaoling 12.2 44
Xiaoling 15.2 45
Xiaoling 12.2 46 (% class="wikigeneratedid" %)
Xiaoling 4.2 47 [[image:image-20220602111219-2.png]]
48
49
Xiaoling 12.2 50 (% class="wikigeneratedid" %)
Xiaoling 4.2 51 [[image:image-20220602111219-3.png]]
52
Xiaoling 12.2 53 (% class="wikigeneratedid" %)
54 If the sender does not get the ACK reply from the receiver, it will retransmit up to 4 times, each interval is 6 seconds, and the UplinkCounter of the retransmission will not increase.
55
56
57 == **2.2  Point To Mult-Point ** ==
58
Xiaoling 15.2 59 === **2.2.1 Overview** ===
Xiaoling 12.2 60
61
Xiaoling 15.2 62 [[image:1654152390874-192.png]]
Xiaoling 12.2 63
64
Xiaoling 15.2 65 === **2.2.2  Configure** ===
66
67
68 (% style="color:#4f81bd" %)**Configuration of the TX group:**
69
70 AT+GROUPMOD=0,2
71
72 AT+TXCHS=868700000
73
74 AT+RXCHS=869000000
75
76 AT+TRIG1=2,50
77
78 AT+TRIG2=2,50
79
80 AT+DI1TODO1=1
81
82 AT+DI1TORO1=1
83
84 AT+DI2TODO2=1
85
86 AT+DI2TORO2=1
87
88
89 (% style="color:#4f81bd" %)**Configuration for RX group number 1:**
90
91 AT+GROUPMOD=1,1
92
93 AT+TXCHS=869000000
94
95 AT+RXCHS=868700000
96
97
98 (% style="color:#4f81bd" %)**Configuration for RX group number 2:**
99
100 AT+GROUPMOD=1,2
101
102 AT+TXCHS=869000000
103
104 AT+RXCHS=868700000
105
106
107 === **2.2.3 Serial port display** ===
108
109
110 [[image:image-20220602144747-1.png]]
111
112
113 [[image:image-20220602144747-2.png]]
114
Xiaoling 8.9 115 (((
Xiaoling 15.2 116 If the TX group does not receive all the ACK replies from the RX group, it will retransmit up to 4 times, each time interval is 30 seconds, and the retransmission UplinkCounter will not increase.
Xiaoling 8.9 117 )))
Xiaoling 4.2 118
Xiaoling 8.2 119
Xiaoling 15.2 120
121
Xiaoling 8.2 122 == **2.3 AT command** ==
123
124
Xiaoling 11.3 125 (((
Xiaoling 8.6 126 (% style="color:#037691" %)**ATZ** (%%)**: ** Trig a reset of the MCU
Xiaoling 11.3 127 )))
Xiaoling 8.2 128
Xiaoling 11.3 129 (((
Xiaoling 8.6 130 (% style="color:#037691" %)**AT+FDR** (%%)**:**  Reset Parameters to Factory Default, Keys Reserve
Xiaoling 11.3 131 )))
Xiaoling 8.2 132
Xiaoling 11.3 133 (((
Xiaoling 8.6 134 (% style="color:#037691" %)**AT+FCU** (%%)**:**  Get or Set the Frame Counter Uplink
Xiaoling 11.3 135 )))
Xiaoling 8.2 136
Xiaoling 11.3 137 (((
Xiaoling 8.6 138 (% style="color:#037691" %)**AT+FCD** (%%)**:**  Get or Set the Frame Counter Downlink
Xiaoling 11.3 139 )))
Xiaoling 8.2 140
Xiaoling 11.3 141 (((
Xiaoling 8.6 142 (% style="color:#037691" %)**AT+TXP** (%%)**:**  Get or Set the transmit power, the maximum is 20dBm (default is 14dBm)
Xiaoling 11.3 143 )))
Xiaoling 8.2 144
Xiaoling 11.3 145 (((
Xiaoling 8.8 146 (% style="color:#037691" %)**AT+SYNC** (%%)**:**  Get or Set the Sync word [1:0x34,0:0x12] (default is 1)
Xiaoling 11.3 147 )))
Xiaoling 8.2 148
Xiaoling 11.3 149 (((
Xiaoling 8.7 150 (% style="color:#037691" %)**AT+PMB** (%%)**:    **Get or Set the preamble (default:8)
Xiaoling 11.3 151 )))
Xiaoling 8.2 152
Xiaoling 11.3 153 (((
Xiaoling 8.6 154 (% style="color:#037691" %)**AT+TXCHS **(%%)**:** Get or Set the transmit frequency of TX (default:868700000)
Xiaoling 11.3 155 )))
Xiaoling 8.2 156
Xiaoling 11.3 157 (((
Xiaoling 8.6 158 (% style="color:#037691" %)**AT+TXSF **(%%)**:**  Get or Set the spreading factor of TX (7 to 12) (default:12)
Xiaoling 11.3 159 )))
Xiaoling 8.2 160
Xiaoling 11.3 161 (((
Xiaoling 8.6 162 (% style="color:#037691" %)**AT+RXCHS **(%%)**:** Get or Set the transmit frequency of RX (default:869000000)
Xiaoling 11.3 163 )))
Xiaoling 8.2 164
Xiaoling 11.3 165 (((
Xiaoling 8.6 166 (% style="color:#037691" %)**AT+RXSF **(%%)**:**  Get or Set the spreading factor of RX (7 to 12) (default:12)
Xiaoling 11.3 167 )))
Xiaoling 8.2 168
Xiaoling 11.3 169 (((
Xiaoling 9.2 170 (% style="color:#037691" %)**AT+BW **(%%)**:       **Get or Set the bandwidth [0:125khz,1:250khz,2:500khz] (default:0)
Xiaoling 11.3 171 )))
Xiaoling 8.2 172
Xiaoling 11.3 173 (((
Xiaoling 8.7 174 (% style="color:#037691" %)**AT+CR **(%%)**:        **Get or Set the coding rate [1: 4/5, 2: 4/6, 3: 4/7, 4: 4/8] (default:1)
Xiaoling 11.3 175 )))
Xiaoling 8.2 176
Xiaoling 11.3 177 (((
Xiaoling 8.6 178 (% style="color:#037691" %)**AT+TDC **(%%)**:**  Get or set the application data transmission interval in ms(default 10 minutes)
Xiaoling 11.3 179 )))
Xiaoling 8.2 180
Xiaoling 11.3 181 (((
Xiaoling 8.8 182 (% style="color:#037691" %)**AT+VER **(%%)**:**  Get firmware version number
Xiaoling 11.3 183 )))
Xiaoling 8.2 184
Xiaoling 11.3 185 (((
Xiaoling 9.2 186 (% style="color:#037691" %)**AT+SEND **(%%)**:   **Set Custom sent hex data
Xiaoling 11.3 187 )))
Xiaoling 8.2 188
Xiaoling 11.3 189 (((
Xiaoling 8.6 190 (% style="color:#037691" %)**AT+GROUPMOD **(%%)**: **Set or Get the grouping mode of the device (default: 0)
Xiaoling 11.3 191 )))
Xiaoling 8.2 192
Xiaoling 11.1 193 (((
Xiaoling 11.3 194 (((
Xiaoling 8.7 195 (% style="color:#037691" %)**AT+GROUPID **(%%)**:      **Set or Get the password for matching between TX group and RX group, which can be composed of numbers or characters (default: 12345678)
Xiaoling 11.1 196 )))
Xiaoling 11.3 197 )))
Xiaoling 8.2 198
Xiaoling 11.3 199 (((
Xiaoling 8.6 200 (% style="color:#037691" %)**AT+TRIG1 **(%%)**:**  Set or Get the DI1 pin interrupt trigger mode (default 0,0)
Xiaoling 11.3 201 )))
Xiaoling 8.2 202
Xiaoling 11.3 203 (((
Xiaoling 8.7 204 (% style="color:#037691" %)**AT+TRIG2 **(%%)**:            **Set or Get the DI2 pin interrupt trigger mode (default 0,0)
Xiaoling 11.3 205 )))
Xiaoling 8.2 206
Xiaoling 11.3 207 (((
Xiaoling 8.7 208 (% style="color:#037691" %)**AT+DI1TODO1 **(%%)**:    **Set or get the mode in which DI1 maps to DO1 (default 0)
Xiaoling 11.3 209 )))
Xiaoling 8.2 210
Xiaoling 11.3 211 (((
Xiaoling 8.7 212 (% style="color:#037691" %)**AT+DI1TORO1 **(%%)**:    **Set or get the mode in which DI1 maps to RO1(default 0)
Xiaoling 11.3 213 )))
Xiaoling 8.2 214
Xiaoling 11.3 215 (((
Xiaoling 8.6 216 (% style="color:#037691" %)**AT+DI2TODO2 **(%%)**:**  Set or get the mode in which DI2 maps to DO2(default 0)
Xiaoling 11.3 217 )))
Xiaoling 8.2 218
Xiaoling 11.3 219 (((
Xiaoling 8.7 220 (% style="color:#037691" %)**AT+DI2TORO2 **(%%)**:    **Set or get the mode in which DI2 maps to RO2(default 0)
Xiaoling 11.3 221 )))
Xiaoling 8.2 222
Xiaoling 11.3 223 (((
224
225 )))
Xiaoling 8.2 226
Xiaoling 11.3 227 (((
228
229 )))
Xiaoling 8.2 230
Xiaoling 11.3 231 (((
Xiaoling 8.7 232 (% style="color:#4f81bd" %)**Example 1:**
Xiaoling 11.3 233 )))
Xiaoling 8.2 234
Xiaoling 11.3 235 (((
Xiaoling 8.7 236 **AT+SEND=01020304 **will send a payload of 01020304
Xiaoling 11.3 237 )))
Xiaoling 8.2 238
Xiaoling 11.3 239 (((
240
241 )))
Xiaoling 8.2 242
Xiaoling 11.3 243 (((
Xiaoling 8.7 244 (% style="color:#4f81bd" %)**Example 2: **
Xiaoling 11.3 245 )))
Xiaoling 8.2 246
Xiaoling 11.3 247 (((
Xiaoling 8.8 248 **AT+TRIGx=a    **Trigger directly without triggering time
Xiaoling 11.3 249 )))
Xiaoling 8.2 250
Xiaoling 11.3 251 (((
Xiaoling 8.7 252 **AT+TRIGx=a,b**
Xiaoling 11.3 253 )))
Xiaoling 8.2 254
Xiaoling 11.3 255 (((
Xiaoling 8.7 256 a=0: falling edge;
Xiaoling 11.3 257 )))
Xiaoling 8.2 258
Xiaoling 11.3 259 (((
Xiaoling 8.7 260 a=1: rising edge;
Xiaoling 11.3 261 )))
Xiaoling 8.2 262
Xiaoling 11.3 263 (((
Xiaoling 8.7 264 a=2: falling edge or rising edge;
Xiaoling 11.3 265 )))
Xiaoling 8.2 266
Xiaoling 11.3 267 (((
Xiaoling 8.7 268 b:  triggering time in milliseconds.
Xiaoling 11.3 269 )))
Xiaoling 8.2 270
Xiaoling 11.3 271 (((
Xiaoling 8.7 272 AT+TRIGx=2,50  Falling edge or rising edge trigger, and the trigger time exceeds 50ms.
Xiaoling 11.3 273 )))
Xiaoling 8.2 274
Xiaoling 11.3 275 (((
276
277 )))
Xiaoling 8.2 278
Xiaoling 11.3 279 (((
Xiaoling 8.7 280 (% style="color:#4f81bd" %)**Example 3: **
Xiaoling 11.3 281 )))
Xiaoling 8.2 282
Xiaoling 11.3 283 (((
Xiaoling 8.7 284 **AT+DI1TODO1= maps value**
Xiaoling 11.3 285 )))
Xiaoling 8.2 286
Xiaoling 11.3 287 (((
Xiaoling 8.7 288 **AT+DI1TORO1= maps value**
Xiaoling 11.3 289 )))
Xiaoling 8.2 290
Xiaoling 11.3 291 (((
Xiaoling 8.7 292 **AT+DI2TODO2= maps value**
Xiaoling 11.3 293 )))
Xiaoling 8.2 294
Xiaoling 11.3 295 (((
Xiaoling 8.7 296 **AT+DI2TORO2= maps value**
Xiaoling 11.3 297 )))
Xiaoling 8.7 298
Xiaoling 11.3 299 (((
300
301 )))
Xiaoling 8.7 302
Xiaoling 8.4 303 (% border="1" style="background-color:#f7faff; color:black; width:706px" %)
Xiaoling 11.3 304 |=(% style="width: 102px;" %)(((
305 Maps value
306 )))|=(% style="width: 331px;" %)(((
307 DIx to DOx
308 )))|=(% style="width: 268px;" %)(((
309 DIx to ROx
310 )))
311 |(% style="width:102px" %)(((
312 0
313 )))|(% style="width:331px" %)(((
314 No Action
315 )))|(% style="width:268px" %)(((
316 No Action
317 )))
318 |(% style="width:102px" %)(((
319 1
320 )))|(% style="width:331px" %)(((
321 If DIx is high, control DOx to output low level, If DIx is low, control DOx to output high level
322 )))|(% style="width:268px" %)(((
323 (((
Xiaoling 8.2 324 If DIx is high, control ROx to close,
Xiaoling 11.3 325 )))
Xiaoling 8.2 326
Xiaoling 11.3 327 (((
Xiaoling 8.2 328 if DIx is low, control ROx to open
329 )))
Xiaoling 11.3 330 )))
331 |(% style="width:102px" %)(((
332 2
333 )))|(% style="width:331px" %)(((
334 If DIx is high, control DOx to output high level, If DIx is low, control DOx to output low level
335 )))|(% style="width:268px" %)(((
336 (((
Xiaoling 8.2 337 If DIx is high, control ROx to open,
Xiaoling 11.3 338 )))
Xiaoling 8.2 339
Xiaoling 11.3 340 (((
Xiaoling 8.2 341 if DIx is low, control ROx to close
342 )))
Xiaoling 11.3 343 )))
344 |(% style="width:102px" %)(((
345 3
346 )))|(% style="width:331px" %)(((
347 DOx state flip
348 )))|(% style="width:268px" %)(((
349 ROx state flip
350 )))
Xiaoling 8.2 351
Xiaoling 11.3 352 (((
Xiaoling 8.7 353 (% style="color:#4f81bd" %)**Example 4: **
Xiaoling 11.3 354 )))
Xiaoling 8.2 355
Xiaoling 11.3 356 (((
Xiaoling 8.7 357 **AT+GROUPMOD=0**  Set to point to point mode
Xiaoling 11.3 358 )))
Xiaoling 8.2 359
Xiaoling 11.3 360 (((
Xiaoling 8.7 361 **AT+GROUPMOD=0,aa**  Set the TX group that controls the number of aa (The maximum value of aa is 8)
Xiaoling 11.3 362 )))
Xiaoling 8.2 363
Xiaoling 11.1 364 (((
Xiaoling 11.3 365 (((
Xiaoling 8.7 366 **AT+GROUPMOD=1,bb**  Set to the RX group controlled by the TX group, numbered bb(The maximum value of aa is 8)
Xiaoling 11.1 367 )))
Xiaoling 11.3 368 )))
Xiaoling 8.2 369
Xiaoling 11.3 370 (((
Xiaoling 8.7 371 **AT+GROUPMOD=0,2**  Set to control the TX group of the two RX groups
Xiaoling 11.3 372 )))
Xiaoling 8.2 373
Xiaoling 11.3 374 (((
Xiaoling 8.7 375 **AT+GROUPMOD=1,1**  Set the RX group numbered 1
Xiaoling 11.3 376 )))
Xiaoling 8.2 377
Xiaoling 11.3 378 (((
Xiaoling 8.7 379 **AT+GROUPMOD=1,2**  Set the RX group numbered 2
Xiaoling 11.3 380 )))
Xiaoling 8.2 381
382
383 == **2.4 Data Format** ==
384
Xiaoling 11.3 385 (((
Xiaoling 8.2 386 8 bytes of GROUPID + 9 bytes of payload + 4 bytes of checksum
Xiaoling 11.3 387 )))
Xiaoling 8.2 388
Xiaoling 11.3 389 (((
390
391 )))
Xiaoling 8.2 392
Xiaoling 11.3 393 (((
Xiaoling 8.8 394 (% style="color:#4f81bd" %)**Payload:**
Xiaoling 11.3 395 )))
Xiaoling 8.2 396
Xiaoling 8.4 397 (% border="1" style="background-color:#f7faff; color:black; width:938px" %)
Xiaoling 11.3 398 |=(% style="width: 123px;" %)(((
399 **Size (bytes)**
400 )))|=(% style="width: 107px;" %)(((
401 1
402 )))|=(% style="width: 107px;" %)(((
403 1
404 )))|=(% style="width: 107px;" %)(((
405 1
406 )))|=(% style="width: 107px;" %)(((
407 1
408 )))|=(% style="width: 107px;" %)(((
409 1
410 )))|=(% style="width: 107px;" %)(((
411 1
412 )))|=(% style="width: 107px;" %)(((
413 1
414 )))|=(% style="width: 107px;" %)(((
415 1
416 )))|=(% style="width: 107px;" %)(((
417 1
418 )))
419 |(% style="width:123px" %)(((
420 **Value**
421 )))|(% style="width:38px" %)(((
422 address
423 )))|(% style="width:70px" %)(((
424 request
425 )))|(% style="width:52px" %)(((
426 ACK
427 )))|(% style="width:127px" %)(((
428 (((
Xiaoling 8.2 429 DI1&
Xiaoling 11.3 430 )))
Xiaoling 8.2 431
Xiaoling 11.3 432 (((
Xiaoling 8.2 433 DI1 level
Xiaoling 11.3 434 )))
435 )))|(% style="width:101px" %)(((
436 DI1TODO1
437 )))|(% style="width:91px" %)(((
438 DI1TORO1
439 )))|(% style="width:111px" %)(((
440 (((
Xiaoling 8.2 441 DI2&
Xiaoling 11.3 442 )))
Xiaoling 8.2 443
Xiaoling 11.3 444 (((
Xiaoling 8.2 445 DI2 level
Xiaoling 11.3 446 )))
447 )))|(% style="width:105px" %)(((
448 DI2TODO2
449 )))|(% style="width:106px" %)(((
450 DI2TORO2
451 )))
Xiaoling 8.2 452
Xiaoling 11.3 453 (((
Xiaoling 8.5 454 (% style="color:#037691" %)**The first byte**(%%)**:**  00 is the broadcast address, 01-08 is the RX group number.
Xiaoling 11.3 455 )))
Xiaoling 8.2 456
Xiaoling 11.3 457 (((
Xiaoling 8.5 458 (% style="color:#037691" %)**The second byte**(%%)**:**  send mapping request when not 0, not request when it is 0.
Xiaoling 11.3 459 )))
Xiaoling 8.2 460
Xiaoling 11.3 461 (((
Xiaoling 8.5 462 (% style="color:#037691" %)**The third byte**(%%)**:**  ACK returned to the sender after the mapping is completed.
Xiaoling 11.3 463 )))
Xiaoling 8.2 464
Xiaoling 11.1 465 (((
Xiaoling 11.3 466 (((
Xiaoling 8.5 467 (% style="color:#037691" %)**The fourth byte**(%%)**:**  the high four bits are 1 to represent DI1, and the low four bits are the level of DI1 when the interrupt is triggered.
Xiaoling 11.1 468 )))
Xiaoling 11.3 469 )))
Xiaoling 8.2 470
Xiaoling 11.3 471 (((
Xiaoling 8.6 472 (% style="color:#037691" %)**The Fifth byte**(%%)**:       **DI1TODO1 when the interrupt is triggered, 0 when the interrupt is not triggered.
Xiaoling 11.3 473 )))
Xiaoling 8.2 474
Xiaoling 11.3 475 (((
Xiaoling 8.5 476 (% style="color:#037691" %)**The Sixth byte**(%%)**:**  0 does not trigger interrupt when DI1TORO1 interrupt is triggered.
Xiaoling 11.3 477 )))
Xiaoling 8.2 478
Xiaoling 11.1 479 (((
Xiaoling 11.3 480 (((
Xiaoling 8.5 481 (% style="color:#037691" %)**The seventh byte**(%%)**:**  the high four bits are 2 to represent DI2, and the low four bits are the level of DI2 when the interrupt is triggered.
Xiaoling 11.1 482 )))
Xiaoling 11.3 483 )))
Xiaoling 8.2 484
Xiaoling 11.3 485 (((
Xiaoling 8.6 486 (% style="color:#037691" %)**The 8th byte**(%%)**:          **DI2TODO2 when the interrupt is triggered, 0 when the interrupt is not triggered.
Xiaoling 11.3 487 )))
Xiaoling 8.2 488
Xiaoling 11.3 489 (((
Xiaoling 8.5 490 (% style="color:#037691" %)**The 9th byte**(%%)**:**  DI2TORO2 when an interrupt is triggered, 0 when an interrupt is not triggered.
Xiaoling 11.3 491 )))
Xiaoling 8.2 492
Edwin Chen 1.1 493
Copyright ©2010-2024 Dragino Technology Co., LTD. All rights reserved
Dragino Wiki v2.0