This library is for LoRa modules (Sx127x) based on the Python language and has been tested on:
- Raspberry Pi Zero W
- Raspberry Pi 3B
- and Raspberry Pi 4.
![](https://private-user-images.githubusercontent.com/32528196/258217040-0bc675ac-c290-40a2-b215-b1e692aad894.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwMTE5MDIsIm5iZiI6MTczOTAxMTYwMiwicGF0aCI6Ii8zMjUyODE5Ni8yNTgyMTcwNDAtMGJjNjc1YWMtYzI5MC00MGEyLWIyMTUtYjFlNjkyYWFkODk0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA4VDEwNDY0MlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQ1YzYzNWQ0YjBjODlmN2ExNmU5NGFmODk1ZGI4NGY1NGRhYThhNDA5NDFiMTRhY2MyNzI5ODdmZTQ1Nzk3YWYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.h4JUiwgWQ2geB-ktLNhtZHhWEZAIomB-satnJ45zzAo)
You can change DIO0 to DIO5, RESET, and NSS pins and assign them your desired pins.
SX127x Pin | Raspberry Pi Pin |
---|---|
SCLK Pin | GPIO 11 |
MISO Pin | GPIO 9 |
MOSI Pin | GPIO 10 |
NSS Pin | GPIO 8 |
RST Pin | Desire |
DIO0 Pin | Desire |
DIO1 Pin | Desire |
DIO2 Pin | Desire |
DIO3 Pin | Desire |
DIO4 Pin | Desire |
DIO5 Pin | Desire |
- Some boards (like the Raspberry Pi Zero W), cannot supply enough current for TX mode. So, use an external 3.3V supply that can provide at least 120mA. (Or use lower Transmitting power)
- These modules work with 3.3v (Or a maximum voltage equal to 3.7v), so be careful and don't connect your module to 5v, otherwise, you will damage your module.
To install the package use the below command:
sudo pip3 install LoRathon
Requirement packages will be installed automatically.
Check API.md file for usage toturial.
https://medium.com/@miladnorouzi77/lora-with-raspberry-pi-c5bda3103d8d