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


#68

Ok, well thanks again for your help


#69

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:


#70

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


#71

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


#72

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.


#73

Hi @bloukingfisher
I tried to compile RFM69-PARTICLE for a Xenon with OS 1.1.0 and it fails:

lib/RFM69-Particle/RFM69-Particle.cpp:501:64: ‘A7’ was not declared in this scope

However it is compiling with OS 0.9.0.
It is also compiling with OS 1.1.0 on a Photon.

Do you have any idea what are the changes in 1.1.0 impacting your library?
Thanks


#74

Not really a surprise that this throws an error since there actually is no A7 pin on Gen3 devcies.
The fact that it was compiling on 0.9.0 just shows that the non-existend pin was nevertheless “defined” which now got corrected.

This is the code part in question which should be filed as a GitHub issue in the library repository

  #elif defined(SPARK)
    // IRQ authorized on spark core are
    // D0, D1, D2, D3, D4, A0, A1, A3, A4, A5, A6, A7
    // see http://docs.spark.io/firmware/#interrupts-attachinterrupt
    if ( (newIRQ>=D0 && newIRQ<=D4 ) || (newIRQ>=A0 && newIRQ<=A7 && newIRQ!=A2) )
    {
      _interruptPin = newIRQ;
      _interruptNum = _interruptPin;
    }
  #else

The list of interrupt capable pins needs to be adapted for all platforms. As is it only is valid for the Spark Core (Gen1).


#75

Thanks. I modified manually the library, and it compiles.
However the board initialisation fails and return FALSE. I can successfully read the registers using the library RFM69::readAllRegs() and they are all to default value. It seems I can’t write, but I can read. I wonder if I missed something.

For more context, I am trying to read the RF messages send by an EmonTX from a Xenon, through an RFM69HCW.


#76

I’ve updated that code in the repository. Thanks @ScruffR for determining that. I’ve not tested the change or worked with this hardware for a long time so unfortunately can’t be of more help @Fabien


#77

I apologize for even asking, being that you’re saying that you haven’t been using the hardware in some time (I’m interested in what you moved on to), but do you remember which version of the Lowpowerlab arduino library you were using when you had success on post #16? I have really struggled and have tried multiple platforms (Uno, Pro Mini, even Moteino) and none have successfully sent a message to my Photon (running the hello-photon-rx-rfm69 example).

My use case requires wireless battery-powered sensors and I’m just exhausted with trying to figure this out.


#78

I don’t think there’s a library version number from Lowpowerlab. However, what was working for Photon is in my repository.

Have you tested Photon to Photon transmission/receive? That will at least confirm that your radios are wired up correctly and code is working between the 2 photons.

Also, check troubleshooting tips in my earlier post about power settings, etc.

The version of the RFM-69 library in my arduino folder you can download from here. The Arduino side of the code I posted before.

But I would first try to make sure you can do Photon to Photon. Plus, Felix and the community have updated that library significantly in the interim so for the Arduino side I would try the latest before falling back on this version (or try this and if it works, switch to the latest version…)

Also, post your serial output or other troubleshooting information which would make it easier to suggest approaches to get it working.


#79

@benbarnard FYI I moved onto an Anaren module which is FCC certified. It is 5X the cost of RFM69 but incorporating it in my commercial planned product saves future hassle around FCC certification.


#80

I actually only own one Photon, so I will order a second to confirm that the wiring is correct. I’m positive I’ll find a use for it anyway. I will start over with your advice and report back - again, thank you for being so generous with your time.

Anaren looks very interesting! Do you use this Atmosphere IDE that I’m seeing? Looks very different than Arduino.


#81

@benbarnard I don’t and haven’t looked at it. I use to just work in the Arduino IDE when I used the RFM module. Since then I have switched to Visual Studio with Visual Micro extension for Arduino based development.


#82

Update: The other Photon came in - it turns out that I’d wired the original Photon loosely somewhere (to the RFM69 breakout) to cause the failure. I now have two Moteinos communicated successfully with the Photons and am I working on modifying the example code to accommodate the sensor data I need. Thank you again for your advice. One last thing - what microcontroller platform are you using with those anaren modules? I have some commercial ideas too and had no idea that FCC certification was such a headache. Visual Micro looks fantastic.


#83

Happy to hear @benbarnard! Few things as frustrating as a hardware wiring issue to waste your time with software. I’m using the Anaren radios with Arduino sensors and Photon controllers.


#84

I have been a Moteino fan for several years. I have also integrated RFM69H and HW radios into both the Photon and ESP32. They work great for creating networks with both wireless access and large numbers of RF sensors. The library mentioned above worked without issue and the wiring is straightforward once you see it. The only issue I had going between Moteino’s and Photons using the RFM69 radio was that I had to surround my structures on the Photon side for any wireless packets with the following:

#pragma pack(push, 2)
#pragma pack(pop)

Once I did that, data flows like wine.


#85

Fabien - were you ever able to figure this out (3rd Gen -> RFM69)?

I’ve been working on just connecting an Arduino + RFM69 and taking the messages from that and forwarding them through a serial connection to my Boron. It’s a silly way to sidestep the issue, but it doesn’t add to the footprint so much that it’s a problem for me. Really need the LTE.


#86

I could compile the library but my application was not working. I was trying to read data send by an emonTx. I couldn’t get the data so I read it from the UART and publish it trough an Argon. It’s a bit dirty but it works.

I didn’t try with bloukingfisher latest library since the new version does not appear in the Particle Web IDE and I didn’t take the time to compile it locally.


#87

@Fabien I’ve updated the library to version 0.0.3 in Github. I’m assuming on some schedule Particle will pull in that version on https://build.particle.io/libs/RFM69-Particle/ for the Web IDE. I’ve lost track of the library process so if I need to do something to push it into the Web IDE let me know.