Open tlrobinson opened 4 years ago
Heh, I just found the LoRa library’s defaults listed here which would have made figuring this out a little easier https://github.com/sandeepmistry/arduino-LoRa/blob/master/API.md#radio-parameters
I am figuring out the lora parameters for ESP32. I have 2s TTGO T-Beams with sx1278 so they are 433Mhz. So I need to change from the default 915Mhz. It seems to be defined in .pio/libdeps/ttgo-lora32-tbeam/LoRaLayer2/src/Layer1_LoRa.cpp. I cant find the bandwidth being defined anywhere though and that greatly affects speed vs range tradeoff. In my initial experiments using an example from a different lora library (https://github.com/LoRaTracker/SX12XX-LoRa) I need to set 31250hz to get any sort of reasonable range in an urban env. Its quite slow but works across the town - spreading 12, code rate 4/6, and LDRO. The antennas supplied with the units may be part of the issue, they are about 45mm long.
Thats better than what I did modifying the library.Thanks
I have a LoStik and took some time to figure out how to get it to receive disaster-radio messages (and parse them). I figured this might be useful to someone, so maybe it could be added to the Wiki.
The important part is these commands to configure the RN2903 chip to match what disaster-radio does. I'm not sure if these are all documented for disaster radio anywhere:
radio set mod lora
radio set freq 915000000
radio set bw 125
radio set sf sf9
radio set sync 12
radio set cr 4/6
radio set crc off
radio set prlen 12
Here's the complete code, forked from LoStik's radio_receiver.py example: