RFM95 network problem (RPI & Arduino GW)
m3nt4lll last edited by
I am new to MySensors and I have tried to set up a GW with a Sensor to establish communication among the two without success.
I am using Adafruit RFM95 modules ( https://www.adafruit.com/product/3072 ) which I have managed to use with RadioHead library (so i know both modules are functional).
Trying to move over to MySensors, I initially tried to set up a Raspberry Pi Gateway following all the steps of the tutorial, on a serial gw, which (at least and according to the debug info was successful as suggested by the tutorial) and then connected an Arduino Uno according to https://www.mysensors.org/build/connect_radio#rfm6995-&-arduino , using the unmodified example of Mysensors (PingPongSensor as well as a few others).
Notice that i have been using unmodified (default) options, aka. only turning on the RF95 option (through the ./configure on RPi and #define MY_RADIO_RFM95 on arduino, an leaving everything else to its defaults.
My Sensor verbose on the serial is :
| / |_ / | ___ _ __ ___ ___ _ __ ___
| |/| | | | _ \ / _ \
_ \/ __|/ _ \|_/ __|
| | | | || || | / | | _ \ _ | | _
|| ||_, |/ ___|| ||/_/|| |/
16 MCO:BGN:INIT NODE,CP=RLNNA---,VER=2.3.0
51 TSM:INIT:TSP OK
2113 !TSM:FPAR:NO REPLY
4177 !TSM:FPAR:NO REPLY
6241 !TSM:FPAR:NO REPLY
18339 TSM:INIT:TSP OK
20403 !TSM:FPAR:NO REPLY
.... (and so on)
Apparently, the FPAR fails, so after digging a bit on the forums, people suggested that there is no communication with the GW. In order to avoid having a defective configuration on the gw, i tried to set up a serial gateway on a 2nd Arduino. Again, i got successful verbose :
0;255;3;0;9;0 MCO:BGN:INIT GW,CP=RLNGA---,VER=2.3.0
0;255;3;0;9;18 TSM:INIT:TSP OK
0;255;3;0;9;21 TSM:INIT:GW MODE
0;255;3;0;9;28 MCO:REG:NOT NEEDED
0;255;3;0;14;Gateway startup complete.
0;255;3;0;9;38 MCO:BGN:INIT OK,TSP=1
And the GW get no recv messages.
In all my cases the sketches are the default ones, with the only change of:
(similarly was in the RPi Gateway)
I am also attaching 2 photos of my arduino wirings with the LoRA modules:
![alt text]( image url)
I have tried to move on with this communication a few days now and have reached a point where I dont know what to try next. Please suggest where would the problem lie in.
Thank you in advance
titvs last edited by titvs
@m3nt4lll Try to assign a fixed node ID to your sensors nodes with the line:
#define MY_NODE_ID 12
Change the number to what you like.
I also had the same problem with a serial gateway with RFM69 and a simple temp+hum node. They did startup ok but no communication between them.
I then assigned a node ID to the sensor node and oddly it worked…
Other thing i noticed is that im not getting internal messages delivered to the gateway, only sensor values defined by MyMessage and presented.
The sketch info sent with sendSketchInfo doesnt show on Domoticz side, neither does battery levels sent with sendBatteryLevel. If i just change the radio to a NRF24 with the same sketch code, everything works…
@m3nt4lll If you get communication, see if you have this problem too.
Any ideias guys?
@m3nt4lll Are you using 868 or 915Mhz modules? How are the IRQ lines connected?
m3nt4lll last edited by m3nt4lll
Hi Both and thanks for your replies.
@titvs I have tried also to assign NODE ID, but without luck. I will try again once i get back to it (i m currently at work so cannot test). EDIT The modules are connected on IRQ pin 2
@tekka Good point. I noticed that the module i use states : 433 MHz only. At some point i did set the frequency to ( #define RFM95_434MHZ ) but i m not sure if i did with the Examples, will certainly give that a shot (i remember i removed to reduce my customisation).
The #define RFM95_434MHZ should be equivalent with what is stated as 433 MHz, right? Could there be a problem?
My apologies, the correct module is : https://www.adafruit.com/product/3073 (and not 3072 as i wrote on my initial post )
Thank you, I will come with an update later today
@m3nt4lll for a 433 MHz radio you need to have this:
#define MY_RFM95_FREQUENCY RFM95_433MHZ
m3nt4lll last edited by
Hi @mfalkvidd , 433 is not defined anywhere (also if you check the link you sent).
Instead, in https://github.com/mysensors/MySensors/blob/master/drivers/RFM95/RFM95.h you can see that the pre-defined symbols are:
// Frequency definitions
#define RFM95_169MHZ (169000000ul) //!< 169 Mhz
#define RFM95_315MHZ (315000000ul) //!< 315 Mhz
#define RFM95_434MHZ (433920000ul) //!< 433.92 Mhz
#define RFM95_868MHZ (868100000ul) //!< 868.1 Mhz
#define RFM95_915MHZ (915000000ul) //!< 915 Mhz
I assume I can override that by setting
#define MY_RFM95_FREQUENCY (433000000ul)
but i also guess that these pre-defined are standards to most hardware devices.
Anyway I will come back once i test these
@m3nt4lll if the modules are 433Mhz you can use the pre-defined RFM95_434MHZ setting (center frequency is 433.92Mhz)
@m3nt4lll yes sorry about that. I midex the rfm69 and the rfm95 documentation when checking.
m3nt4lll last edited by m3nt4lll
Sometimes the solution is pretty obvious but you fail to spot it.
@tekka thanks for pointing me to the correct direction, as the problem was in the used frequency.
Even though I initially tried with 434 MHz, it turns out that when i finally did it right, i had already switched to the default 868.
#define MY_RFM95_FREQUENCY RFM95_434MHZ
in the sketches initially, i established communication.
After that i also tried to configure again the rasperry (this time knowing that the node is working) and Hooray! it worked