Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The library doesn't work with multipple modules. #12

Open
VovaN60 opened this issue May 2, 2023 · 3 comments
Open

The library doesn't work with multipple modules. #12

VovaN60 opened this issue May 2, 2023 · 3 comments

Comments

@VovaN60
Copy link

VovaN60 commented May 2, 2023

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.

@chandrawi
Copy link
Owner

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.

@VovaN60
Copy link
Author

VovaN60 commented May 15, 2023

Dear @chandrawi

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

@chandrawi
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants