How to make RFM69 work on Photon? [SOLVED - new library RFM69-Particle]


Sorry about that. I am trying to keep this all organized. Regardless, I am back working again. [quote=“bloukingfisher, post:60, topic:26497”]
So it looks like the RX is receiving everything? And it also returns an ACK so the TX should know that the message went through

Yes, I would agree. I am confused by Failed to Send on the TX side. What is that telling me? Why am I only getting occasional Ok, send with retry? Again, what is that telling me?

I made the changes to the RX code, flashed it and no real difference that I see. Here is a copy of RX serial and you can see where I reset the TX board

and here is the TX serial

Thanks for the link BTW Ill start reading it


I see. Perplexing.

I would (in addition to reading the link):

  1. Again, swap the RX and TX hardware. It looks like the TX side is having an issue with receiving, but yet sending fine. You want to test and make sure both can units can receive equally well.

  2. Add code to the TX side to print out the RSSI of the ACK that it seems to receive 1/10 times. The RSSI strength should very closely match the RSSI the RX is reporting. But if it is much lower (say RX reports -52 or -86 and TX reports -96 or -110) it’s telling you the TX unit is not receiving the way it should.


Well this is getting a bit above me but here is what I attepted with adding the RSSI portion to the TX code

void loop() {

  Serial.print("."); //THis gives us a neat visual indication of time between messages received

  char radiopacket[20] = "Hello Photon #";
  itoa(packetnum++, radiopacket+13, 10);
  Serial.print("Sending "); Serial.println(radiopacket);
  //send the message
    // Uncomment below and comment out above if you want to send with retry (which will look for an ACK message or resends)
    if (radio.sendWithRetry(RECEIVER, radiopacket, strlen(radiopacket))) { //target node Id, message as string or byte array, message length
     Serial.println("OK, sent with retry");
      Serial.println("Failed to send");  
    //send message to Particle console if not using serial
    String TXMessage = "[NODE: " + String(NODEID) + "]  " + String(radiopacket) + " ";
    Particle.publish("Message transmitted",TXMessage,360,PRIVATE);    
    radio.receiveDone(); //put radio in RX mode
      //print message received to serial
    Serial.println(" ");
    Serial.print('[');Serial.print(radio.SENDERID);Serial.print("] ");
    Serial.print("   [RX_RSSI:");Serial.print(radio.RSSI);Serial.print("]");
    //send message to Particle console if not using serial
    String RXMessage = "[" + String(radio.SENDERID) + "]  " + String((char*)radio.DATA) + " [RSSI: " + String(radio.RSSI) + "]";
    Particle.publish("Message received",RXMessage,360,PRIVATE);

  delay(2000);  //wait 2 seconds between transmits

} //end loop

If that is correct, then my TX board is not RX at all because I am seeing [RX_RSSI:0]

Changed roles on the hardware and the results are the same.
Thank you


OK, with hardware swapped with the same result that minimizes a hardware issue.

Because with failed to send you never received an ACK you also will not have an RSSI, thus the 0. You will need to look for the odd “OK, sent with retry” to see if it reports the RSSI.

Maybe try the example code from the Sparkfun link (with the correct #include for particle libraries), or example code from RadioHead examples. I know the code worked for me (primarily on non-HW versions, although I briefly tested 1 HW unit on the TX side but may not have used sendWithRetry).

Do me a favor if you can - comment out all the particle publish lines from both RX and TX and test again.


Ah, makes sense

Ill do it and let you know]


results are the same. RX_RSSI:-82, TX_RSSI:0


I’m not sure where to go other than starting with the RadioHead or Sparkfun examples.

You can try lastRssi() instead - but still, you need to receive at least one message to obtain the value.


Ok, well thanks again for your help


I changed the delay in the last line of the TX code to this

delay(300);  //wait 2 seconds between transmits

and have now achieved more reliable “Ok,sent with retry” results. Still no RSSI though :tired_face:


The RFM95w radio modules are working if you want something that works now :slight_smile:


My lack of getting radio modules to work is taking me up the ladder to increasingly more expensive modules! Do you have a link to an RFM95w you would recoomend? The other to note is that I would eventlually like to run these radios on a system that uses an Electron with xyz radio as a server and up to 6 pro mini’s with xyz radio as nodes. Cost is important of course but making a reliable system is also important
Thanks @RWB


There are tons of different RFM95w Radios or Radios + Processors that you can pick from. Adafruit carries all you would need.

Here is the thread with the info you need to get them working.