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
108 1 byte of TXGROUPMOD +n payload + 4 bytes of checksum
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
119
Xiaoling 7.5 120 = 4.  AT Command Set =
Xiaoling 7.2 121
Edwin Chen 2.1 122
Xiaoling 7.4 123 == 4.1  Set TX and RX Bandwidth ==
Edwin Chen 2.1 124
Edwin Chen 3.1 125
Xiaoling 7.15 126 **Set TX and RX BandWidth (0 ~~ 9), (% style="color:blue" %)AT Command :  AT+BW(%%)**
Edwin Chen 3.1 127
Xiaoling 7.15 128 0:  125 kHz
Edwin Chen 3.1 129
Xiaoling 7.4 130 1:  250 kHz
Xiaoling 7.15 131
Xiaoling 7.4 132 2:  500 kHz
Xiaoling 7.15 133
Xiaoling 7.4 134 3:  62.5 kHz
Xiaoling 7.15 135
Xiaoling 7.4 136 4:  41.67 kHz
Xiaoling 7.15 137
Xiaoling 7.4 138 5:  31.25 kHz
Xiaoling 7.15 139
Xiaoling 7.4 140 6:  20.83 kHz
Xiaoling 7.15 141
Xiaoling 7.4 142 7:  15.63 kHz
Xiaoling 7.15 143
Xiaoling 7.4 144 8:  10.42 kHz
Edwin Chen 3.1 145
Xiaoling 7.15 146 9:  7.81 kHz
Edwin Chen 3.1 147
Xiaoling 7.15 148
Xiaoling 7.4 149 (% style="color:red" %)**Default Value: AT+BW=0,0**  (%%) ~/~/  BandWidth: 125kHz ,125kHz
150
151 (% style="color:red" %)**Range: (0 ~~ 9)**
152
153
Xiaoling 7.6 154
155 == 4.2  Set TX and RX frequency ==
156
157
Xiaoling 7.15 158 **Set TX and RX frequency (MHz), (% style="color:blue" %)AT Command :  AT+FRE(%%)**
Xiaoling 7.6 159
Xiaoling 7.15 160
Xiaoling 7.6 161 (% style="color:red" %)**Default Value: AT+FRE=868.100,868.100**  (%%) ~/~/  Frequency: 868.100MHz, 868.100MHz
162
163
164
165 == 4.3  Set TX and RX Spreading Factor ==
166
167
Xiaoling 7.15 168 **Set TX and RX Spreading Factor ( 5 ~~ 12), (% style="color:blue" %)AT Command : AT+SF(%%)**
Xiaoling 7.6 169
Xiaoling 7.15 170
Xiaoling 7.6 171 (% style="color:red" %)**Default Value: AT+SF=12,12**  (%%) ~/~/  Spreading Factor : 12,12
172
173 (% style="color:red" %)**Range: (5 ~~ 12)**
174
175
Xiaoling 7.15 176
Xiaoling 7.6 177 == 4.4  Set Tx Power Range ==
178
Xiaoling 7.7 179
Xiaoling 7.15 180 **Set Tx Power Range( 0 ~~ 22 dBm), (% style="color:blue" %)AT Command : AT+POWER(%%)**
Xiaoling 7.6 181
Xiaoling 7.15 182
Xiaoling 7.7 183 (% style="color:red" %)**Default Value: AT+POWER=20**  (%%) ~/~/  Output Power: 20dBm
Xiaoling 7.6 184
Xiaoling 7.7 185 (% style="color:red" %)**Range: (0 ~~ 22)**
Xiaoling 7.6 186
187
Xiaoling 7.8 188
Xiaoling 7.7 189 == 4.5  Set TX and RX Coding Rate ==
Xiaoling 7.6 190
191
Xiaoling 7.15 192 **Set TX and RX Coding Rate ( 1 ~~ 4 ), (% style="color:blue" %)AT Command :AT+CR(%%)**
Xiaoling 7.6 193
Xiaoling 7.7 194 1: 4/5
Xiaoling 7.15 195
Xiaoling 7.7 196 2: 4/6
Xiaoling 7.15 197
Xiaoling 7.7 198 3: 4/7
Xiaoling 7.15 199
Xiaoling 7.7 200 4: 4/8
Xiaoling 7.6 201
Xiaoling 7.15 202
Xiaoling 7.7 203 (% style="color:red" %)**Default Value: AT+CR=1,1**  (%%) ~/~/  Coding Rate: 4/5, 4/5
Xiaoling 7.6 204
Xiaoling 7.7 205 (% style="color:red" %)**Range: (1 ~~ 4)**
Xiaoling 7.6 206
207
208
Xiaoling 7.8 209 == 4.6  Set TX and RX Header Type ==
Xiaoling 7.6 210
211
Xiaoling 7.15 212 **Set TX and RX Header Type ( 0,1 ), (% style="color:blue" %)AT Command : AT+HEADER(%%)**
Xiaoling 7.6 213
Xiaoling 7.8 214 0: Variable length packet (explicit header)
Xiaoling 7.15 215
Xiaoling 7.8 216 1: Fixed length packet (implicit header)
Xiaoling 7.6 217
Xiaoling 7.15 218
Xiaoling 7.8 219 (% style="color:red" %)**Default Value: AT+HEADER=1,1**  (%%) ~/~/  Header Type: explicit, explicit
Xiaoling 7.6 220
Xiaoling 7.8 221 (% style="color:red" %)**Range: (0 ~~ 1)**
Xiaoling 7.6 222
223
224
Xiaoling 7.9 225 == 4.7  Set TX and RX CRC Type ==
Xiaoling 7.6 226
227
Xiaoling 7.15 228 **Set TX and RX CRC Type ( 0,1) ,(% style="color:blue" %)AT Command:AT+CRC(%%)**
229
Xiaoling 7.9 230 0: CRC OFF
Xiaoling 7.15 231
Xiaoling 7.9 232 1: CRC ON
Xiaoling 7.6 233
Xiaoling 7.15 234
Xiaoling 7.9 235 (% style="color:red" %)**Default Value: AT+CRC=0,0**  (%%) ~/~/  CRC: OFF, OFF
Xiaoling 7.6 236
Xiaoling 7.9 237 (% style="color:red" %)**Range: (0 ~~ 1)**
Xiaoling 7.6 238
239
240
Xiaoling 7.10 241 == 4.8  Set TX and RX InvertIQ ==
Xiaoling 7.6 242
243
Xiaoling 7.15 244 **Set TX and RX InvertIQ ( 0,1) , (% style="color:blue" %)AT Command:AT+IQ(%%)**
245
Xiaoling 7.9 246 0: Standard IQ setup
Xiaoling 7.15 247
Xiaoling 7.9 248 1: Inverted IQ setup
Xiaoling 7.7 249
Xiaoling 7.15 250
Xiaoling 7.9 251 (% style="color:red" %)**Default Value: AT+IQ=0,0**  (%%) ~/~/  Invert IQ: 0,0
Xiaoling 7.7 252
Xiaoling 7.9 253 (% style="color:red" %)**Range: (0 ~~ 1)**
Xiaoling 7.7 254
255
256
Xiaoling 7.11 257 == 4.9  Set TX and RX Preamble Length ==
Xiaoling 7.7 258
Xiaoling 7.8 259
Xiaoling 7.15 260 **Set TX and RX Preamble Length ( 0 ~~ 65535 ) , (% style="color:blue" %)AT Command: AT+PREAMBLE(%%)**
Xiaoling 7.8 261
Xiaoling 7.15 262
Xiaoling 7.11 263 (% style="color:red" %)**Default Value: AT+PREAMBLE=8,8**  (%%) ~/~/  Preamble: 8,8
Xiaoling 7.8 264
Xiaoling 7.11 265 (% style="color:red" %)**Range: ( 0 ~~ 65535 )**
Xiaoling 7.9 266
267
Xiaoling 7.12 268
Xiaoling 7.11 269 == 4.10  Set Syncword ==
Xiaoling 7.9 270
271
Xiaoling 7.15 272 **Set Syncword(0: private,1: public), (% style="color:blue" %)AT Command : AT+SYNCWORD(%%)**
Xiaoling 7.9 273
Xiaoling 7.15 274
Xiaoling 7.11 275 (% style="color:red" %)**Default Value: AT+SYNCWORD=0**  (%%) ~/~/  0x3444 for Public Network
Xiaoling 7.9 276
Xiaoling 7.11 277 (% style="color:red" %)**Range: ( 0 ~~ 1 )**
Xiaoling 7.9 278
279
Xiaoling 7.11 280
Xiaoling 7.12 281 == 4.11  Set TX and RX group ==
Xiaoling 7.11 282
283
Xiaoling 7.15 284 **Set TX and RX group. (0 ~~ 255),(% style="color:blue" %)AT Command:AT+GROUPMOD(%%)**
Xiaoling 7.11 285
Xiaoling 7.15 286 Group > 0:  Device only accept same group transmision
Xiaoling 7.11 287
Xiaoling 7.15 288 Group = 0:  Accept Any group
Xiaoling 7.12 289
Xiaoling 7.15 290
291 (% style="color:red" %)**Default Value: AT+GROUPMOD=0,0**  (%%) ~/~/  Group: 0,0
292
Xiaoling 7.12 293 (% style="color:red" %)**Range: ( 0 ~~ 255 )**
294
295
Xiaoling 7.13 296
297
298 == 4.12  Set Rx Timeout and Reply mode ==
299
300
Xiaoling 7.15 301 **Set Rx Timeout and Reply mode, Parameter 1, Parameter2, (% style="color:blue" %)AT Command:AT+RXMOD(%%)**
Xiaoling 7.13 302
Xiaoling 7.15 303 **Parameter 1: **
Xiaoling 7.13 304
Xiaoling 7.15 305 0:  Always no RX
Xiaoling 7.13 306
Xiaoling 7.15 307 1 ~~ 65534:  Open RX window and last for specify seconds.
308
309 65535:  RX window always open.
310
311
312 **~ Parameter 2: **
313
314 0:  No ACK
315
316 1:  Send an ACK once got a message from another device. ACK Content is same as receive message
317
318 2:  Send an ACK once got a message from another device. ACK Content is 0x00 FF
319
320
Xiaoling 7.13 321 (% style="color:red" %)**Default Value: AT+RXMOD=65535,2**  (%%) ~/~/  RX Mode: 65535, 2
322
323
324
325 == 4.13  Send Message ==
326
327
Xiaoling 7.15 328 **Send Message, (% style="color:blue" %)AT Command:AT+SEND(%%)**
329
330 **Parameter 1:** send hex or text
331
Xiaoling 7.13 332 0: Send hex
Xiaoling 7.15 333
Xiaoling 7.13 334 1: Send text
335
336
Xiaoling 7.15 337 **Parameter 2:** Content
338
339
340 **Parameter 3 :** ACK Type
341
Xiaoling 7.13 342 0: No ACK
Xiaoling 7.15 343
Xiaoling 7.13 344 1: Wait for ACK (Same as what we sent)
Xiaoling 7.15 345
Xiaoling 7.13 346 2: Wait for ACK ( 0x00 FF)
347
348
Xiaoling 7.15 349 **Parameter 4 :** Retransmission ( 0 ~~ 8 )
350
Xiaoling 7.13 351 0: No re-transmission
Xiaoling 7.15 352
Xiaoling 7.13 353 1 ~~ 8: total sends 1~~8 transmission, interval 5 seconds
354
355
Xiaoling 7.15 356 Example:  AT+SEND=1,hello world,0,3
Xiaoling 7.13 357
Xiaoling 7.15 358 (% style="color:red" %)**Notice: RX reply (Defined by AT+RXMOD) won't ask for TX ACK**
Xiaoling 7.14 359
Xiaoling 7.15 360
361
Xiaoling 7.14 362 == 4.14  Print last receive message with RSSI and SNR ==
363
364
Xiaoling 7.15 365 **Print last receive message with RSSI and SNR,(% style="color:blue" %)AT+Command:AT+RECV(%%)**
366
Xiaoling 7.14 367 0: Print in Hex
Xiaoling 7.15 368
Xiaoling 7.14 369 1: Print in text
370
371
Xiaoling 7.15 372 Example: AT+RECV=0 
373 \\The recevied message will be clear after this command.
Xiaoling 7.14 374
375
376
377
378
379
380
Xiaoling 7.15 381
382
Xiaoling 7.13 383
Copyright ©2010-2022 Dragino Technology Co., LTD. All rights reserved
Dragino Wiki v2.0