Wiki source code of Point to Point Communication for RS485-LN
Last modified by Bei Jinggeng on 2024/04/30 15:42
Hide last authors
author | version | line-number | content |
---|---|---|---|
12.17 | 1 | **Table of Contents:** | |
2 | |||
12.15 | 3 | {{toc/}} | |
4 | |||
12.16 | 5 | ||
6 | |||
7 | |||
8 | |||
9 | |||
10 | |||
3.2 | 11 | = **1. point to point** = | |
12 | |||
13 | == **1.1 Overview** == | ||
14 | |||
15 | ((( | ||
11.2 | 16 | [[image:1656901825798-483.png]] | |
3.2 | 17 | ||
18 | |||
12.8 | 19 | ||
3.2 | 20 | == **1.2 Configure** == | |
21 | |||
22 | |||
11.2 | 23 | (% style="color:blue" %)**A's configuration: ** **B's configuration:** | |
3.2 | 24 | ||
11.2 | 25 | AT+GROUPMOD=0 AT+GROUPMOD=0 | |
3.2 | 26 | ||
11.2 | 27 | AT+GROUPID=12345678 AT+GROUPID=12345678 | |
3.2 | 28 | ||
12.9 | 29 | AT+TXCHS=868700000 AT+TXCHS=869000000 | |
3.2 | 30 | ||
12.9 | 31 | AT+RXCHS=869000000 AT+RXCHS=868700000 | |
3.2 | 32 | ||
12.11 | 33 | AT+CFGDEV=01 03 00 00 00 04,1 AT+CFGDEV=01 03 00 00 00 02,1 | |
3.2 | 34 | ||
12.8 | 35 | or or | |
3.2 | 36 | ||
12.11 | 37 | AT+COMMAND=01 03 00 00 00 04,1 AT+COMMAND=01 03 00 00 00 02,1 | |
11.2 | 38 | ))) | |
3.2 | 39 | ||
40 | |||
41 | |||
11.2 | 42 | == **1.3 Serial port display** == | |
3.2 | 43 | ||
44 | |||
11.2 | 45 | [[image:image-20220704103422-2.png||height="430" width="817"]] | |
3.2 | 46 | ||
12.8 | 47 | ((( | |
11.2 | 48 | A sends a command to B to query B's RS485 sensor data and display it on A's upper computer. | |
12.8 | 49 | ))) | |
3.2 | 50 | ||
12.8 | 51 | ((( | |
11.2 | 52 | Similarly, B sends a command to A to query A's RS485 sensor data and display it on B's upper computer. | |
12.8 | 53 | ))) | |
3.2 | 54 | ||
55 | |||
11.2 | 56 | [[image:image-20220704103502-3.png]] | |
3.2 | 57 | ||
12.8 | 58 | ((( | |
16.1 | 59 | (% data-sider-select-id="8e84c97f-97c9-47b5-afbd-e7cc77629fea" %) | |
11.2 | 60 | If the sender does not get the ACK reply from the receiver, it will retransmit up to 4 times, each interval is 10 seconds, and the UplinkCounter of the retransmission will not increase. (Retransmission only occurs when using the AT+CFGDEV command or triggering an external interrupt) | |
12.8 | 61 | ))) | |
3.2 | 62 | ||
63 | |||
64 | |||
12.15 | 65 | = **2. Point To Mult-Point ** = | |
3.2 | 66 | ||
16.1 | 67 | == (% data-sider-select-id="4dc2ef7f-a118-4ded-9b73-05d0d1e1b75b" %)**2.1 Overview**(%%) == | |
3.2 | 68 | ||
69 | |||
11.2 | 70 | [[image:1656901541427-229.png]] | |
3.2 | 71 | ||
72 | |||
16.1 | 73 | == (% data-sider-select-id="bd833649-16b9-4259-adc1-73e489ec3912" %)**2.2 Configure**(%%) == | |
3.2 | 74 | ||
75 | |||
16.1 | 76 | (% data-sider-select-id="809f0ceb-1a62-4e1d-8aa6-9a12c485bcb8" style="color:blue" %)**Configuration of the TX group:** | |
3.2 | 77 | ||
11.2 | 78 | AT+GROUPMOD=0,2 | |
3.2 | 79 | ||
11.2 | 80 | AT+GROUPID=12345678 | |
3.2 | 81 | ||
11.2 | 82 | AT+TXCHS=868700000 | |
3.2 | 83 | ||
11.2 | 84 | AT+RXCHS=869000000 | |
3.2 | 85 | ||
11.2 | 86 | AT+CFGDEV=01 03 00 00 00 02,1 | |
3.2 | 87 | ||
11.2 | 88 | or | |
3.2 | 89 | ||
11.2 | 90 | AT+COMMAND=01 03 00 00 00 02,1 | |
3.2 | 91 | ||
92 | |||
11.2 | 93 | (% style="color:blue" %)**Configuration for RX group number 1:** | |
3.2 | 94 | ||
11.2 | 95 | AT+GROUPMOD=1,1 | |
3.2 | 96 | ||
11.2 | 97 | AT+GROUPID=12345678 | |
3.2 | 98 | ||
11.2 | 99 | AT+TXCHS=869000000 | |
3.2 | 100 | ||
11.2 | 101 | AT+RXCHS=868700000 | |
3.2 | 102 | ||
103 | |||
11.2 | 104 | (% style="color:blue" %)**Configuration for RX group number 2:** | |
3.2 | 105 | ||
11.2 | 106 | AT+GROUPMOD=1,2 | |
3.2 | 107 | ||
11.2 | 108 | AT+GROUPID=12345678 | |
3.2 | 109 | ||
11.2 | 110 | AT+TXCHS=869000000 | |
3.2 | 111 | ||
11.2 | 112 | AT+RXCHS=868700000 | |
3.2 | 113 | ||
114 | |||
115 | |||
16.1 | 116 | == (% data-sider-select-id="0bffbb87-9169-426e-8f09-a6a5603b35a9" %)**2.3 Serial port display**(%%) == | |
3.2 | 117 | ||
11.2 | 118 | (% id="cke_bm_79849S" style="display:none" %) [[image:1656901280202-290.png]] | |
3.2 | 119 | ||
120 | |||
11.2 | 121 | [[image:image-20220704103658-4.png||height="495" width="852"]] | |
3.2 | 122 | ||
12.8 | 123 | ((( | |
11.2 | 124 | The TX group sends broadcast data to the RX group. After the RX group receives the data, it will reply to the TX group in order from small to large.(% style="display:none" %) | |
12.8 | 125 | ))) | |
3.2 | 126 | ||
11.2 | 127 | (% style="display:none" %) (%%) | |
3.2 | 128 | ||
129 | |||
11.2 | 130 | [[image:image-20220704103658-5.png]] | |
3.2 | 131 | ||
12.8 | 132 | ((( | |
16.1 | 133 | (% data-sider-select-id="4d98d2d3-b7f6-4f2a-91e1-d65b9392aca1" %) | |
11.2 | 134 | If the sender does not get the ACK reply from the receiver, it will retransmit up to 4 times, each interval is 30 seconds, and the UplinkCounter of the retransmission will not increase.(Retransmission only occurs when using the AT+CFGDEV command or triggering an external interrupt) | |
12.8 | 135 | ))) | |
3.2 | 136 | ||
11.2 | 137 | (% style="display:none" %) (%%) | |
3.2 | 138 | ||
16.1 | 139 | (% data-sider-select-id="7b4bbeb1-7dda-4179-9621-d8d6f6aa0fc0" %) | |
140 | = (% data-sider-select-id="e960f7c8-2a3f-496a-b62f-425f1133b00e" %)**3 Point to Point (RS485 Pass Through).**(%%) = | ||
3.2 | 141 | ||
16.1 | 142 | == (% data-sider-select-id="4dc2ef7f-a118-4ded-9b73-05d0d1e1b75b" %)**3.1 Overview**(%%) == | |
3.2 | 143 | ||
16.1 | 144 | (% data-sider-select-id="e960f7c8-2a3f-496a-b62f-425f1133b00e" %)**PC ~-~-> RS485 to USB adapter ~-~-> RS485-LN A<~-~-~-~--LoRa ~-~-~-~-> RS485-LN B<~-~- >RS485 sensor** | |
145 | |||
146 | [[image:image-20240430153458-2.png]] | ||
147 | |||
148 | |||
149 | == (% data-sider-select-id="4dc2ef7f-a118-4ded-9b73-05d0d1e1b75b" %)**3.2 **(% data-sider-select-id="bd833649-16b9-4259-adc1-73e489ec3912" %)**Configure**(%%) == | ||
150 | |||
151 | (% data-sider-select-id="809f0ceb-1a62-4e1d-8aa6-9a12c485bcb8" style="color:blue" %)**Configuration of the PC:** | ||
152 | |||
153 | (% data-sider-select-id="1f71c512-1e78-4d70-998d-fa9a5e6d5fc8" %) | ||
154 | RS485 sensor read command | ||
155 | |||
156 | |||
157 | (% data-sider-select-id="fb8dd359-d0dd-4b15-a1ec-d8a7532f876f" style="color:blue" %)**Configuration for RX group number 1:** | ||
158 | |||
159 | (% data-sider-select-id="85b4fff7-5f64-4d7c-9084-ed37c89c0db7" %) | ||
160 | AT+MOD=1,500 | ||
161 | |||
162 | (% data-sider-select-id="8131b4ed-95d6-45f2-a437-98c105271570" %) | ||
163 | AT+GROUPID=12345678 | ||
164 | |||
165 | AT+TXCHS=869000000 | ||
166 | |||
167 | AT+RXCHS=868700000 | ||
168 | |||
169 | |||
170 | (% style="color:blue" %)**Configuration for RX group number 2:** | ||
171 | |||
172 | AT+GROUPID=12345678 | ||
173 | |||
174 | AT+TXCHS=869000000 | ||
175 | |||
176 | AT+RXCHS=868700000 | ||
177 | |||
178 | Configure parameters consistent with the RS485 sensor: | ||
179 | |||
180 | AT+BAUDR=4800 | ||
181 | |||
182 | AT+PARITY=0 | ||
183 | |||
184 | AT+DATABIT=8 | ||
185 | |||
186 | AT+STOPBIT=0 | ||
187 | |||
188 | AT+SCHEDULE=0,0 | ||
189 | |||
190 | AT+CMDDL=400 | ||
191 | |||
192 | |||
193 | |||
194 | |||
195 | == (% data-sider-select-id="0bffbb87-9169-426e-8f09-a6a5603b35a9" %)**3.3 Serial port display**(%%) == | ||
196 | |||
197 | [[image:image-20240430145609-1.png||height="652" width="1152"]] | ||
198 | |||
199 | If the sender does not get the ACK reply from the receiver, it will retransmit up to 4 times, each interval is 30 seconds, and the UplinkCounter of the retransmission will not increase.(Retransmission only occurs when using the AT+CFGDEV command or triggering an external interrupt) | ||
200 | |||
201 | |||
202 | = (% data-sider-select-id="45a0429e-5661-4b10-9cb4-be581299c196" %)**4. AT command**(%%) = | ||
203 | |||
12.8 | 204 | (% style="display:none" %) (%%) (% style="display:none" %) | |
3.2 | 205 | ||
206 | ((( | ||
207 | (% style="color:#037691" %)**ATZ** (%%)**: ** Trig a reset of the MCU | ||
208 | ))) | ||
209 | |||
210 | ((( | ||
211 | (% style="color:#037691" %)**AT+FDR** (%%)**:** Reset Parameters to Factory Default, Keys Reserve | ||
212 | ))) | ||
213 | |||
214 | ((( | ||
11.2 | 215 | (% style="color:#037691" %)**AT+FCU** (%%)**:** Get or Set the Frame Co(% style="display:none" %) (%%)unter Uplink | |
3.2 | 216 | ))) | |
217 | |||
218 | ((( | ||
219 | (% style="color:#037691" %)**AT+FCD** (%%)**:** Get or Set the Frame Counter Downlink | ||
220 | ))) | ||
221 | |||
222 | ((( | ||
223 | (% style="color:#037691" %)**AT+TXP** (%%)**:** Get or Set the transmit power, the maximum is 20dBm (default is 14dBm) | ||
224 | ))) | ||
225 | |||
226 | ((( | ||
227 | (% style="color:#037691" %)**AT+SYNC** (%%)**:** Get or Set the Sync word [1:0x34,0:0x12] (default is 1) | ||
228 | ))) | ||
229 | |||
230 | ((( | ||
231 | (% style="color:#037691" %)**AT+PMB** (%%)**: **Get or Set the preamble (default:8) | ||
232 | ))) | ||
233 | |||
234 | ((( | ||
235 | (% style="color:#037691" %)**AT+TXCHS **(%%)**:** Get or Set the transmit frequency of TX (default:868700000) | ||
236 | ))) | ||
237 | |||
238 | ((( | ||
239 | (% style="color:#037691" %)**AT+TXSF **(%%)**:** Get or Set the spreading factor of TX (7 to 12) (default:12) | ||
240 | ))) | ||
241 | |||
242 | ((( | ||
243 | (% style="color:#037691" %)**AT+RXCHS **(%%)**:** Get or Set the transmit frequency of RX (default:869000000) | ||
244 | ))) | ||
245 | |||
246 | ((( | ||
247 | (% style="color:#037691" %)**AT+RXSF **(%%)**:** Get or Set the spreading factor of RX (7 to 12) (default:12) | ||
248 | ))) | ||
249 | |||
250 | ((( | ||
251 | (% style="color:#037691" %)**AT+BW **(%%)**: **Get or Set the bandwidth [0:125khz,1:250khz,2:500khz] (default:0) | ||
252 | ))) | ||
253 | |||
254 | ((( | ||
255 | (% 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) | ||
256 | ))) | ||
257 | |||
258 | ((( | ||
259 | (% style="color:#037691" %)**AT+TDC **(%%)**:** Get or set the application data transmission interval in ms(default 10 minutes) | ||
260 | ))) | ||
261 | |||
262 | ((( | ||
263 | (% style="color:#037691" %)**AT+VER **(%%)**:** Get firmware version number | ||
264 | ))) | ||
265 | |||
266 | ((( | ||
267 | (% style="color:#037691" %)**AT+SEND **(%%)**: **Set Custom sent hex data | ||
268 | ))) | ||
269 | |||
270 | ((( | ||
12.13 | 271 | (% style="color:#037691" %)**AT+GROUPMOD **(%%)**: **Set or Get the grouping (% style="display:none" %) (%%)mode of the device (default: 0) | |
3.2 | 272 | ))) | |
273 | |||
274 | ((( | ||
275 | ((( | ||
12.13 | 276 | (% style="color:#037691" %)**AT+GROUPID **(%%)**: **Set or Get the password for (% style="display:none" %) (%%)matching between TX group and RX group, which can be composed of numbers or characters (default: 12345678)(% style="display:none" %) | |
3.2 | 277 | ||
12.9 | 278 | ((( | |
11.2 | 279 | (% style="color:#037691" %)**AT+INTMOD **(%%)**:** Get or Set the trigger interrupt mode | |
12.9 | 280 | ))) | |
3.2 | 281 | ||
12.9 | 282 | ((( | |
11.2 | 283 | (% style="color:#037691" %)**AT+BAUDR **(%%)**:** Get or set the baud rate of rs485. (default: 9600) | |
12.9 | 284 | ))) | |
3.2 | 285 | ||
12.9 | 286 | ((( | |
11.2 | 287 | (% style="color:#037691" %)**AT+DATABIT **(%%)**:** Get or Set databit(7:7 bits,8:8 bits) of rs485 (default: 8) | |
12.9 | 288 | ))) | |
3.2 | 289 | ||
12.9 | 290 | ((( | |
12.13 | 291 | (% style="color:#037691" %)**AT+PARITY **(%%)**: **Get or Set parity(0:none,1:odd,2:even) of rs485(default: 0) | |
12.9 | 292 | ))) | |
11.2 | 293 | ||
12.9 | 294 | ((( | |
12.13 | 295 | (% style="color:#037691" %)**AT+STOPBIT **(%%)**: **Get or Set stopbit(0:1 bit,1:1.5 bit,2:2 bit) of rs485(default: 0) | |
12.9 | 296 | ))) | |
11.2 | 297 | ||
12.9 | 298 | ((( | |
11.2 | 299 | (% style="color:#037691" %)**AT+CMDDL **(%%)**:** Get or Set the delay waiting time after receiving RS485 command (default: 400) | |
12.9 | 300 | ))) | |
11.2 | 301 | ||
12.9 | 302 | ((( | |
11.2 | 303 | (% style="color:#037691" %)**AT+CRCCHECK **(%%)**:** Get or set to receive and verify RS485 sensor data (0: Disable,1:CRC16_MODBUS) (default: 1) | |
12.9 | 304 | ))) | |
11.2 | 305 | ||
12.9 | 306 | ((( | |
11.2 | 307 | (% style="color:#037691" %)**AT+SCHEDULE **(%%)**:** Each TDC sends command data to the receiver. | |
12.9 | 308 | ))) | |
11.2 | 309 | ||
12.9 | 310 | ((( | |
11.2 | 311 | (% style="color:#037691" %)**AT+CFGDEV **(%%)**:** Instantly send RS485 commands to the receiver. | |
12.9 | 312 | ))) | |
11.2 | 313 | ||
12.9 | 314 | ((( | |
12.13 | 315 | (% style="color:#037691" %)**AT+RS485 **(%%)**: **Send commands to the local RS485 device. | |
12.9 | 316 | ))) | |
11.2 | 317 | ||
12.9 | 318 | ((( | |
11.2 | 319 | (% style="color:#037691" %)**AT+MOD **(%%)**:** Get or set the host send mode.(default: 0) | |
3.2 | 320 | ))) | |
11.2 | 321 | ))) | |
12.9 | 322 | ))) | |
3.2 | 323 | ||
324 | ((( | ||
11.2 | 325 | ||
3.2 | 326 | ))) | |
327 | |||
328 | ((( | ||
11.2 | 329 | ||
3.2 | 330 | ))) | |
331 | |||
332 | ((( | ||
333 | (% style="color:#4f81bd" %)**Example 1:** | ||
334 | ))) | ||
335 | |||
336 | ((( | ||
337 | **AT+SEND=01020304 **will send a payload of 01020304 | ||
338 | ))) | ||
339 | |||
340 | ((( | ||
341 | |||
12.7 | 342 | ||
343 | |||
3.2 | 344 | ))) | |
345 | |||
346 | ((( | ||
12.10 | 347 | ((( | |
3.2 | 348 | (% style="color:#4f81bd" %)**Example 2: ** | |
12.10 | 349 | ))) | |
3.2 | 350 | ||
12.10 | 351 | ((( | |
12.2 | 352 | **AT+INTMOD=aa** (0:Disable,1:falling or rising,2:falling,3:rising) (default: 2) | |
3.2 | 353 | ))) | |
12.10 | 354 | ))) | |
3.2 | 355 | ||
356 | ((( | ||
12.10 | 357 | ((( | |
12.2 | 358 | RS485-LN support external Interrupt uplink since hardware v1.2 release. | |
12.10 | 359 | ))) | |
3.2 | 360 | ||
12.2 | 361 | [[image:image-20220704104958-6.png]] | |
3.2 | 362 | ||
12.10 | 363 | ((( | |
364 | Connect the Interrupt pin to RS485-LN INT port and connect the GND pin to V- port. When there is a high voltage (Max 24v) on INT pin. Device will send an lora packet. | ||
3.2 | 365 | ))) | |
12.10 | 366 | ))) | |
3.2 | 367 | ||
368 | ((( | ||
369 | |||
12.7 | 370 | ||
371 | |||
3.2 | 372 | ))) | |
373 | |||
374 | ((( | ||
12.10 | 375 | ((( | |
3.2 | 376 | (% style="color:#4f81bd" %)**Example 3: ** | |
12.10 | 377 | ))) | |
3.2 | 378 | ||
12.10 | 379 | ((( | |
12.2 | 380 | **AT+SCHEDULE: **This command will be sent to Group RX during each transmission, Max command length is 14 bytes. The grammar is: | |
12.10 | 381 | ))) | |
3.2 | 382 | ||
12.10 | 383 | ((( | |
12.2 | 384 | AT+SCHEDULE =xx xx xx xx xx xx xx xx xx xx xx xx,m | |
12.10 | 385 | ))) | |
3.2 | 386 | ||
12.10 | 387 | ((( | |
12.2 | 388 | xx xx xx xx xx xx xx xx xx xx xx xx: The RS485 command to be sent | |
12.10 | 389 | ))) | |
3.2 | 390 | ||
12.10 | 391 | ((( | |
12.2 | 392 | m: 0: no CRC, 1: add CRC-16/MODBUS in the end of this command | |
12.10 | 393 | ))) | |
3.2 | 394 | ||
12.10 | 395 | ((( | |
396 | For example, if we have a RS485 sensor. The command to get sensor value is: 01 03 0B B8 00 02 46 0A. Where 01 03 0B B8 00 02 is the Modbus command to read the register 0B B8 where stored the sensor value. The 46 0A is the CRC-16/MODBUS which calculate manually. | ||
3.2 | 397 | ))) | |
12.10 | 398 | ))) | |
3.2 | 399 | ||
400 | ((( | ||
12.2 | 401 | ||
3.2 | 402 | ))) | |
403 | |||
404 | ((( | ||
12.2 | 405 | ||
3.2 | 406 | ))) | |
407 | |||
408 | ((( | ||
12.10 | 409 | ((( | |
3.2 | 410 | (% style="color:#4f81bd" %)**Example 4: ** | |
12.10 | 411 | ))) | |
3.2 | 412 | ||
12.10 | 413 | ((( | |
12.3 | 414 | **AT+CFGDEV :** This command will be sent to Group RX. | |
12.10 | 415 | ))) | |
3.2 | 416 | ||
12.10 | 417 | ((( | |
12.3 | 418 | The grammar is: | |
12.10 | 419 | ))) | |
3.2 | 420 | ||
12.10 | 421 | ((( | |
12.3 | 422 | AT+CFGDEV =xx xx xx xx xx xx xx xx xx xx xx xx,m | |
12.10 | 423 | ))) | |
12.3 | 424 | ||
12.10 | 425 | ((( | |
12.3 | 426 | xx xx xx xx xx xx xx xx xx xx xx xx: The RS485 command to be sent | |
12.10 | 427 | ))) | |
12.3 | 428 | ||
12.10 | 429 | ((( | |
12.3 | 430 | m: 0: no CRC, 1: add CRC-16/MODBUS in the end of this command. | |
3.2 | 431 | ))) | |
12.10 | 432 | ))) | |
3.2 | 433 | ||
434 | ((( | ||
12.3 | 435 | ||
3.2 | 436 | ||
12.3 | 437 | ||
12.10 | 438 | ((( | |
12.3 | 439 | (% style="color:#4f81bd" %)**Example 5:**(%%)** ** | |
3.2 | 440 | ))) | |
12.10 | 441 | ))) | |
3.2 | 442 | ||
12.10 | 443 | ((( | |
12.3 | 444 | **AT+RS485:** This command will be sent to local RS485 device. | |
12.10 | 445 | ))) | |
3.2 | 446 | ||
12.10 | 447 | ((( | |
12.3 | 448 | The grammar is: | |
12.10 | 449 | ))) | |
12.3 | 450 | ||
12.10 | 451 | ((( | |
12.3 | 452 | AT+RS485 =xx xx xx xx xx xx xx xx xx xx xx xx,m | |
12.10 | 453 | ))) | |
12.3 | 454 | ||
12.10 | 455 | ((( | |
12.3 | 456 | xx xx xx xx xx xx xx xx xx xx xx xx: The RS485 command to be sent | |
12.10 | 457 | ))) | |
12.3 | 458 | ||
12.10 | 459 | ((( | |
12.3 | 460 | m: 0: no CRC, 1: add CRC-16/MODBUS in the end of this command. | |
12.10 | 461 | ))) | |
12.3 | 462 | ||
463 | |||
464 | |||
12.10 | 465 | ((( | |
12.3 | 466 | (% style="color:#4f81bd" %)**Example 6:** | |
12.10 | 467 | ))) | |
12.3 | 468 | ||
12.10 | 469 | ((( | |
12.3 | 470 | **AT+MOD=0** Commands are transparently transmitted through UART. | |
12.10 | 471 | ))) | |
12.3 | 472 | ||
12.10 | 473 | ((( | |
12.3 | 474 | **AT+MOD=1,500** Commands are transparently transmitted through RS485. 500 ms after the first character is received from RS485, all characters are commands. | |
12.10 | 475 | ))) | |
12.3 | 476 | ||
477 | |||
478 | |||
12.10 | 479 | ((( | |
12.3 | 480 | (% style="color:#4f81bd" %)**Example 7:** | |
12.10 | 481 | ))) | |
12.3 | 482 | ||
12.10 | 483 | ((( | |
12.3 | 484 | **AT+GROUPMOD=0** Set to point to point mode | |
12.10 | 485 | ))) | |
12.3 | 486 | ||
12.10 | 487 | ((( | |
12.3 | 488 | **AT+GROUPMOD=0,aa** Set the TX group that controls the number of aa (The maximum value of aa is 8) | |
12.10 | 489 | ))) | |
12.3 | 490 | ||
12.10 | 491 | ((( | |
12.3 | 492 | **AT+GROUPMOD=1,bb** Set to the RX group controlled by the TX group, numbered bb(The maximum value of bb is 8) | |
12.10 | 493 | ))) | |
12.3 | 494 | ||
495 | |||
12.10 | 496 | ((( | |
12.3 | 497 | **AT+GROUPMOD=0,2** Set to control the TX group of the two RX groups | |
12.10 | 498 | ))) | |
12.3 | 499 | ||
12.10 | 500 | ((( | |
12.3 | 501 | **AT+GROUPMOD=1,1** Set the RX group numbered 1 | |
12.10 | 502 | ))) | |
12.3 | 503 | ||
12.10 | 504 | ((( | |
12.3 | 505 | **AT+GROUPMOD=1,2** Set the RX group numbered 2 | |
12.10 | 506 | ))) | |
12.3 | 507 | ||
508 | |||
509 | |||
16.1 | 510 | = **5. Data Format** = | |
12.3 | 511 | ||
512 | |||
12.10 | 513 | ((( | |
12.4 | 514 | 8 bytes of GROUPID +n payload + 4 bytes of checksum | |
12.10 | 515 | ))) | |
12.3 | 516 | ||
517 | |||
12.10 | 518 | ((( | |
12.4 | 519 | Payload(S12, SF11, SF10 maximum length is 59, SF9 maximum length is 123, SF8, SF7 maximum length is 230): | |
12.10 | 520 | ))) | |
3.2 | 521 | ||
12.12 | 522 | (% border="1" cellspacing="10" style="background-color:#f7faff; color:black; width:430px" %) | |
523 | |=(% style="width: 60px;" %)**Size (bytes)**|=(% style="width: 60px;" %)**1**|=(% style="width: 60px;" %)**1**|=(% style="width: 60px;" %)**1**|=(% style="width: 80px;" %)**1**|=(% style="width: 100px;" %)**payloadsize** | ||
12.4 | 524 | |(% style="width:100px" %)**Value**|(% style="width:71px" %)address|(% style="width:71px" %)request|(% style="width:49px" %)ACK|(% style="width:99px" %)payloadsize|(% style="width:139px" %)((( | |
525 | command data or | ||
526 | |||
527 | return data | ||
528 | ))) | ||
529 | |||
12.10 | 530 | ((( | |
12.13 | 531 | (% style="color:#037691" %)**The first byte: **(%%)00 is the broadcast address, 01-08 is the RX group number | |
12.10 | 532 | ))) | |
12.4 | 533 | ||
12.10 | 534 | ((( | |
12.4 | 535 | (% style="color:#037691" %)**The second byte:**(%%) send request when not 0, not request when it is 0 | |
12.10 | 536 | ))) | |
12.4 | 537 | ||
12.10 | 538 | ((( | |
12.4 | 539 | (% style="color:#037691" %)**The third byte:**(%%) ACK returned to the sender. | |
12.10 | 540 | ))) | |
12.4 | 541 | ||
12.10 | 542 | ((( | |
12.4 | 543 | (% style="color:#037691" %)**The fourth byte:**(%%) The command length of the sender or the data length of the RS485 sensor returned by the receiver. | |
12.10 | 544 | ))) | |
12.4 | 545 | ||
12.10 | 546 | ((( | |
12.4 | 547 | (% style="color:#037691" %)**The Fifth byte:**(%%) RS485 command or RS485 return data. | |
12.10 | 548 | ))) | |
12.4 | 549 | ||
550 | |||
3.2 | 551 | ((( | |
552 | |||
553 | ))) |