LoRaRF-Python icon indicating copy to clipboard operation
LoRaRF-Python copied to clipboard

The library doesn't work with multipple modules.

Open VovaN60 opened this issue 2 years ago • 3 comments
trafficstars

Hello Dear,

The lib doesn't support multipple SPI LoRa modules. When i create a multipple SX126x() objects all seams to work. But in reality it works with only 1 module. Here what i modified in the library and now it is all works: Removed this: spi = spidev.SpiDev() Added this: self._spi = spidev.SpiDev() to def setSpi function of the object.

Please confirm it is right. And may be add to the lib. So people can use multiple modules.

VovaN60 avatar May 02 '23 11:05 VovaN60

Hello dear,

Actually you can use multiple SX126x object to transmit and receive.

You just need call setActive() method on the object before call beginTransmission() or request() method.

chandrawi avatar May 15 '23 00:05 chandrawi

Dear @chandrawi

I think you are talking about Arduino SPI work. I am running your library on RPi.

VovaN60 avatar May 15 '23 11:05 VovaN60

Ok, I noticed now there is no setActive() method in LoRaRF-Python library.

I think your solution for supporting multiple SX126x object is fine. Feel free to pull request and I will include it in the next release.

chandrawi avatar May 19 '23 07:05 chandrawi