LoRa-HAT-Reg

From Waveshare Wiki
Revision as of 06:25, 12 November 2022 by Eng52 (talk | contribs) (Created page with "{|class="wikitable" style="text-align:center;" ! Register Address!!Read/Write!!Name!! colspan=4 |Description!!Note |- |00H |R/W |ADDH | colspan=4 |ADDH (Default:0) |rowspan=2...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Register Address Read/Write Name Description Note
00H R/W ADDH ADDH (Default:0) High bits and low bits of module address
Note that when module address is 0xFFFF. It works as a broadcasting and listening address and the LoRa module doesn't filter the address any more.
01H R/W ADDL ADDL (Default:0)
02H R/W NETID NETID(Default:0) Network ID is used to distinguish network. If you want to communicate between two modules, you need to set their NETID to the came ID.
03H R/W REG0 7 6 5 UART baud rate (bps) The baud rates and parity of modules that are intercommunicating can be different. Generally, we recommend you set their baud rate to the same value to avoid data blocking or data losing.
0 0 0 Baud rate is 1200
0 0 1 Baud rate is 2400
0 1 0 Baud rate is4800
0 1 1 Baud rate is 9600(default)
1 0 0 Baud rate is 19200
1 0 1 Baud rate is 38400
1 1 0 Baud rate is 57600
1 1 1 Baud rate is 115200
4 3 Parity bit The serial port mode of modules that are intercommunicating can be set to different parameters.
0 0 8N1(default)
0 1 8O1
1 0 8E1
0 1 8N1(same as 00)
2 1 0 Wireless Air Speed (bps) The air speed of two modules that are intercommunicating must be the same.
Higher the speed, the smaller the latency and the shorter the communicating distance.
0 0 0 Air speed is 0.3
0 0 1 Air speed is 1.2
0 1 0 Air speed is 2.4(default)
0 1 1 Air speed is 4.8K
1 0 0 Air speed is 9.6K
1 0 1 Air speed is 19.2K
1 1 0 Air speed is 38.4K
1 1 1 Air speed is 62.5K
04H R/W REG0 7 6 Setting of dividing packet If the data sent by the user is less than the packet length, the serial port output at the receiving end will be displayed as uninterrupted continuous output;
The data sent by the user is greater than the packet length, and the serial port at the receiving end will be output in packets.
0 0 240 bytes (default)
0 1 128 bytes
1 0 64 bytes
1 1 32 bytes
5 Enable ambient noise After enabling, the command "0xC0 0xC1 0xC2 0xC3" can be sent in transmission mode or WOR transmission mode to read the register;
Register 0x00: Current ambient noise RSSI;
Register 0X01: RSSI (current channel Noise is: dBm =-(256-RSSI);
Command format: 0xC0 0xC1 0xC2 0xC3+start address+read length;
Return format: 0xC1+address+read length+read effective value ; For example: send 0xC0 0xC1 0xC2 0xC3 00 01 return C1 00 01 RSSI (address can only start from 00)
0 Disable (default)
1 Enable
4 3 2 Reserved
1 0 Transmit power The relationship between power and current is non-linear. If power is maximum, the power efficiency is highest. Current will not small in the same proportion of power
0 0 22dBm(default)
0 1 17dBm
1 0 13dBm
1 1 10dBm
05H R/W REG2 Channel (CH)0-83 respectively represent a total of 84 channels Actual frequency = 410.125 + CH*1MHz, default 433.125MHz or 850.125+CH*1MHz, default 868.125MHz
06H R/W REG3 7 Enable RSSI byte After enabling, the module receives wireless data and outputs it through the serial port TXD, followed by an RSSI strength byte.
0 Disable (default)
1 Enable
6 style="background-color:#1E90FF;" colspan=3Ttransfer Method During fixed-point transmission, the module will identify the first three bytes of serial data as address high + address low + channel, and use it as the wireless transmission target.
0 Transparent transmission (default)
1 Fixed point transmission
5 Relay function After the relay function is enabled, if the destination address is not the module itself, the module will start a forwarding; in order to prevent data backhaul, it is recommended to use it with the fixed-point mode; that is, the destination address and the source address are different.
0 Disable relay function (default)
1 Enable relay function
4 Enable LBT After enabling, the wireless data will be monitored before transmission, which can avoid interference to a certain extent, but may cause data delay; the maximum stay time of LBT is 2 seconds.
0 Disabled (default)
1 Enable
3 WOR Mode Transceiver Control Only valid for mode 1; after the WOR receiver receives the wireless data and outputs it through the serial port, it will wait for 1000ms before entering WOR again. During this period, the user can input the serial port data and return it through the wireless; each serial port byte will be refreshed for 1000ms time; The user must initiate the first byte within 1000ms.
0 WOR transmit(default)Module transceiver is turned on, and when transmitting data, a wake-up code for a certain period of time is added.
1 WOR receiver. The module cannot transmit data, and it works in WOR monitoring mode, which can save a lot of power consumption
2 1 0 WOR period Only valid for mode 1; period T= (1+WOR)*500ms, maximum 4000ms, minimum 500ms; The longer the WOR monitoring interval period, the lower the average power consumption, but the greater the data delay; The sender and receiver must agree (very important)
0 0 0 500ms
0 0 1 1000ms
0 1 0 1500ms
0 1 1 2000ms
1 0 0 2500ms
1 0 1 3000ms
1 1 0 3500ms
1 1 1 4000ms
07H Write CRYPT_H Key high byte (default 0) Write-only, read returns 0; used for encryption to avoid interception of wireless data in the air by similar modules; the module will use these two bytes as calculation factors to transform and encrypt wireless signals in the air
08H Write CRYPT_L key low byte (default 0)
80H~86H Read PID information of module (7 bytes) information of module (7 bytes)