arduino-LoRa icon indicating copy to clipboard operation
arduino-LoRa copied to clipboard

Using two SPI for two lora modules (rfm95s)

Open note5 opened this issue 2 years ago • 3 comments

I would like to use two rfm95 chips as receivers with different spreadings factors and frequecies, How can I instantiate the library so that I can have two instances for two spi connections ?

note5 avatar Feb 20 '22 14:02 note5

Use the default Lora class for one module, and instantiate another class instance, say LoRaClass LoRa1; for the other.

Kongduino avatar Feb 21 '22 03:02 Kongduino

Thank you, Can we also have the spreading factor be open so that we can listen for any spreading factor on a particular frequency ?

note5 avatar Feb 21 '22 14:02 note5

No, everything (frequency, SF, BW, CR) has to be set to a certain setting. What you can do is hop between settings – usually it's done for frequencies, rather than other settings – and ask the LoRa chip whether there's anything incoming. The problem is, if you have transmissions on the same freq at different SF settings, the answer will always be yes, but the results will be unpredictable. If you want to have several channels on the same chip, try with frequencies, rather than anything else.

Kongduino avatar Feb 23 '22 00:02 Kongduino