LowPowerLab Forum

Hardware support => RF - Range - Antennas - RFM69 library => Topic started by: robbyr on April 06, 2019, 02:33:47 AM

Title: Random receive fail/hang on Sparkfun RFM69HCW breakout
Post by: robbyr on April 06, 2019, 02:33:47 AM
Hi,
I'm having (seemingly) random receive failures on my RFM69HCW gateway.   I'm using a RFM69HCW from Sparkfun with a breadboarded atmega328 running at 8mHz and 3.3 volts.  It might work fine for 2 weeks and then maybe hang twice in one day, or maybe hang up every couple of days.  It's only a radio problem, I think, because everything else continues to work normally.  A reset of the arduino always solves the problem.  The gateway does a radio.receiveDone() and then radio.sendACK()

Also connected to the board are a DS3231 Real-time Clock Module, BME280 sensor, and a SSD1306 OLED --- all i2c.

This problem is so random that I don't really know where to start.  Anyone else have this kind of issue?  Any ideas on where to start?
Thanks,
Robby R
Title: Re: Random receive fail/hang RFM69HCW --- need ideas
Post by: robbyr on April 18, 2019, 08:05:26 PM
Just happened again today --- first time since my earlier post.
I sure wish I could get some ideas on troubleshooting this hang.
Thanks,
Robby R
Title: Re: Random receive fail/hang RFM69HCW --- need ideas
Post by: robbyr on May 01, 2019, 02:38:10 AM
Happened again just now.  Sure would be nice to get some ideas on this --- or even a pat on the back.  -RR
Title: Re: Random receive fail/hang RFM69HCW --- need ideas
Post by: sparky on May 01, 2019, 06:57:00 AM
Maybe you should ask the question where you purchased it;

https://forum.sparkfun.com
Title: Re: Random receive fail/hang on Sparkfun RFM69HCW breakout
Post by: damonb on May 01, 2019, 11:21:20 PM
If you are running an OLED watch out for low memory. I have a 128x64 OLED running off a 328P and random hangs were a problem until I pared back the memory usage.
Title: Re: Random receive fail/hang on Sparkfun RFM69HCW breakout
Post by: robbyr on May 02, 2019, 09:39:39 PM
Thanks, you guys!

damonb,
I am running an OLED.  To begin with, I had a lot of memory problems and resolved most of them (I think) with paired down libraries, font and some other house cleaning of un-needed stuff.    I also changed the radio packet size to sizeof 3 floats --- I don't think this is a problem?    I haven't looked at it for a while, but I think I'm around 20K ---  so it seems like that should be ok.  When I had the memory probs, the Arduino would hang and often supply garbage on the OLED.  Now, the arduino continues to respond to all other inputs and outputs, it just seems to be the base radio saying that it that it hasn't received anything from the node in the timeout period.  A  reset always gets things back in order for some random while.

sparky,
I'm in contact with Sparkfun about this.  Trying to get a new radio out of them to try out.  The folks I've emailed with over there recommended this forum --- I think they are probably not as knowledgeable on the topic as you guys are.

Thanks RR
Title: Re: Random receive fail/hang on Sparkfun RFM69HCW breakout
Post by: robbyr on May 22, 2019, 02:48:52 AM
Well, it hung again last Thursday ----  twice within an hour.   Still haven't managed to get a replacement from SparkFun, but still trying!

I've seen a few routines in the library for reading rfm69 registers.   Might I figure out something from that?  I don't have an extra computer that I could use only for monitoring and detecting a hang, but maybe that might be helpful too?

Still having the same random hang issues, still trying to figure it out, still looking for ideas/help ...

Thanks, Rob
Title: Re: Random receive fail/hang on Sparkfun RFM69HCW breakout
Post by: Felix on May 22, 2019, 08:36:27 AM
To eliminate the possibility of memory leaks, why don't you remove the OLED and try some of the known-working examples (https://github.com/LowPowerLab/RFM69/tree/master/Examples) in the library?
You just need to change the radio settings to match your module.
So, start from a point that is known to work, or should work.
Then you can attack the problem from another angle if there is still a hang.

I'm in contact with Sparkfun about this.  Trying to get a new radio out of them to try out.  The folks I've emailed with over there recommended this forum --- I think they are probably not as knowledgeable on the topic as you guys are.
Interesting to know. Sparkfun sells, we support :)
Well I would hope that for hosting a [free] 3rd party support platform, at least some conversions happen from time to time :P
Title: Re: Random receive fail/hang on Sparkfun RFM69HCW breakout
Post by: robbyr on May 31, 2019, 12:34:10 AM
Well, I was about to announce that I had another hang, but ......

Thanks for replying Felix.   I started with one of your examples but as soon as I got it up and running, I started adding code and parts and never really let it run for a long time until I'd finished the breadboard part of the project (time/weather station).  So I think that is a good idea.  Simplify, simplify, simplify.  Another benefit is that it will keep me quiet for a while.

At one point, I was using way too much memory, and nothing worked ---- gibberish pixels on the OLED, and 0 functionality.  I refined and removed until I got just below 20K and everything worked until the hangs.  Even when a hang happens, the OLED is showing date/time, station enviro data, and a message that there's been no rx with the outdoor sensor/radio.     Even when a hang happens, I can still use the rotary encoder to set date/time.  All functionality except for receiving the node data.  As I said before a power down reset always clears things up for a random while.

I will try one of the examples and just let it run for a month or so, see what happens, and report back.

On another note: sorry about the sparkfun radio.  That's just where I found a radio.  I didn't know about you before, and now I do.  I do really appreciate you allowing us "outsiders" to participate --- so, Thanks!

Robby
Title: Re: Random receive fail/hang on Sparkfun RFM69HCW breakout
Post by: robbyr on June 28, 2019, 12:27:48 AM
Still haven't gotten around to the promised radio test --- summer and lots of gigs happened.  Probably get to this in the fall.  On a positive note, my 2 AA's in the outdoor node are still humming along!  Since January 14th!  My first version lasted 2 weeks on 4 AA's -- nice to have some small measure of success.
Title: Re: Random receive fail/hang on Sparkfun RFM69HCW breakout
Post by: robbyr on August 05, 2019, 02:44:13 PM
A little update:

Moved my little weather station to my girlfriend's house about 6 weeks ago, and it has operated continuously ever since.

Her house is out in the middle of nowhere in the woods --- my house is located 5 miles from a busy airport, several cell phone towers, a power substation, and several small consumer weather stations that may possibly transmit at 433Mhz.

Is it possible to receive a packet or signal that could somehow disable the radio?  I suppose it's possible that everything is just randomly operating for a long time, but I don't think so.  My longest time before a failure was about 2 weeks for the previous 7 months, and then I move it and it works?
Thanks for your comments, RR
Title: Re: Random receive fail/hang on Sparkfun RFM69HCW breakout
Post by: robbyr on August 10, 2019, 01:06:49 AM
Well, I was up at my girlfriend's house the other day and and the power momentarily went off.   I asked her about that, and she said that it happens pretty often.  So, I guess that probably explains my "drastic" run time variations --- the gateway is just consistently reset.  Oh well ....  RR
Title: Re: Random receive fail/hang on Sparkfun RFM69HCW breakout
Post by: robbyr on August 25, 2019, 01:53:57 PM
Just added a backup power supply.  Tested and working.  So we'll see how that goes. -RR
Title: Re: Random receive fail/hang on Sparkfun RFM69HCW breakout
Post by: Kamajii on September 08, 2019, 01:51:04 AM
Do you have a way to read out the FEI register?
I'm almost sure that it is the AFC that gets dragged away, rendering the module deaf.

I am facing the same problem, see thread next door: https://lowpowerlab.com/forum/rf-range-antennas-rfm69-library/rfm69sx1231-deadlock/
Title: Re: Random receive fail/hang on Sparkfun RFM69HCW breakout
Post by: robbyr on September 22, 2019, 06:10:18 PM
OK.  That makes 4 weeks in the woods of continuous operation with backup power supply to prevent any surprise power outage resets.

As I said previously, I was having random RFM69HCW hangs that would happen anywhere from about 1 hour after power up to as much as 2 weeks.  This went on for about 7 months.

I moved the station to the woods, far away from any potential interference (possible sources mentioned above) and everything works just fine.  Seems like it just has to be some kind of interference problem that makes the radio hang.

I can understand how the RFM69HCW could not receive a packet because of interference, but how could interference cause it to just quit working.  All the other features of my arduino base station continue to work fine, so it would seem that it is not an Arduino memory problem as several folks have suggested.

Does the RFM69HCW have internal buffers that could be overwritten by some potential radio signal?  Trying to read giant packet form another source?

Any RFM69HCW gurus out there with an idea or an opinion or a secret incantation of swear words?  I would greatly appreciate any assistance I can get trying to understand this.  Thanks -RR
Title: Re: Random receive fail/hang on Sparkfun RFM69HCW breakout
Post by: robbyr on September 29, 2019, 12:25:06 AM
How does one go about rejecting unwanted signals?  Look for a channel with less traffic?  Some sort of secret code handshake?  Any ideas? -RR
Title: Re: Random receive fail/hang on Sparkfun RFM69HCW breakout
Post by: robbyr on October 12, 2019, 09:55:01 PM
Anybody tried the RadioHead libraries?  Thinking about trying that as I'm not really getting any answers with the LowPower lib.  Any experiences or comparisons would be appreciated. -RR
Title: Re: Random receive fail/hang on Sparkfun RFM69HCW breakout
Post by: robbyr on December 08, 2019, 08:21:02 PM
Well it started again about a month ago and is becoming more and more frequent -- every few days.  Just got some atmega 1284's to rebuild with.  Maybe the extra ram will help??????? Wish me luck. -RR