Problem initializing rfm69hcw adafruit module

i am using an arduino nano connected to a rfm69hcw, just trying to get it working after i have lost all hope with ebyte lora that are too unreliable, usually i don't post to forums to get help i just do research and find out on internet but this time i really don't know what to do.
i am using this script (wiring connection are in the code) but it gets stuck at the line:

if (!rf69.init()) {

the full code:

#include <SPI.h>
#include <RH_RF69.h>  // Include the RadioHead RFM69 library

// Pin definitions for Arduino Nano
#define RFM69_CS 10      // Chip Select (CS) pin - Pin 10
#define RFM69_INT 2      // Interrupt pin (DIO0) - Pin 2
#define RFM69_RST 9      // Reset pin - Pin 9

//SCK: Pin 13
//MOSI: Pin 11
//MISO: Pin 12
//CS: Pin 10


// RFM69 frequency in MHz
#define RF69_FREQ 915.0  // Choose 433.0, 868.0, or 915.0 MHz based on your module

// Initialize the RFM69 object with CS and Interrupt pin
RH_RF69 rf69(RFM69_CS, RFM69_INT);

void setup() {
  // Initialize the Serial Monitor
  Serial.begin(9600);
  while (!Serial); // Wait for Serial to initialize (optional)

  // Initialize the SPI bus
  SPI.begin();  // Arduino Nano uses default SPI pins (SCK: 13, MOSI: 11, MISO: 12)

  // Set up the Reset pin for RFM69
  pinMode(RFM69_RST, OUTPUT);

  // Reset the RFM69 module
  digitalWrite(RFM69_RST, LOW);
  delay(100);
  digitalWrite(RFM69_RST, HIGH);
  delay(100);

  // Initialize the RFM69 radio
  Serial.println("Initializing RFM69...");
  if (!rf69.init()) {
    Serial.println("RFM69 radio init failed");
    while (1);
  }
  Serial.println("RFM69 radio initialized");

  // Set the frequency
  if (!rf69.setFrequency(RF69_FREQ)) {
    Serial.println("setFrequency failed");
  }

  // Set encryption key (optional, can be disabled by commenting out)
  uint8_t key[] = "sampleEncryptKey";
  rf69.setEncryptionKey(key);  // 16-byte key

  // Set the power level (0 to 31)
  rf69.setTxPower(20, true);  // Set max power and enable high power mode for RFM69HCW

  Serial.println("RFM69 ready for communication");
}

void loop() {
  // Define the message to send
  const char *message = "Hello, World!";
  
  // Send the message
  Serial.print("Sending: ");
  Serial.println(message);
  
  rf69.send((uint8_t *)message, strlen(message));  // Transmit the message
  
  // Wait until the message has been fully transmitted
  rf69.waitPacketSent();
  
  Serial.println("Message sent!");
  
  // Wait a bit before sending the next message
  delay(1000);
}

so if you know what cna it be just let me know thanks anyway

Please state exactly which "nano" you are using (there are half a dozen of them), post a link the radio module you are using, and a wiring diagram (hand drawn is preferred, with all pins and connections clearly labeled).

Keep in mind that a bidirectional logic level converter is required to connect 5V Arduinos to 3.3V radio modules.

hey hello thanks for for the quick response first of all here is the connection diagram


now i will try to find the exact version of the nano
for the logic converter, i have seen other on youtube like the droneworkshop that use it with 5v logic level.
I have also read this quote from the guide on how to install the module on adafruit

so it should work even with 5v am i right? (btw didn't understand very well the quote but gpt says it's safe)

i don't know precisely the model but i have bought it from aliexpress a long ago this was the name on the site
Promozione per arduino Nano 3.0 Atmega328 Controller scheda compatibile modulo scheda di sviluppo PCB senza USB V3.0 mircro type-c
i know that it is not really precise but i have only this for now

Please post a link to the exact radio module that you have.

sorry i forgot, this is the radio model

i have soldered the big sma connector using a 915 mha antenna
also this is an image of the nano (maybe it helps)

Thanks, I don't see anything wrong with the wiring or code.

What are you using for the required antenna? A wire antenna works well, and doesn't require soldering an SMA connector.

You may have bad solder joints. Please post a close up, focused photo of the soldering to the radio module, and the Arduino.

here it his, first time soldering sma


tell me if you need a closer photo

I don't see an obvious problem, except that if TX and RX modules are that close together, the receiver may be overloaded. Set TX power to 0 (not 20) to prevent that.

If the code is stuck in the .init() call, the SPI communications are probably not working.
Use your multimeter to check continuity of all connections. Jumper wires can have internal breaks, and breadboard tracks can make unreliable connections.

Since you have two modules, try uploading the TX code to the "other" module and see if you have the same .init() failure.

with the multimeter every connection seems to be ok also the antenna is not connected with the ground shielding of the sma connector and i have tried swapping between the two modules (even a third one) but i have the same problem, can the chinese nano be the cause of the problems?

Since SPI communications appear to fail with both modules, the MCU is the primary suspect.

Do you have any other SPI devices you could test with it?

yes i have a bno08x should i try to see if it works?
i already know that it works with i2c

Of course you should!

If you are interested in radio communications, the Adafruit Feather radio modules are very well engineered, self contained and are guaranteed to work.

No need for the Nano clone and breadboard wiring!

ok give me a little bit because i never tried spi with it before, didn't think about cheeking this

which one do you suggest to me using? let me check them maybe they are the best solution

I've been using both the Feather M0 LoRa (915 MHz) and the Feather 32U4 LoRa (915 MHz), and am very pleased with their performance.

See GitHub - jremington/Feather-LoRa-Networks

By the way, I see that you mentioned "gpt". Did you get the posted code from chatGPT? If so, unless you have specifically enabled encryption in the RadioHead library, I can't see why it would even compile without errors, because of this line:

  // Set encryption key (optional, can be disabled by commenting out)
  uint8_t key[] = "sampleEncryptKey";
  rf69.setEncryptionKey(key);  // 16-byte key

The chatbots are NOT good places to find example code.

trying to upload the bno08x code to initialize but the dinamic memory get full maybe a better board can be useful, i need to run also this sensor in my project.
I wanted to use this antenna with the rpi pico but i couldn't even initialize it do you have any experience with it?

Strange. I've used the BNo080 with very small Arduinos (ATmega8 versions).

BTW thanks a lot for the suggestions they have been really helpful

Hi - not sure if you've resolved this yet, but one potential issue is the reset pin. I have a suspicion that the RESET pin is incorrectly documented by Adafruit for the RFM69HCW. If you look in section 7.2.2 Manual Reset in the datasheet for the RFM69HCW, you'll see that it is pulled LOW when it is active and you pulse it HIGH for >100 us to reset.

However, for the RFM95, the polarity of the reset pin is the opposite. It's section 7.2.2 Manual Reset again:

You can also see the differing pull up/down behaviour of the two modules. This would explain why your SPI transfer is failing - the RFM module is in reset.

If your section for reset, try changing the polarity of the reset as so:

// Reset the RFM69 module
digitalWrite(RFM69_RST, HIGH);
delay(100);
digitalWrite(RFM69_RST, LOW);
delay(100);

I don't use Arduino but came across this thread while looking at RFM module - hope this helps! This module has been out for a long time with Adafruit, so I'm a little surprised this hasn't been raised.

Note that you do not need to drive the reset pin the RFM module in normal operation at power on:

Again, polarity is inverted for the RFM95.