

The SX1262 915M LoRa HAT by Waveshare is a hardware add-on designed to enable long-range, low-power wireless communication using the LoRa (Long Range) protocol. This HAT is based on the Semtech SX1262 LoRa transceiver and is compatible with Raspberry Pi and other microcontrollers. It is ideal for Internet of Things (IoT) applications, where reliable communication over long distances is required with minimal power consumption.








The SX1262 LoRa HAT is designed to operate in the 915 MHz frequency band, making it suitable for use in regions where this frequency is allocated for LoRa communication. Below are the key technical details:
| Parameter | Value |
|---|---|
| Frequency Band | 915 MHz |
| Modulation | LoRa, FSK |
| Communication Range | Up to 5 km (line of sight) |
| Transmit Power | Up to +22 dBm |
| Sensitivity | -148 dBm |
| Operating Voltage | 3.3V / 5V (via onboard regulator) |
| Interface | SPI |
| Dimensions | 65mm × 30mm |
| Operating Temperature | -40°C to +85°C |
The SX1262 LoRa HAT uses a 40-pin GPIO header for interfacing with Raspberry Pi or other microcontrollers. Below is the pinout and description:
| Pin Number | Pin Name | Description |
|---|---|---|
| 1 | 3.3V | Power supply (3.3V) |
| 2 | 5V | Power supply (5V) |
| 3 | GPIO2 | SPI Chip Select (CS) |
| 5 | GPIO3 | SPI Clock (SCK) |
| 7 | GPIO4 | SPI Master Out Slave In (MOSI) |
| 9 | GND | Ground |
| 11 | GPIO17 | SPI Master In Slave Out (MISO) |
| 13 | GPIO27 | Reset Pin (RST) |
| 15 | GPIO22 | Busy Pin (BUSY) |
| 19 | GPIO10 | DIO1 (Interrupt Pin) |
| 21 | GPIO9 | DIO2 (Optional Interrupt Pin) |
The SX1262 LoRa HAT can be used to establish long-range wireless communication between devices. Below are the steps to set up and use the HAT:
wiringPi library or Python-based libraries like pyLoRa.raspi-config tool.If you are using the SX1262 LoRa HAT with an Arduino UNO, you can use the following example code to send a simple message:
#include <SPI.h>
#include <LoRa.h> // Include the LoRa library
#define CS_PIN 10 // Chip Select pin
#define RST_PIN 9 // Reset pin
#define BUSY_PIN 8 // Busy pin
void setup() {
Serial.begin(9600); // Initialize serial communication
while (!Serial);
Serial.println("Initializing LoRa...");
// Initialize LoRa with the specified pins
if (!LoRa.begin(915E6)) { // Set frequency to 915 MHz
Serial.println("LoRa initialization failed!");
while (1);
}
Serial.println("LoRa initialized successfully.");
}
void loop() {
Serial.println("Sending message...");
LoRa.beginPacket(); // Start a new LoRa packet
LoRa.print("Hello, LoRa!"); // Add data to the packet
LoRa.endPacket(); // Send the packet
delay(5000); // Wait 5 seconds before sending the next message
}
LoRa initialization failed
No communication between devices
Low communication range
Can the SX1262 LoRa HAT be used with Arduino?
Yes, the HAT can be used with Arduino boards via SPI. Ensure proper wiring and use a compatible LoRa library.
What is the maximum range of the SX1262 LoRa HAT?
The maximum range is up to 5 km in line-of-sight conditions. Actual range may vary depending on environmental factors.
Is the SX1262 LoRa HAT compatible with Raspberry Pi Pico?
Yes, the HAT can be used with Raspberry Pi Pico via SPI, but additional wiring may be required.
By following this documentation, you can effectively use the SX1262 915M LoRa HAT for your IoT and wireless communication projects.