Due to high demand expect some shipping delays at this time, orders may not ship for 1-2 business days.
0

feather rp2040 and rfm69 breakout not working
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

feather rp2040 and rfm69 breakout not working

by Rcayot on Sun May 02, 2021 4:20 pm

I have been trying to use the rfm69 radio module. While just beginning, I hooked up the radio breakout to the feather and tried the simpletest from examples, with no apparent troubles. I did the same for my rfm69 radio bonnet for my Raspberry Pi 4B.

Once both were working on thyat, I decided to solder the antennas to the radios, and beging some of the other examples and see if I could get communication. I am now getting a weird error, that suggests that the communications between the feather and the radio are not working.

Heere is the error I get:
Code: Select all | TOGGLE FULL SIZE
>>> %Run code.py
Traceback (most recent call last):
  File "/media/pi/CIRCUITPY1/code.py", line 27, in <module>
    rfm69 = adafruit_rfm69.RFM69(spi, CS, RESET, RADIO_FREQ_MHZ)
  File "/usr/local/lib/python3.7/dist-packages/adafruit_rfm69.py", line 267, in __init__
    "Failed to find RFM69 with expected version, check wiring!"
RuntimeError: Failed to find RFM69 with expected version, check wiring!
>>>


So, I checked, rechecked, and re-rechecked teh wiring, and it appears correct. Next, I replaced each jumper to see if one was defective, no joy. I am at a loss as to what to do next to troubleshoot.

Here is my wiring:
Image

and here is teh code:
Code: Select all | TOGGLE FULL SIZE
# SPDX-FileCopyrightText: 2020 Jerry Needell for Adafruit Industries
# SPDX-License-Identifier: MIT

# Example to send a packet periodically

import time
import board
import busio
import digitalio
import adafruit_rfm69

# set the time interval (seconds) for sending packets
transmit_interval = 10

# Define radio parameters.
RADIO_FREQ_MHZ = 915.0  # Frequency of the radio in Mhz. Must match your
# module! Can be a value like 915.0, 433.0, etc.

# Define pins connected to the chip.
CS = digitalio.DigitalInOut(board.D5)
RESET = digitalio.DigitalInOut(board.D6)

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

# Initialze RFM radio
rfm69 = adafruit_rfm69.RFM69(spi, CS, RESET, RADIO_FREQ_MHZ)

# Optionally set an encryption key (16 byte AES key). MUST match both
# on the transmitter and receiver (or be set to None to disable/the default).
rfm69.encryption_key = (
b"\x01\x02\x03\x04\x05\x06\x07\x08\x01\x02\x03\x04\x05\x06\x07\x08"
)

# initialize counter
counter = 0
# send a broadcast mesage
rfm69.send(bytes("message number {}".format(counter), "UTF-8"))

# Wait to receive packets.
print("Waiting for packets...")
# initialize flag and timer
send_reading = False
time_now = time.monotonic()
while True:
    # Look for a new packet - wait up to 5 seconds:
    packet = rfm69.receive(timeout=5.0)
    # If no packet was received during the timeout then None is returned.
    if packet is not None:
        # Received a packet!
        # Print out the raw bytes of the packet:
        print("Received (raw bytes): {0}".format(packet))
        # send reading after any packet received
    if time.monotonic() - time_now > transmit_interval:
        # reset timeer
        time_now = time.monotonic()
        # clear flag to send data
        send_reading = False
        counter = counter + 1
        rfm69.send(bytes("message number {}".format(counter), "UTF-8"))

Rcayot
 
Posts: 148
Joined: Sat Feb 08, 2020 6:48 pm

Re: feather rp2040 and rfm69 breakout not working

by Rcayot on Mon May 03, 2021 5:52 pm

bump.

Could really use some help.
Roger

Rcayot
 
Posts: 148
Joined: Sat Feb 08, 2020 6:48 pm

Re: feather rp2040 and rfm69 breakout not working

by jerryn on Mon May 03, 2021 7:18 pm

I hooked one up and found the same issue -- I was able to get it to work by moving the CS/RESET pins.
It works with CS on D9 and RESET on D10

Looking at the pinout diagram it looks like the SPI pins are conflicting with D5
There appears to be some duplication of pins. Not sure why.
https://learn.adafruit.com/adafruit-feather-rp2040-pico/pinouts

If you can move to D9/D10 it should work.

Edited to add -- the pinouts are very complex for this board -- see https://learn.adafruit.com/adafruit-feather-rp2040-pico/pinouts#gpio-pins-by-pin-functionality-3085195-12 for some information/confusion ;-)

Bottom line is D5 is also MOSI for SPI0

jerryn
 
Posts: 1437
Joined: Sat Sep 14, 2013 9:05 am

Re: feather rp2040 and rfm69 breakout not working

by Rcayot on Mon May 03, 2021 7:44 pm

Thank you. Makes sense. I will try it a bit later.

Roger

Rcayot
 
Posts: 148
Joined: Sat Feb 08, 2020 6:48 pm

Re: feather rp2040 and rfm69 breakout not working

by jerryn on Mon May 03, 2021 8:25 pm

Sorry -- I was wrong -- it works fine with D5/D6 -- it failed for me initially because I had another featherwing connected that was conflicting with those pins.

jerryn
 
Posts: 1437
Joined: Sat Sep 14, 2013 9:05 am

Re: feather rp2040 and rfm69 breakout not working

by adafruit_support_carter on Mon May 03, 2021 8:27 pm

It should be fine on those pins. The RP2040 chip itself has the ability to mux things, like SPI and I2C, to many different pins. But for the Feather, specific pins have been chosen. So there should not be any conflict.

It sounds like this was originally working?
While just beginning, I hooked up the radio breakout to the feather and tried the simpletest from examples, with no apparent troubles.

Can you clarify that. What was done above?

adafruit_support_carter
 
Posts: 20103
Joined: Tue Nov 29, 2016 2:45 pm

Re: feather rp2040 and rfm69 breakout not working

by Rcayot on Mon May 03, 2021 8:34 pm

Bill,

While just beginning, I hooked up the radio breakout to the feather and tried the simpletest from examples, with no apparent troubles.

I remember wiring it up, and running the example codes. There was not this error, I had a few tries getting the library set up, and when I ran the exam ple, there was no error like this, but there was also no send/recieve from my radio bonnet on the Pi. I took that to mean that maybe the boards needed an antenna, so I soldered one on to both the breakout and the radio bonnet to see if the pair could send/recieve.

What happened was that the error started showing up. Now, I may be wrong in my recollection, I can get CRS, but I am pretty sure.

I thought maybe it was the radio board, and I have a second, soldfered an antenna to it, and same error. I have another board (itsy bitsy M4 express) I can try.

Roger

Rcayot
 
Posts: 148
Joined: Sat Feb 08, 2020 6:48 pm

Re: feather rp2040 and rfm69 breakout not working

by adafruit_support_carter on Mon May 03, 2021 8:45 pm

Where it's failing in your current code, it has nothing to do with any radio tx/rx functionality. It's just trying to connect (over SPI) to the RFM and sanity check the connection by reading and comparing the module's version. The same thing would have been done with any initial basic tests.

It may have something to do with soldering on antennas. Or something else that changed. Can you post a photo of your current setup so we can check for any obvious hardware issues.

adafruit_support_carter
 
Posts: 20103
Joined: Tue Nov 29, 2016 2:45 pm

Re: feather rp2040 and rfm69 breakout not working

by Rcayot on Mon May 03, 2021 9:31 pm

Carter,

There is a link to a picture of my set up in the initial post. It is a shared Google Drive file. Right click and open in new tab and you should be able to see it. I am not sure why the image itself does not show up.

I realize that the error is due to failure of the board to establish SPI with te breakout.

Roger

Rcayot
 
Posts: 148
Joined: Sat Feb 08, 2020 6:48 pm

Re: feather rp2040 and rfm69 breakout not working

by adafruit_support_carter on Mon May 03, 2021 9:51 pm

Looks like the link didn't come through for some reason. Can you please post again.

adafruit_support_carter
 
Posts: 20103
Joined: Tue Nov 29, 2016 2:45 pm

Re: feather rp2040 and rfm69 breakout not working

by Rcayot on Tue May 04, 2021 7:41 am

Last edited by adafruit_support_carter on Tue May 04, 2021 12:11 pm, edited 2 times in total.
Reason: changed [img] tag to [url] tag

Rcayot
 
Posts: 148
Joined: Sat Feb 08, 2020 6:48 pm

Re: feather rp2040 and rfm69 breakout not working

by Rcayot on Tue May 04, 2021 7:46 am

I tried my itsybitsy M4 express, hooked up in similar fashion, and got the same result.

Note that for troubleshooting, I replaced each jumper wire, and I even used a second radio module with the same results.

I hope you see something in my hookup that I do not.

Roger

Rcayot
 
Posts: 148
Joined: Sat Feb 08, 2020 6:48 pm

Re: feather rp2040 and rfm69 breakout not working

by adafruit_support_carter on Tue May 04, 2021 11:08 am

For some reason the link to photos is still not coming through. How are you trying to post the link? Are you getting any errors from the forums when trying to share the link?

adafruit_support_carter
 
Posts: 20103
Joined: Tue Nov 29, 2016 2:45 pm

Re: feather rp2040 and rfm69 breakout not working

by Rcayot on Tue May 04, 2021 11:26 am

two things:

#1. It works now. I tried Mu instead of Thonny because I think I understand it better, and lo and behold, it works. So I went back to Thonny, and selected CircuitPython as interpreter, and it also worked. Why it changed from when it was working before, I have no idea.

#2, I use the "insert image" featurea nd paste a link to my shared image on google drive. I can see it, but somehow, you cannot. Is there an instruction on how it works somewhere?

Roger

Rcayot
 
Posts: 148
Joined: Sat Feb 08, 2020 6:48 pm

Re: feather rp2040 and rfm69 breakout not working

by adafruit_support_carter on Tue May 04, 2021 12:16 pm

Ah, OK, sort of figured it out. The URL isn't to an actual image, so it wasn't showing it as a link. Edited your post to change to a [url] tag instead. But following the URL doesn't open up anything for some reason, so still can't see anything.

But it sounds like it's working now, so no worries. Glad you figured it out. Let us know if you run into any more issues. But hopefully it'll all just work now. Have fun!

adafruit_support_carter
 
Posts: 20103
Joined: Tue Nov 29, 2016 2:45 pm

Please be positive and constructive with your questions and comments.


cron