This repo implements more than basic SX1276 operations while Learn_SX1276 shows all the basics.
MicroPython Library for SX1276 LoRa radio modem
- Send request, ask for response from a specified recipient, and broadcast.
- Implement FHSS (first?)
- FCC mandates frequency hopping if dwell time is above the threshold 400ms.
- Large spreading factor and narrow bandwidth can significantly prolong the dwell time so that freq hopping is necessary for transmiiting large packet.
- Two ESP32 with SX1276 (Heltec WiFi LoRa 32 V2)
- VScode with Pico-Go extension
- I configured project and global settings pico-go.json for Pico-Go ext so I can open two VScode window/instances and connect to two ESP32 boards simultanously
- Connect two boards to dev machine
- Open sender and receiver folders in two separate VScode windows.
- Upload lora.py to boards
- Run sender.py and receiver.py
- To prove the point of frequency hopping, I use a RTL-SDR to monitor the spectrum. In following waterfall diagram, we see the signal hops between 914 and 916MHz as I programmed it to be.
- FHSS is not necessary if the message is short. For example, a 29Bytes packet can be transmitted under 400ms, given parameters {SF:10, BW:125kHz, CR:4/5, Header: Explicit , Preamble: 6}.
Download the above air time calculator
- It is meaningless to do Channel Activity Detection (CAD) before Tx because SX1276 only match elusive preambles which last few milliseconds. No good solution to do Listen Before Talk or CSMA.