LoRa HAT
This documentation includes hardware info, installation guidelines and sample code for your hardware.
Last updated
This documentation includes hardware info, installation guidelines and sample code for your hardware.
Last updated
LoRa HAT is a long-range communication transceiver for Raspberry Pi.
Antenna Connections: One or two uFL connectors according to the region.
US Version: 'RF HI' is used for 915 MHz. 'RF LO' is not used.
EU Version: 'RF HI' is used for 865 MHz, 'RF LO' is used for 433 MHz.
I2C Ports: Provides I2C connectivity with 'SCL', 'SDA', '3.3V' and 'GND' pins.
Digital Ports: Provides total 4 GPIO pins on 2 ports.
Left Port: 'GPIO21', 'GPIO22', '3.3V' and 'GND' pins.
Right Port: 'GPIO23', 'GPIO24', '3.3V' and 'GND' pins.
Analog Ports: Provides total 4 Analog inputs on 2 ports with single-ended and differential measurement options.
Left Port: 'AN1', 'AN2', '3.3V' and 'GND' pins.
Right Port: 'AN3', 'AN4', '3.3V' and 'GND' pins.
Stackable Raspberry Pi Connector: Connects the board to the Raspberry Pi. The connector is stackable, so you can attach other boards on top or bottom.
I2C, Digital and Analog ports are 3.3V Grove System compatible. Pins on these ports are 3.3V tolerant.
LoRa HAT carries a LoRa Transceiver module with onboard LoRaWAN Protocol Stack.
The US version comes with a Microchip RN2903A module, and the EU version comes with RN2483A module.
The coverage is up to 15 km at suburban areas and up to 5 km at urban areas.
LoRa HAT securely connects to the cloud services via Cryptographic co-processor Microchip ATECC608A.
It detects movement and theft attempts via accelerometer and tilt sensor NXP MMA8491Q.
There are 2x I2C, 2x digital, and 2x analog Grove System compatible ports for additional sensors, displays, and accessories.
4Ch single-ended or 2Ch differential analog inputs are available over TI ADS1018 SPI Analog-to-Digital converter. The ADC chip also measures board temperature for system-level temperature monitoring or cold-junction compensation for thermocouples.
There are three LEDs onboard for custom status indication.
The LoRa HAT is stackable; most of the GPIO pins are free.
It carries ID EEPROM for Raspberry Pi HAT specification compliance.
LoRa HAT's specifications are as follows:
US Version
On-Board LoRaWAN™ Protocol Stack.
Complies with the LoRaWAN Class A and Class C protocol specifications.
ASCII Command Interface over UART.
Low-Power Long Range Transceiver Operating in the 915 MHz Frequency Band.
High Receiver Sensitivity: Down to -146 dBm.
TX Power: Adjustable up to +18.5 dBm High Efficiency PA.
FSK, GFSK, and LoRa Technology Modulation.
IIP3 = -11 dBm.
Up to 15 km Coverage at Suburban and up to 5 km Coverage at Urban Area.
EU Version
On-Board LoRaWAN™ Protocol Stack.
Complies with the LoRaWAN Class A protocol specifications.
ASCII Command Interface over UART.
Low-Power Long Range Transceiver Operating in the 433 MHz and 868 MHz Frequency Bands.
High Receiver Sensitivity: Down to -146 dBm.
TX Power: Adjustable up to +14 dBm high Efficiency PA.
FSK, GFSK, and LoRa Technology Modulation.
IIP3 = -11 dBm.
Up to 15 km Coverage at Suburban and up to 5 km Coverage at Urban Area.
This device uses UART0. The default settings for the UART interface are 57600 bps, 8 bits, no parity, 1 Stop bit, no flow control. Hardware flow control pins are connected to the Raspberry Pi, but disabled by the LoRa module defaults. The connection settings are user configurable.
Cryptographic Co-Processor with Secure Hardware-Based Key Storage:
Protected storage for up to 16 keys, certificates or data
Hardware Support for Asymmetric Sign, Verify, Key Agreement:
ECDSA: FIPS186-3 Elliptic Curve Digital Signature
ECDH: FIPS SP800-56A Elliptic Curve Diffie-Hellman
NIST Standard P256 Elliptic Curve Support
Hardware Support for Symmetric Algorithms:
SHA-256 & HMAC Hash including off-chip context save/restore
AES-128: Encrypt/Decrypt, Galois Field Multiply for GCM
Networking Key Management Support:
Turnkey PRF/HKDF calculation for TLS 1.2 & 1.3
Ephemeral key generation and key agreement in SRAM
Small message encryption with keys entirely protected
Secure Boot Support:
Full ECDSA code signature validation, optional stored digest/signature
Optional communication key disablement prior to secure boot
Encryption/Authentication for messages to prevent on-board attacks
Internal High-Quality NIST SP 800-90A/B/C Random Number Generator (RNG)
Two High-Endurance Monotonic Counters
Unique 72-Bit Serial Number
This device uses 0xC0 address on the I2C bus. The address is user configurable.
Measures 4x analog inputs and internal temperature. Distributed to 2 Grove System compatible ports.
4 Channel Single-Ended Sampling:
0V to 3.3V measurement with 1/1650 resolution. (2.000mV)
0V to 2.048V measurement with 1/4096 resolution. (1.000mV)
0V to 1.024V measurement with 1/4096 resolution. (0.500mV)
0V to 0.512V measurement with 1/4096 resolution. (0.250mV)
0V to 0.256V measurement with 1/4096 resolution. (0.125mV)
2 Channel Differential Sampling:
Same of above resolutions.
Internal Temperature Measurement:
Used for system-level temperature monitoring or cold-junction compensation for thermocouples.
2C max error.
Programmable Continuous Sampling:
128 to 3300 samples per second.
High speed SPI bus.
This device uses the CS0 line of the SPI bus.
Measures 3 axis acceleration. Generates interrupt on tilt detect.
Acceleration: Measures +/- 8g acceleration data with 1 mg accuracy.
Tilt Detection: Generates interrupt over 0.688g acceleration or 43.5 degrees of tilt. X, Y and Z interrupts are connected to separate pins.
The sensor uses 0x55 address over the I2C bus.
LoRa HAT has 6 Grove System compatible ports.
2x I2C Ports: Provides SCL, SDA, 3.3V and GND pins for I2C and SMBus communications.
2x Digital Ports: Provides a total of 4 GPIO and power pins distributed in 2 ports.
2x Analog Ports (Mentioned above): 4 Channel analog inputs connected to the Analog-to-Digital Converter.
All digital and analog pins are 3.3V tolerant. Do not sink more than 50mA from the 3.3V power pins.
GPIO Pins on I/O sockets are connected to Raspberry Pi's GPIO 21, 22, 23 and 24 pins respectively.
This memory holds manufacturer information, GPIO setup and device tree. The OS loads required drivers and configures GPIO pins according to the data on this memory. ID EEPROM is required for Raspberry Pi HAT specification compliance.
Do not try to overwrite or erase the contents of the EEPROM as it may block the device's operation.
The EEPROM is connected to the I2C1 bus and requires root privileges for user access.
To get maximum performance from your hardware, please make sure you'll meet the following requirements.
We designed LoRa HAT to work with Raspberry Pi. Alternatively, you may wish to use any Raspberry Pi pin compatible device as an host.
You can use LoRa HAT with any operating system that supports UART, I2C, and SPI communications. We officially support Raspbian operating system.
LoRa HAT's Raspbian library supports Python. You can write Python code in any text editor. We recommend using Visual Studio Code as an editor.
Select your operating system for set-up and programming guidelines.
If you're experiencing difficulties while working with your device, please try the following steps.
Problem: UART communication error with the LoRa module. Cause: Our library uses the high-performance serial port, but Raspberry Pi's default serial port for HATs is the low-performance one. Solution: You should swap the serial ports of the Raspberry Pi. Set "/dev/ttyAMA0" to 'serial0'. Also, disable the console on 'serial0'. For a how-to, visit swapping the serial ports topic.