Closed BasMiienis closed 2 years ago
I am trying to use the SX126x_simple_node.py example and get the following error:
i named the file lora.py
Begin LoRa radio
Traceback (most recent call last):
File "lora.py", line 17, in
It most likely because SPI configuration on your raspberry pi is not correct. In SX126x_simple_node.py SPI bus id is 1 and cs is 0, but bus id 1 is not activated by default on newly installed raspberry pi OS. To activate SPI with bus id 1 on raspberry pi you should edit /boot/config.txt
dtparam=spi=on
dtoverlay=spi1-3cs
After edit the file restart raspberry pi and check if SPI1 is already active using command
ls -l /dev/spidev*
If everything ok, then you will see
/dev/spidev0.0 /dev/spidev0.1 /dev/spidev1.0 /dev/spidev1.1 /dev/spidev1.2
Alternatively you can change your code to use SPI bus id to 0
I found waveshare SX1262_915M_LoRa_HAT is using UART to connect to raspberry pi. So this package will not works. This package only works for connecting SX126x LoRa module using SPI.
Hello
I have installed the package on my rasberry pi to start using the waveshare SX1262_915M_LoRa_HAT
however i get an import error ImportError: cannot import name 'LoRaIO' from 'main' (SX126x.py)
have you expierence this?
many thanks
regards
Bas