LoRa-HAT-Control

From Waveshare Wiki
Revision as of 06:53, 12 November 2022 by Eng52 (talk | contribs) (Created page with "{| class="wikitable" style="margin: left;text-align:center;" |- ! Function ! colspan=6 | Description |- | rowspan=11 | Configure registers |- | colspan=6 style="text-align:lef...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Function Description
Configure registers
Command format: C0 + Begin address + Length + Data
Answer format: C1 + Begin address + Length + Data
Example 1: Set channel to 0x11
Head Begin address Length Data
Command C0 05 01 11
Answer C1 05 01 11
Example 2: Configure the module address (0x1234), network address (0x00), serial port (9600 8N1), and airspeed (1.2K) at the same time
Head Begin address Length Parameter
Command C0 00 04 12 34 00 61
Answer C1 00 04 12 34 00 61
Read register
Command format: 0xC1 + Begin address + Length
Answer format: 0xC1 + Begin address + Length
Example 1: Read channel
Head Begin address Length Parameter
Command C1 05 01
Answer C1 05 01 11
Examples 2: Read module address, NETID, serial port, and air speed.
Head Begin address Length Dara
Command C0 00 04
Data C1 00 04 12 34 00 61
Configure temporary registers Command format: 0xC2 + Begin address + Length + Data
Answer format: C1 + Begin address + Length + Data
Examples 1: Set channel to 0x11
Head Begin address Length Data
Command C2 05 01 11
Data C1 05 01 11
Examples 2: Set module address (0x1234), NETID (0x00), Serial port (9600 8N1), Air speed (1.2K)
Head Begin address Length Data
Command C2 00 04 12 34 00 61
Data C1 00 04 12 34 00 61
Wireless configuration
Command format: CF + CF + C0 + Begin address + Length + Data
Answer format: CF + CF + C1 + Begin address + Length + Data
Examples 1: Wireless set channel to 0x11
Wireless head Head Begin address Length Data
Command CF CF C0 05 01 11
Data CF CF C1 05 01 11
Example 2: Configure the module address (0x1234), network address (0x00), serial port (9600 8N1), and airspeed (1.2K) at the same time
Wireless head Head Begin address Length Parameter
Send CF CF C0 00 04 12 34 00 61
Return CF CF C1 00 04 12 34 00 61
Answer of format error Answer of format error
FF FF FF