feathers2 and RFM9x LoRa radio can't find RFM9x

CircuitPython on hardware including Adafruit's boards, and CircuitPython libraries using Blinka on host computers.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
jfranklyn
 
Posts: 46
Joined: Fri Mar 13, 2020 6:50 pm

feathers2 and RFM9x LoRa radio can't find RFM9x

Post by jfranklyn »

Hello all,
I'm using a featherS2 with circuitpython 6.3.0 and adafruit-circuitpython-bundle-6.x-mpy-20210908. I'm using the instructions found at http://adafru.it/3072. I'm using the sample python code as is. I've checked the RFM9x radio board wiring and it is definitely getting 3v from the featherS2. When I run the code it fails on this line:
rfm9x = adafruit_rfm9x.RFM9x(spi, CS, RESET, RADIO_FREQ_MHZ, baudrate=1000000)

With this error:
RuntimeError: Failed to find rfm9x with expected version -- check wiring

Since I'm wired to a breadboard I tried adding the baudrate property, but the error does not change. I've also replaced all the wiring and still get the same error.

I have this file from the circuitpython bundle in the LIB folder on the featherS2:
adafruit_rfm9x.mpy
I also have this folder in the LIB folder:
adafruit_bus_device

I've tried replacing the .mpy file with the latest adafruit-circuitpython-rfm9x-py-2.2.0. I put adafruit_rfm9x.py in the root folder on the featherS2. The error does not change.

Any help would be greatly appreciated.
Thanks

This is the wiring I have for the 2 boards:
RFM9x LoRa radio wiring
RFM9x LoRa radio wiring
20210909_161305.jpg (896.94 KiB) Viewed 63 times
feathers2 wiring
feathers2 wiring
20210909_161326.jpg (981.35 KiB) Viewed 63 times

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: feathers2 and RFM9x LoRa radio can't find RFM9x

Post by mikeysklar »

I think the D5 and D6 equivalents on the FeatherS2 might be on pins printed on the board at locations #1 and #3.
90601948-2EAF-42C6-BD16-7838CE5A1D92.jpeg
90601948-2EAF-42C6-BD16-7838CE5A1D92.jpeg (1.35 MiB) Viewed 51 times

User avatar
jfranklyn
 
Posts: 46
Joined: Fri Mar 13, 2020 6:50 pm

Re: feathers2 and RFM9x LoRa radio can't find RFM9x

Post by jfranklyn »

Hello,
Thanks for the reply, but it seems I still have something wrong. This is the example code I'm using:

Code: Select all

RADIO_FREQ_MHZ = 915.0  

CS = digitalio.DigitalInOut(board.D5)
RESET = digitalio.DigitalInOut(board.D6)

spi = busio.SPI(board.SCK, MOSI=board.MOSI, MISO=board.MISO)

# Initialze RFM radio. added baudrate property because I'm breadboarding at this point
rfm9x = adafruit_rfm9x.RFM9x(spi, CS, RESET, RADIO_FREQ_MHZ, baudrate=1000000)
I've changed the wiring so that CS is wired to pin #1 and RESET is wired to pin #3 on the featherS2. I've also tried other combinations of the pins for CS, RESET and I still get the same error from the initialize RFM radio code line:
RuntimeError: Failed to find rfm9x with expected version -- check wiring

These are the files in the lib folder on the featherS2: adafruit_rfm9x.mpy, adafruit_bus_device folder is dated 09/08/21. I'm running circuitpython 6.3.0.

Thanks for all your help.

User avatar
jerryn
 
Posts: 1868
Joined: Sat Sep 14, 2013 9:05 am

Re: feathers2 and RFM9x LoRa radio can't find RFM9x

Post by jerryn »

on the Feather S2 the pins labeled 5 and 6 are board.D19 and board.D18 -- (or board.IO5 and board.IO6) -- not D5, D6.


edited to add -- I see now that you have moved to IO1 and IO3 which "should" be D5 and D6... sorry for the confusion.
I have been Using CS on IO3 and RESET on IO7 with a feather S2 for a long time.

User avatar
jerryn
 
Posts: 1868
Joined: Sat Sep 14, 2013 9:05 am

Re: feathers2 and RFM9x LoRa radio can't find RFM9x

Post by jerryn »

AH -- I think you have MOSI/MOSO reversed -- I know the raveling is confusing, but on the Feather Board, the order is
SCK/MOSI/MISO
SDO is MOSI
SDI is MISO

User avatar
jfranklyn
 
Posts: 46
Joined: Fri Mar 13, 2020 6:50 pm

Re: feathers2 and RFM9x LoRa radio can't find RFM9x

Post by jfranklyn »

you guys are the best. I really appreciate all your help. Thanks

Locked
Please be positive and constructive with your questions and comments.

Return to “Adafruit CircuitPython”