1

I have already connected succesfully the rfm69 on my Feather M0 Express... but I cannot do it again.

The connections are (in the order of the rfm69):

Vin -> 3V
Gnd -> Gnd
En  -> (nothing)
G0  -> 9
SCK -> SCK
MISO -> MI
MOSI -> MO
CS  -> 10
RST -> 6

The code of the setup is

#include <SPI.h>
#include <RH_RF69.h>

#define RFM69_CS      10
#define RFM69_INT     9
#define RFM69_RST     6
#define LED           13

// Singleton instance of the radio driver
RH_RF69 rf69(RFM69_CS, RFM69_INT);

void setup() 
{
  Serial.begin(9600);
  while (!Serial);

  Serial.println("Feather RFM69 RX Test!");
  Serial.println();

  // manual reset
  digitalWrite(RFM69_RST, HIGH);
  delay(10);
  digitalWrite(RFM69_RST, LOW);
  delay(10);

  if (!rf69.init())                  
    //***********************************
    Serial.println("init failed"); 
  else
    Serial.println("init ok"); 
  
  // Defaults after init are 434.0MHz, modulation GFSK_Rb250Fd250, +13dbM (for low power module)
  // No encryption
  if (!rf69.setFrequency(434.0))
    Serial.println("setFrequency failed");
  else
    Serial.println("setFrequency ok"); 

  // If you are using a high power RF69 eg RFM69HW, you *must* set a Tx power with the
  // ishighpowermodule flag set like this:
  //rf69.setTxPower(14, true);

  // The encryption key has to be the same as the one in the client
  uint8_t key[] = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
                    0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08};
  rf69.setEncryptionKey(key);
  
#if 0
  // For compat with RFM69 Struct_send
  rf69.setModemConfig(RH_RF69::GFSK_Rb250Fd250);
  rf69.setPreambleLength(3);
  uint8_t syncwords[] = { 0x2d, 0x64 };
  rf69.setSyncWords(syncwords, sizeof(syncwords));
  rf69.setEncryptionKey((uint8_t*)"thisIsEncryptKey");
#endif
  Serial.println("Fin du Setup"); 
}

But during the execution, the program stops at //************************** I do not understand.

Can somebody help me?

Thanks a lot and merry Xmas

1
  • To be clear, you are seeing "init failed" printing and then no further output on the Serial Monitor, is that correct?
    – timemage
    Commented Dec 23, 2020 at 15:00

1 Answer 1

1

The "init failed" do not appear. Everything stops at "//******". I have compared to another RFM69 program. I have added a line " digitalWrite(RFM69_RST, LOW);" at the begining of the "//manual reset" and it works now. the sequence digitalWrite(RFM69_RST, LOW); digitalWrite(RFM69_RST, HIGH); delay(10); digitalWrite(RFM69_RST, LOW); seems to be more efficient. ... it remains a few mysteriuos for me.

Thank you

2
  • 1
    You should be able to mark your answer as accepted.
    – timemage
    Commented Dec 25, 2020 at 17:05
  • Sorry, I do not understand what you mean... it seems thus I am not able to do it. I almost never use forums. Commented Dec 30, 2020 at 10:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.