Author Topic: RFM69HW 868 issue  (Read 1666 times)

mario.almeida

  • NewMember
  • *
  • Posts: 24
  • Country: ae
RFM69HW 868 issue
« on: April 17, 2020, 01:17:54 PM »
Hi All,

I am using Moteino R4 for last 3+ years, all the sensors and switchmote are deployed with R4 but the Gateway is running on Arduino UNO+Ethernet shield and sends the data to MQTT+OpenHAB2, almost every year, after 4-6 months, all of a sudden entire network stops working, so I would go around and reboot all the sensors and SM, (the total count is less than 20) and it starts working. These used to work and I was OK with that, but recently, like 6 months back, it is happening almost every month and I am unable to find the reason. If I change the frequency to 433/915, this works but then after some days, it stops again and then I need to change the frequency back to 868.

For testing purpose, I am using 2 Moteino with a distance of 1 meter,  I tried with the Gateway and Struct_send sketch with 868 frequency no luck, but with 433 and 915 is working. I have found this library "https://github.com/PaulStoffregen/RadioHead" and with the rf69_server and rf69_client sketch set to 868 frequency, this is working, Reverted back to Gateway and Struct_send sketch to try with 868 and not working.

LukaQ

  • Sr. Member
  • ****
  • Posts: 302
  • Country: si
Re: RFM69HW 868 issue
« Reply #1 on: April 18, 2020, 03:57:22 AM »
THAT will be hard if not impossible to debug. I have few nodes that work without intervention since feb. 2017. The only problem I had was every time lightning struck near by it locked up on PI side. I don't remember the fix, I think it was something to do with lack of ground

Gateway and Struct_send and Struct_receive worked for me on 868, but as I remember I used Struct Receive with Struct Send

What I would do is check if gateway locks up by have ready one Moteino as Gateway or PIgateway, so when your network locks up, you can see if the nodes are still sending and by doing that, you can focus to your gateway or not. Maybe that is the problem. Maybe even setup another identical Arduino UNO+Ethernet shield and do something like "if one is down, other will take over". This way you can try to debug first gateway that locks up for some reason. But I would make sure, you have so "yes I am alive" code on gateway, since now you don't know which part of gateway stops working (network, proc., receiver,..)
« Last Edit: April 18, 2020, 04:04:10 AM by LukaQ »

mario.almeida

  • NewMember
  • *
  • Posts: 24
  • Country: ae
Re: RFM69HW 868 issue
« Reply #2 on: April 18, 2020, 05:43:44 AM »
Hello LukaQ,

Initially, I thought it is something to do with the Gateway as SwitchMote (SM) sync would work even if the gateway is not reachable
When the button is pressed on the SM, first it will send the packet to the Gateway and then to the synced node. The SM node has 3 re-tires to send to the Gateway node. In my observation, even after 3 retries, the packet is not sent to the Gateway but the packet reaches the sync node. So this confirmed to me that the issue is with the Gateway. I tried with another set of UNO+Sheld but that didn't help and recently even the sync between the SM is not working.

So now I am trying to troubleshoot the issue with the Gateway and Struct_send sketch with 868 freq.

LukaQ

  • Sr. Member
  • ****
  • Posts: 302
  • Country: si
Re: RFM69HW 868 issue
« Reply #3 on: April 18, 2020, 11:51:43 AM »
I don't know how the freq. would be the problem and not in every range

mario.almeida

  • NewMember
  • *
  • Posts: 24
  • Country: ae
Re: RFM69HW 868 issue
« Reply #4 on: April 19, 2020, 07:27:16 PM »
868 is driving me up the wall.

433 and 915 is working, really not sure where to start.

ChemE

  • Sr. Member
  • ****
  • Posts: 419
  • Country: us
Re: RFM69HW 868 issue
« Reply #5 on: April 20, 2020, 08:36:38 AM »
Wasn't there some new issue regarding one of the low frequency bands of 5G cell phone networks stomping on 915MHz?  Could something new like that be the issue with one frequency but not the others?  Just a thought, I know the frequencies don't match up in this case.

mario.almeida

  • NewMember
  • *
  • Posts: 24
  • Country: ae
Re: RFM69HW 868 issue
« Reply #6 on: December 15, 2020, 11:57:35 AM »
Hi Felix,

Is there an option to set a custom freq. with some parameters?  I have been running with 867 freq. for almost 4 months without any issue.

Quote
diff --git a/RFM69.cpp b/RFM69.cpp
index 25a61df..f72c6fb 100644
--- a/RFM69.cpp
+++ b/RFM69.cpp
@@ -72,9 +72,9 @@ bool RFM69::initialize(uint8_t freqBand, uint16_t nodeID, uint8_t networkID)
     /* 0x05 */ { REG_FDEVMSB, RF_FDEVMSB_50000}, // default: 5KHz, (FDEV + BitRate / 2 <= 500KHz)
     /* 0x06 */ { REG_FDEVLSB, RF_FDEVLSB_50000},
 
-    /* 0x07 */ { REG_FRFMSB, (uint8_t) (freqBand==RF69_315MHZ ? RF_FRFMSB_315 : (freqBand==RF69_433MHZ ? RF_FRFMSB_433 : (freqBand==RF69_868MHZ ? RF_FRFMSB_868 : RF_FRFMSB_915))) },
-    /* 0x08 */ { REG_FRFMID, (uint8_t) (freqBand==RF69_315MHZ ? RF_FRFMID_315 : (freqBand==RF69_433MHZ ? RF_FRFMID_433 : (freqBand==RF69_868MHZ ? RF_FRFMID_868 : RF_FRFMID_915))) },
-    /* 0x09 */ { REG_FRFLSB, (uint8_t) (freqBand==RF69_315MHZ ? RF_FRFLSB_315 : (freqBand==RF69_433MHZ ? RF_FRFLSB_433 : (freqBand==RF69_868MHZ ? RF_FRFLSB_868 : RF_FRFLSB_915))) },
+    /* 0x07 */ { REG_FRFMSB, (uint8_t) (freqBand==RF69_315MHZ ? RF_FRFMSB_315 : (freqBand==RF69_433MHZ ? RF_FRFMSB_433 : (freqBand==RF69_868MHZ ? RF_FRFMSB_867 : RF_FRFMSB_915))) },
+    /* 0x08 */ { REG_FRFMID, (uint8_t) (freqBand==RF69_315MHZ ? RF_FRFMID_315 : (freqBand==RF69_433MHZ ? RF_FRFMID_433 : (freqBand==RF69_868MHZ ? RF_FRFMID_867 : RF_FRFMID_915))) },
+    /* 0x09 */ { REG_FRFLSB, (uint8_t) (freqBand==RF69_315MHZ ? RF_FRFLSB_315 : (freqBand==RF69_433MHZ ? RF_FRFLSB_433 : (freqBand==RF69_868MHZ ? RF_FRFLSB_867 : RF_FRFLSB_915))) },
 
     // looks like PA1 and PA2 are not implemented on RFM69W/CW, hence the max output power is 13dBm
     // +17dBm and +20dBm are possible on RFM69HW
@@ -1222,4 +1222,4 @@ void RFM69::listenModeSendBurst( uint8_t targetNode, const void* buffer, uint8_t
   setMode(RF69_MODE_STANDBY);
   reinitRadio();
 }

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: RFM69HW 868 issue
« Reply #7 on: December 15, 2020, 03:06:29 PM »
void setFrequency(uint32_t freqHz);

mario.almeida

  • NewMember
  • *
  • Posts: 24
  • Country: ae
Re: RFM69HW 868 issue [SOLVED]
« Reply #8 on: December 15, 2020, 10:32:52 PM »
Thanks Felix, that worked.