Open vinityadava opened 7 months ago
You must be following the current examples; but those were refactored (commit 67cb5c9) after the v1.4.0 release (commit 86572c3), so they reference a new API that doesn't exist in the published version.
You have two options:
Install the bleeding-edge version with:
pip3 install git+https://github.com/chandrawi/LoRaRF-Python.git
Note that you might get a No module named 'gpiod'
exception with this version, so you'll need to install libgpiod -- if you're on Ubuntu/Debian, run sudo apt install python3-libgpiod
.
Stay with the current v1.4.0, but reference the examples from that version.
Thank you for that, I followed the same (1).
but now it says,
Do you not have SPI enabled?
If you run ls /dev/spi*
, you should see something like this:
...if not, then you don't have SPI enabled (and that's why you see a "file not found" error).
Yes, I have enabled it.
Let me give you the context, I am using raspberrypi Zero w with Lora module SX1262. And I am trying to run transmitter,py file here.
I am using raspberrypi Zero w with Lora module SX1262
Same! And mine is working.
After looking closer at the error message, I see a reference to gpiod/chip.py
, but you shouldn't be using a module called "gpiod," I don't think -- I don't have that in my environment, anyway. Seems like your Python environment might be goofy. But I'm just guessing, not sure what else to advise.
Can you recommend what OS you are using? I am using raspberrypi OS(Legacy) with desktop 32 bit
I'm using DietPi, 64-bit (bookworm). But its Apt uses the Debian repos, so it'd be the same as Raspbian (or legacy Raspberry Pi OS). But I don't think this is an OS issue.
I just noticed that LoRaRF is using gpiod
:
https://github.com/chandrawi/LoRaRF-Python/blob/67cb5c96fd4bb95db57e176590ced4b78b3f1192/LoRaRF/base.py#L2
... so I was half-way wrong earlier.
So what happens if you run this?
python3 -c "import gpiod; print( gpiod.__file__ )"
For me, it returns /usr/lib/python3/dist-packages/gpiod.cpython-311-aarch64-linux-gnu.so
-- a compiled shared object, not a straight Python file (which is consistent with what the Debian package installs for my system).
I would expect yours to return /usr/lib/python3/dist-packages/gpiod.cpython-311-i386-linux-gnu.so
, and if so, then maybe just delete ~/.local/lib/python3.9/site-packages/gpiod
?
Thanks @MaffooClock I resolved the issue by following above steps, and succesfully transmitting and receiving data.
Now i want to send the list of floats but it is showing the error Type error. I have mentioned it in issue 13 /issue #21
Can you help about it?
I was installing the network node from network folder , but it throws this error when pressed run. Can anyone resolve it?