MQTT - RFM69 Gateway stops communicating randomly and doesn't recover
-
-
I have upgraded the whole network to 2.2.0-beta using the new RFM69 driver. I started by upgrading just the gateway but it wasn't backwards compatible with the sensors. Maybe the new radio driver changes something.
Will wait and see if it fails again. -
So far so good. I'm feeling tentatively like this problem may be solved in 2.2-beta, and my sensor network is starting to gain my trust again.
@Carywin Is your gateway still working without losing connection ?
I have the same problem as yours: my gatewayMQTTclient with RFM69 by softSPI is losing connection with nodes. Sometimes it works by couple of days, sometimes only few hours.
I have tried to implement new RFM69 driver version of MySensors (2.2 dev), but arduino has not compiled my sketch according to errors in RFM69_new.cpp file (some variables are not defined). With old driver version sketch has compiled.
How have you run your gateway with MySensors 2.2 ?
Have you defined MY_RFM69_NEW_DRIVER parameter to work with new driver ? -
@Carywin Is your gateway still working without losing connection ?
I have the same problem as yours: my gatewayMQTTclient with RFM69 by softSPI is losing connection with nodes. Sometimes it works by couple of days, sometimes only few hours.
I have tried to implement new RFM69 driver version of MySensors (2.2 dev), but arduino has not compiled my sketch according to errors in RFM69_new.cpp file (some variables are not defined). With old driver version sketch has compiled.
How have you run your gateway with MySensors 2.2 ?
Have you defined MY_RFM69_NEW_DRIVER parameter to work with new driver ?@gieemek Yes my gateway and sensors are very reliable now, using 2.2-beta from the dev branch and the new RFM69 driver.
Are you just trying to use the new driver by itself? Or have you updated the whole MySensors library to 2.2? I upgraded the whole library, I'm not sure how much success you'd have just updating the driver itself.
There are a few definitions changed in the library, anywhere that the old defs had MY_RF69 you have to change it to MY_RFM69 - Note the added M.
Here's the radio block from my gateway sketch:
#define MY_RADIO_RFM69 #define MY_RFM69_NETWORKID 137 #define MY_RFM69_ENABLE_ENCRYPTION #define MY_RFM69_NEW_DRIVER #define MY_IS_RFM69HW #define MY_RFM69_FREQUENCY RFM69_433MHZ #define MY_RFM69_IRQ_PIN 2 //#define MY_RFM69_IRQ_NUM 1 #define MY_RF69_SPI_CS 6 #define MY_RFM69_ATC_MODE_DISABLED #define MY_RFM69_TX_POWER_DBM 20IRQ_NUM seems deprecated now, but it works without it.
I disabled ATC_MODE just on my gateway when I was troubleshooting a different issue, but I don't care much about power consumption there so I didn't bother to enable it again.
-
@gieemek Yes my gateway and sensors are very reliable now, using 2.2-beta from the dev branch and the new RFM69 driver.
Are you just trying to use the new driver by itself? Or have you updated the whole MySensors library to 2.2? I upgraded the whole library, I'm not sure how much success you'd have just updating the driver itself.
There are a few definitions changed in the library, anywhere that the old defs had MY_RF69 you have to change it to MY_RFM69 - Note the added M.
Here's the radio block from my gateway sketch:
#define MY_RADIO_RFM69 #define MY_RFM69_NETWORKID 137 #define MY_RFM69_ENABLE_ENCRYPTION #define MY_RFM69_NEW_DRIVER #define MY_IS_RFM69HW #define MY_RFM69_FREQUENCY RFM69_433MHZ #define MY_RFM69_IRQ_PIN 2 //#define MY_RFM69_IRQ_NUM 1 #define MY_RF69_SPI_CS 6 #define MY_RFM69_ATC_MODE_DISABLED #define MY_RFM69_TX_POWER_DBM 20IRQ_NUM seems deprecated now, but it works without it.
I disabled ATC_MODE just on my gateway when I was troubleshooting a different issue, but I don't care much about power consumption there so I didn't bother to enable it again.
-
@Carywin The problem with compiling by Arduino is with softSPI. When I switch it off my sketch is compiling properly. I have to implement softSPI library to new driver. Thanks.
-
@Carywin OK, my gatewayMQTTclient with RFM69 via SoftSPI is working now. There was a problem in RFM69_new.cpp file with SPI_HAS_TRANSACTION variable which is defined in hard SPI.h but not in SoftSPI.
Now I test my gateway and I hope it will work without losing connection. Thank you once more for help. -
@Carywin OK, my gatewayMQTTclient with RFM69 via SoftSPI is working now. There was a problem in RFM69_new.cpp file with SPI_HAS_TRANSACTION variable which is defined in hard SPI.h but not in SoftSPI.
Now I test my gateway and I hope it will work without losing connection. Thank you once more for help.