Hello!
i tried to test to moduls of RFM69HW (433MHz) by connecting each to an Arduino Uno. For the connection i used the Hook-Up Guide of SparkFun.
-
https://learn.sparkfun.com/tutorials/rfm69hcw-hookup-guide/all I also used the Example-Code from this site and adjust it. I put my modified Code here:
-
https://pastebin.com/qf1cDtBd I just use the standard libraries of github.
-
https://github.com/LowPowerLab/RFM69(especially RFM69.cpp, RFM69.h, RFM69registers.h)
For testing i connected each Uno to the PC and opened for each a Serial Monitor. For example i put a message "Hello World" in on Serial Monitor. This message was sent by one module to the other. In the Serial Monitor of the receiving Modul in this case appeared the received message and an ACK was sent back (see picture "Test with ACK (1)"). So each module had send one time - one the message and one the ACK. But after this i cannot send with any modul (see picture "Test with ACK (2)").
To check the problem i decided to go deeper into the RFM69.cpp library. On different spots i read out some registers to look what happen there. So i recognized that both moduls are not able to come back from the mode RF69_MODE_TX to RF69_MODE_STANDBY (see line 335 - in function sendframe). For example, REG_OPMODE keeps the value 0x0C after sending. But i think REG_OPMODE should have the value 0x04 in Standby-Mode.
Besides, REG_IRQFLAGS1 in the function sendframe has during the first run of sending the value 0x80. But in the second run of sending this register has the value 0x08. So there is a problem in the while-loop in line 308.
In my opinion is the problem in the mode RF69_MODE_TX. As you see in the pictures a modul can send a ACK after receiving but is not able to send again. So from RF69_MODE_RX there is no problem to come back to RF69_MODE_STANDBY.
I dont know how to fix this problem and i am really frustrated. Could you help me or have some advices? If you need more details, let me know.
I would be really glad about an answer from you!
Have a nice weekend and stay healthy!