Hide last authors
Xiaoling 7.5 1 (% class="wikigeneratedid" %)
2 **Table of Contents:**
Edwin Chen 1.1 3
Xiaoling 7.5 4 {{toc/}}
Xiaoling 7.4 5
Xiaoling 7.5 6
7
8 = 1.  Overview =
9
10
Edwin Chen 1.1 11 This instruction is for how to use Peer to Peer firmware in LA66.
12
13
14
Xiaoling 7.5 15 = 2.  Firmware Location =
Xiaoling 7.4 16
Xiaoling 7.5 17
Edwin Chen 1.1 18 Click[[ here>>https://www.dropbox.com/sh/dq03kkfdrqnhy66/AACpHIcKYMa4o1IySKtVoeENa?dl=0]] to download the firmware and update it to LA66 according to the instruction for different boards.
19
20
Xiaoling 7.5 21
Xiaoling 7.4 22 = 3.  How to use? =
Edwin Chen 2.1 23
24
Xiaoling 7.5 25 == 3.1  AT command ==
Xiaoling 7.2 26
27
Xiaoling 7.4 28 (% style="color:blue" %)**1). Lora parameter configuration:**
Xiaoling 7.2 29
30
Xiaoling 7.4 31 AT+FRE:  Get or Set TX and RX frequency
Xiaoling 7.2 32
Xiaoling 7.4 33 AT+BW:  Get or Set TX and RX BandWidth
Xiaoling 7.2 34
Xiaoling 7.4 35 AT+SF:  Get or Set TX and RX Spreading Factor
Xiaoling 7.2 36
Xiaoling 7.4 37 AT+POWER:  Get or Set Tx Power Range
Xiaoling 7.2 38
Xiaoling 7.4 39 AT+CRC:  Get or Set TX and RX CRC Type
Xiaoling 7.2 40
Xiaoling 7.4 41 AT+HEADER:  Get or Set TX and RX Header Type
Xiaoling 7.2 42
Xiaoling 7.4 43 AT+CR:  Get or Set TX and RX Header Type
Xiaoling 7.2 44
Xiaoling 7.16 45 AT+IQ:  Get or Set TX and RX InvertIQ
Xiaoling 7.2 46
Xiaoling 7.4 47 AT+PREAMBLE:  Get or Set TX and RX Preamble Length
Xiaoling 7.2 48
Xiaoling 7.4 49 AT+SYNCWORD:  Get or Set sync word
Xiaoling 7.2 50
51
52
Xiaoling 7.4 53 (% style="color:blue" %)**2). General configuration:**
Xiaoling 7.2 54
55
Xiaoling 7.4 56 ATZ:  Trig a reset of the MCU
Xiaoling 7.2 57
Xiaoling 7.4 58 AT+FDR:  Reset Parameters to Factory Default
Xiaoling 7.2 59
Xiaoling 7.4 60 AT+CFG:  Print all configurations
Xiaoling 7.2 61
Xiaoling 7.4 62 AT+FCU:  Get or Set the Frame Counter Uplink
Xiaoling 7.2 63
Xiaoling 7.4 64 AT+FCD:  Get or Set the Frame Counter Downlink
Xiaoling 7.2 65
Xiaoling 7.4 66 AT+GROUPMOD:  Get or Set TX and RX group
Xiaoling 7.2 67
Xiaoling 7.4 68 AT+RXMOD:  Get or Set Rx Timeout and Reply mode
Xiaoling 7.2 69
Xiaoling 7.4 70 AT+SEND:  Send text data or hex along with the application port and confirm status
Xiaoling 7.2 71
Xiaoling 7.4 72 AT+RECV:  Print last receive message, RSSI and SNR
Xiaoling 7.2 73
74
75
Xiaoling 7.4 76 == 3.2  Serial port information ==
77
78
79 (% style="color:blue" %)**1). Information initialized at reset:**
80
Xiaoling 7.2 81 [[image:image-20220926112125-1.png]]
82
83
Xiaoling 7.4 84 (% style="color:blue" %)**2). In retransmission, the Uplinkcounter does not accumulate. The following figure shows that the third count packet is retransmitted twice when the ACK packet is not received.**
Xiaoling 7.2 85
86
87 [[image:image-20220926112125-2.png]]
88
89
Xiaoling 7.4 90 (% style="color:blue" %)**3). In the figure below, the receiver sends an ACK to the sender after receiving the packet, and the sender stops retransmission after receiving the ACK.**
Xiaoling 7.2 91
92
Xiaoling 7.3 93 (% style="color:red" %)**Receiver: (configured as AT+RXMOD=65535,2)**
Xiaoling 7.2 94
95 [[image:image-20220926112125-3.png]]
96
97
98
Xiaoling 7.3 99 (% style="color:red" %)**Sender:**
Xiaoling 7.2 100
101 [[image:image-20220926112125-4.png]]
102
103
104
Xiaoling 7.5 105 == 3.3  Data Format ==
Xiaoling 7.2 106
107
Bei Jinggeng 8.1 108 1 byte of TXGROUPMOD +n payload
Xiaoling 7.2 109
110
111 Payload(S12, SF11, SF10 maximum length is 59, SF9 maximum length is 123, SF8, SF7 maximum length is 230):
112
113 (% border="1" style="background-color:#ffffcc; color:green; width:316px" %)
Xiaoling 7.16 114 |=(% style="width: 105px;" %)**Size (bytes)**|=(% style="width: 109px;" %)** 1**|=(% style="width: 99px;" %)**payloadsize**
Xiaoling 7.2 115 |(% style="width:105px" %)**Value**|(% style="width:109px" %)TXGroupmod|(% style="width:99px" %)Send data
116
Xiaoling 7.16 117
118
Xiaoling 7.5 119 = 4.  AT Command Set =
Xiaoling 7.2 120
Edwin Chen 2.1 121
Xiaoling 7.4 122 == 4.1  Set TX and RX Bandwidth ==
Edwin Chen 2.1 123
Edwin Chen 3.1 124
Xiaoling 7.15 125 **Set TX and RX BandWidth (0 ~~ 9), (% style="color:blue" %)AT Command :  AT+BW(%%)**
Edwin Chen 3.1 126
Xiaoling 7.15 127 0:  125 kHz
Edwin Chen 3.1 128
Xiaoling 7.4 129 1:  250 kHz
Xiaoling 7.15 130
Xiaoling 7.4 131 2:  500 kHz
Xiaoling 7.15 132
Xiaoling 7.4 133 3:  62.5 kHz
Xiaoling 7.15 134
Xiaoling 7.4 135 4:  41.67 kHz
Xiaoling 7.15 136
Xiaoling 7.4 137 5:  31.25 kHz
Xiaoling 7.15 138
Xiaoling 7.4 139 6:  20.83 kHz
Xiaoling 7.15 140
Xiaoling 7.4 141 7:  15.63 kHz
Xiaoling 7.15 142
Xiaoling 7.4 143 8:  10.42 kHz
Edwin Chen 3.1 144
Xiaoling 7.15 145 9:  7.81 kHz
Edwin Chen 3.1 146
Xiaoling 7.15 147
Xiaoling 7.4 148 (% style="color:red" %)**Default Value: AT+BW=0,0**  (%%) ~/~/  BandWidth: 125kHz ,125kHz
149
150 (% style="color:red" %)**Range: (0 ~~ 9)**
151
152
Xiaoling 7.6 153
154 == 4.2  Set TX and RX frequency ==
155
156
Xiaoling 7.15 157 **Set TX and RX frequency (MHz), (% style="color:blue" %)AT Command :  AT+FRE(%%)**
Xiaoling 7.6 158
Xiaoling 7.15 159
Xiaoling 7.6 160 (% style="color:red" %)**Default Value: AT+FRE=868.100,868.100**  (%%) ~/~/  Frequency: 868.100MHz, 868.100MHz
161
162
163
164 == 4.3  Set TX and RX Spreading Factor ==
165
166
Xiaoling 7.15 167 **Set TX and RX Spreading Factor ( 5 ~~ 12), (% style="color:blue" %)AT Command : AT+SF(%%)**
Xiaoling 7.6 168
Xiaoling 7.15 169
Xiaoling 7.6 170 (% style="color:red" %)**Default Value: AT+SF=12,12**  (%%) ~/~/  Spreading Factor : 12,12
171
172 (% style="color:red" %)**Range: (5 ~~ 12)**
173
174
Xiaoling 7.15 175
Xiaoling 7.6 176 == 4.4  Set Tx Power Range ==
177
Xiaoling 7.7 178
Xiaoling 7.15 179 **Set Tx Power Range( 0 ~~ 22 dBm), (% style="color:blue" %)AT Command : AT+POWER(%%)**
Xiaoling 7.6 180
Xiaoling 7.15 181
Xiaoling 7.7 182 (% style="color:red" %)**Default Value: AT+POWER=20**  (%%) ~/~/  Output Power: 20dBm
Xiaoling 7.6 183
Xiaoling 7.7 184 (% style="color:red" %)**Range: (0 ~~ 22)**
Xiaoling 7.6 185
186
Xiaoling 7.8 187
Xiaoling 7.7 188 == 4.5  Set TX and RX Coding Rate ==
Xiaoling 7.6 189
190
Xiaoling 7.15 191 **Set TX and RX Coding Rate ( 1 ~~ 4 ), (% style="color:blue" %)AT Command :AT+CR(%%)**
Xiaoling 7.6 192
Xiaoling 7.7 193 1: 4/5
Xiaoling 7.15 194
Xiaoling 7.7 195 2: 4/6
Xiaoling 7.15 196
Xiaoling 7.7 197 3: 4/7
Xiaoling 7.15 198
Xiaoling 7.7 199 4: 4/8
Xiaoling 7.6 200
Xiaoling 7.15 201
Xiaoling 7.7 202 (% style="color:red" %)**Default Value: AT+CR=1,1**  (%%) ~/~/  Coding Rate: 4/5, 4/5
Xiaoling 7.6 203
Xiaoling 7.7 204 (% style="color:red" %)**Range: (1 ~~ 4)**
Xiaoling 7.6 205
206
207
Xiaoling 7.8 208 == 4.6  Set TX and RX Header Type ==
Xiaoling 7.6 209
210
Xiaoling 7.15 211 **Set TX and RX Header Type ( 0,1 ), (% style="color:blue" %)AT Command : AT+HEADER(%%)**
Xiaoling 7.6 212
Xiaoling 7.8 213 0: Variable length packet (explicit header)
Xiaoling 7.15 214
Xiaoling 7.8 215 1: Fixed length packet (implicit header)
Xiaoling 7.6 216
Xiaoling 7.15 217
Xiaoling 7.8 218 (% style="color:red" %)**Default Value: AT+HEADER=1,1**  (%%) ~/~/  Header Type: explicit, explicit
Xiaoling 7.6 219
Xiaoling 7.8 220 (% style="color:red" %)**Range: (0 ~~ 1)**
Xiaoling 7.6 221
222
223
Xiaoling 7.9 224 == 4.7  Set TX and RX CRC Type ==
Xiaoling 7.6 225
226
Xiaoling 7.15 227 **Set TX and RX CRC Type ( 0,1) ,(% style="color:blue" %)AT Command:AT+CRC(%%)**
228
Xiaoling 7.9 229 0: CRC OFF
Xiaoling 7.15 230
Xiaoling 7.9 231 1: CRC ON
Xiaoling 7.6 232
Xiaoling 7.15 233
Xiaoling 7.9 234 (% style="color:red" %)**Default Value: AT+CRC=0,0**  (%%) ~/~/  CRC: OFF, OFF
Xiaoling 7.6 235
Xiaoling 7.9 236 (% style="color:red" %)**Range: (0 ~~ 1)**
Xiaoling 7.6 237
238
239
Xiaoling 7.10 240 == 4.8  Set TX and RX InvertIQ ==
Xiaoling 7.6 241
242
Xiaoling 7.15 243 **Set TX and RX InvertIQ ( 0,1) , (% style="color:blue" %)AT Command:AT+IQ(%%)**
244
Xiaoling 7.9 245 0: Standard IQ setup
Xiaoling 7.15 246
Xiaoling 7.9 247 1: Inverted IQ setup
Xiaoling 7.7 248
Xiaoling 7.15 249
Xiaoling 7.9 250 (% style="color:red" %)**Default Value: AT+IQ=0,0**  (%%) ~/~/  Invert IQ: 0,0
Xiaoling 7.7 251
Xiaoling 7.9 252 (% style="color:red" %)**Range: (0 ~~ 1)**
Xiaoling 7.7 253
254
255
Xiaoling 7.11 256 == 4.9  Set TX and RX Preamble Length ==
Xiaoling 7.7 257
Xiaoling 7.8 258
Xiaoling 7.15 259 **Set TX and RX Preamble Length ( 0 ~~ 65535 ) , (% style="color:blue" %)AT Command: AT+PREAMBLE(%%)**
Xiaoling 7.8 260
Xiaoling 7.15 261
Xiaoling 7.11 262 (% style="color:red" %)**Default Value: AT+PREAMBLE=8,8**  (%%) ~/~/  Preamble: 8,8
Xiaoling 7.8 263
Xiaoling 7.11 264 (% style="color:red" %)**Range: ( 0 ~~ 65535 )**
Xiaoling 7.9 265
266
Xiaoling 7.12 267
Xiaoling 7.11 268 == 4.10  Set Syncword ==
Xiaoling 7.9 269
270
Xiaoling 7.15 271 **Set Syncword(0: private,1: public), (% style="color:blue" %)AT Command : AT+SYNCWORD(%%)**
Xiaoling 7.9 272
Xiaoling 7.15 273
Xiaoling 7.11 274 (% style="color:red" %)**Default Value: AT+SYNCWORD=0**  (%%) ~/~/  0x3444 for Public Network
Xiaoling 7.9 275
Xiaoling 7.11 276 (% style="color:red" %)**Range: ( 0 ~~ 1 )**
Xiaoling 7.9 277
278
Xiaoling 7.11 279
Xiaoling 7.12 280 == 4.11  Set TX and RX group ==
Xiaoling 7.11 281
282
Xiaoling 7.15 283 **Set TX and RX group. (0 ~~ 255),(% style="color:blue" %)AT Command:AT+GROUPMOD(%%)**
Xiaoling 7.11 284
Xiaoling 7.15 285 Group > 0:  Device only accept same group transmision
Xiaoling 7.11 286
Xiaoling 7.15 287 Group = 0:  Accept Any group
Xiaoling 7.12 288
Xiaoling 7.15 289
290 (% style="color:red" %)**Default Value: AT+GROUPMOD=0,0**  (%%) ~/~/  Group: 0,0
291
Xiaoling 7.12 292 (% style="color:red" %)**Range: ( 0 ~~ 255 )**
293
294
Xiaoling 7.13 295
296
297 == 4.12  Set Rx Timeout and Reply mode ==
298
299
Xiaoling 7.15 300 **Set Rx Timeout and Reply mode, Parameter 1, Parameter2, (% style="color:blue" %)AT Command:AT+RXMOD(%%)**
Xiaoling 7.13 301
Xiaoling 7.15 302 **Parameter 1: **
Xiaoling 7.13 303
Xiaoling 7.15 304 0:  Always no RX
Xiaoling 7.13 305
Xiaoling 7.15 306 1 ~~ 65534:  Open RX window and last for specify seconds.
307
308 65535:  RX window always open.
309
310
311 **~ Parameter 2: **
312
313 0:  No ACK
314
315 1:  Send an ACK once got a message from another device. ACK Content is same as receive message
316
317 2:  Send an ACK once got a message from another device. ACK Content is 0x00 FF
318
319
Xiaoling 7.13 320 (% style="color:red" %)**Default Value: AT+RXMOD=65535,2**  (%%) ~/~/  RX Mode: 65535, 2
321
322
323
324 == 4.13  Send Message ==
325
326
Xiaoling 7.15 327 **Send Message, (% style="color:blue" %)AT Command:AT+SEND(%%)**
328
329 **Parameter 1:** send hex or text
330
Xiaoling 7.13 331 0: Send hex
Xiaoling 7.15 332
Xiaoling 7.13 333 1: Send text
334
335
Xiaoling 7.15 336 **Parameter 2:** Content
337
338
339 **Parameter 3 :** ACK Type
340
Xiaoling 7.13 341 0: No ACK
Xiaoling 7.15 342
Xiaoling 7.13 343 1: Wait for ACK (Same as what we sent)
Xiaoling 7.15 344
Xiaoling 7.13 345 2: Wait for ACK ( 0x00 FF)
346
347
Xiaoling 7.15 348 **Parameter 4 :** Retransmission ( 0 ~~ 8 )
349
Xiaoling 7.13 350 0: No re-transmission
Xiaoling 7.15 351
Xiaoling 7.13 352 1 ~~ 8: total sends 1~~8 transmission, interval 5 seconds
353
354
Xiaoling 7.15 355 Example:  AT+SEND=1,hello world,0,3
Xiaoling 7.13 356
Xiaoling 7.15 357 (% style="color:red" %)**Notice: RX reply (Defined by AT+RXMOD) won't ask for TX ACK**
Xiaoling 7.14 358
Xiaoling 7.15 359
360
Xiaoling 7.14 361 == 4.14  Print last receive message with RSSI and SNR ==
362
363
Xiaoling 7.15 364 **Print last receive message with RSSI and SNR,(% style="color:blue" %)AT+Command:AT+RECV(%%)**
365
Xiaoling 7.14 366 0: Print in Hex
Xiaoling 7.15 367
Xiaoling 7.14 368 1: Print in text
369
370
Xiaoling 7.15 371 Example: AT+RECV=0 
372 \\The recevied message will be clear after this command.
Xiaoling 7.14 373
374
375
376
377
378
379
Xiaoling 7.15 380
381
Xiaoling 7.13 382
Copyright ©2010-2022 Dragino Technology Co., LTD. All rights reserved
Dragino Wiki v2.0