Template: Table 2 of SX1262 915M LoRa HAT

From Waveshare Wiki
Jump to: navigation, search
Description of registers
NO. Read/Write Name Description Note
00H R/W ADDH ADDH (Default:0) High bits and Low bits of module address. Note thant when module address is 0xFFFF.

It works as broadcasting and listening address and LoRa module doesn't filter address anymore

01H R/W ADDL ADDL (Default:0)
02H R/W NETID NETID (Default: 0) Network ID, it is used to distinguish network.

If you want to communicating between two modules, you need to set their NETID to same ID

03H R/W REG0 Bit 7 Bit 6 Bit 5 UART baud rate (bps) The baud rates and parity of modules which are intercommunicating can be different.

Generally we recommend you to set their baud rate to 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 is 4800
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
Bit 4 Bit 3 Parity bit The serial port of modules which are intercommunicating can set to different paramters
0 0 8N1 (Default)
0 1 8O1
1 0 8E1
1 1 8N1 (same as 00)
Bit 2 Bit 1 Bit 0 Wireless Air speed (bps) The air speed of two modules which are intercommunicating must be same.

Higher the speed, smaller the latency and shorter the communicating distance.

0 0 0 Air speed is 0.3K
0 0 1 Air speed is 1.2K
0 1 0 Air speed is 2.4K (default)
0 1 1 Air speed is 4.8K (default)
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 REG1 Bit 7 Bit 6 Setting of dividing packet If the size of data transmitted are shorter than the length of divided packet. Data are continuous sent to serial port after receiving;

If the size of data transmitted are longger than the length of divided packet. Data are divided and sent to serial port after receiving.

0 240 bytes (default)
0 1 128 bytes
1 0 64 bytes
1 1 32 bytes
Bit 5 Enable ambient noise After enabling, You can send command 0xC0 0xC1 0xC2 0xC3 to read register in Transmit Mode or WOR Mode;

Register 0x00: RSSI of current ambient noise
Register 0x01: The RSSI of last communicating (current noise of channel is dBm = - RSSI/2);
Command format: 0xC0 0xC1 0xC2 0xC3 + Begin address + Read length;
Answer format: 0xC1 + Address + Read length + Data;
For example:
Command: 0xC0 0xC1 0xC2 0xC3 0x00 0x01
Answer: 0xC1 0x00 0x01 RSSI (The address should begin from 0x00)

0 Disable (default)
1 enable
Bit 4 Bit 3 Bit 2 Reserved
Bit 1 Bit 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 12dBm
1 1 10dBm
05H R/W REG2 Channel control (CH) 0-83. 84 channels in total Actually frequency is 850.125 + CH *1MHz. Default 868.125MHz(SX1262),or 410.125 + CH *1MHz. Default 433.125MHz(SX1268)
06H R/W REG3 Bit 7 Enable RSSI byte After enabling, data sent to serial port is added with a RSSI byte after receiving
0 Disable (default)
1 Enable
Bit 6 Transmitting mode When point to point transmitting, module will recognize the first three byte as Address High + Address Low + Channel. and wireless transmit it
0 Transparent transmitting (default)
1 Point to Point Transmitting
Bit 5 Relay function If target address is not module itself, module will forward data;

To avoid data echo, we recommend you to use this function in point to point mode, that is target address is different with source address

0 Disable (default)
1 Enable
Bit 4 Enable LBT Module will listen before transmit wireless data.

This function can be used to avoid interference, however, it also clause longer latency;
The MAX LBT time is 2s, after 2s, data is forced to transmit

0 Disable(default)
1 Enable
Bit 3 WOR Mode Tramsmit/Receive control This setting only work for Mode 1;

Receiver waits for 1000ms after receive wirelesss data and forward,and then enter WOR mode again
User can send data to serial port and forward via wireless network during this interval,
Every serial byte will refresh this interval time (1000ms);
You much send the first byte in 1000ms.

0 WOR transmit (default)

Module is enabled to receive/transmit, and wakeup code is added to transmitted data.

1 WOR Sender

Module is disable to send data. Module is working in WOR listen mode. Consumption is reduced

Bit 2 Bit 1 Bit 0 WOR Period This setting only work for Mode 1;

Period is equal to T = (1 + WOR) * 500ms; MAX 4000ms, MIN 500ms
Longer the Period time of WOR listen, lower the average consumption, however, longer the latency
The settings of receiver and sender must be same.

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 W CRYPT_H High bytes of Key (default 0) Only write enable, the read result always be 0;

This key is used to encrypting to avoid wireless data intercepted by similar modules;
This key is work as calculation factor when module is encrypting wireless data.

08H W CRYPT_L Low bytes of key (default 0)
80H ~ 86H R PID Information of module (7 bytes) 7 bytes data of module information