471,324 Members | 1,453 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,324 software developers and data experts.

LoRa with Raspberry pi and Python


I am trying to make two raspberry pi communicate through LoRa (SX127x). (https://media.digikey.com/pdf/Data%20Sheets/Semtech%20PDFs/SX1272MB2DAS_HM.PDF)

When I try the following code, I get the following error :

Code :
**import digitalio
import board
import busio
import adafruit_rfm9x

CS = digitalio.DigitalInOut(board.CE1)
RESET = digitalio.DigitalInOut(board.D25)
spi = busio.SPI(board.SCK, MOSI=board.MOSI, MISO=board.MISO)
rfm9x = adafruit_rfm9x.RFM9x(spi, CS, RESET, RADIO_FREQ_MHZ)**

Error :
Traceback (most recent call last):
File "/home/pi/Downloads/test.py", line 10, in
rfm9x = adafruit_rfm9x.RFM9x(spi, CS, RESET, RADIO_FREQ_MHZ)
File "/usr/local/lib/python3.7/dist-packages/adafruit_rfm9x.py", line 250, in init
"Failed to find rfm9x with expected version -- check wiring"
RuntimeError: Failed to find rfm9x with expected version -- check wiring

The wiring is good (double-triple-quadruple checked)

I tried switching CE1 and CE2 and GPIO's, but it doesn't seem to work.

Now I know that this is a RFM library, but the RFM is build on SX127x's chips isn't it?

Any help would be greatly appreciated!

The library I first tried is this one : https://github.com/adafruit/Adafruit_CircuitPython_RFM9x
Jul 7 '21 #1
0 2250

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.