|
Post by papa on Jun 7, 2018 21:16:55 GMT
Are My RFM69 Radios Working? You might wonder. When using a RFM69 Gateway & RFM69 nodes with OpenHAB, a big concern is whether our RFM69 radios are communicating, especially when we are beginners. Using an inexpensive dongle, an RTL SDR (Software Defined Radio) & open source SDR Sharp software, we can detect if an RFM69 radio is transmitting at its defined frequency. See this Lady Ada video around 28 minutes in. You can internet search for SDR and SDR Sharp if you want to pursue this. While interesting (after working out how to use the device & software), I'm not sure that is necessary. Next, Another Way to Test RFM69 Radios
|
|
|
Post by papa on Jun 7, 2018 21:18:14 GMT
Another Way to Test RFM69 Radios, PreparationTo test that RFM69 radios are sending & receiving, we can use two radios, each installed on an Arduino compatible that sends only 3.3 volts through its data pins (like D10-D13) because more than 3.3 volts will damage the radio. You build two physical devices like my Bare Bones End Node, but both these devices will have different programming. If you are making this forum's RFM69 Gateway & nodes, you may already have the parts needed. Just in case, here's a repeat of that information: A Buono Uno (which switches to 3.3 volt mode) works well for this testing. Have at least TWO Buono Unos. This eBay link shows you some examples. When you get the Buono Unos switch them to 3.3 volt mode. You may need to fiddle with the mode switch to get the Buono's power LED to light. See this post about purchasing RFM69 radios, selecting your frequency, & the length for the antenna. You need at least two RFM69 radios, & I recommend you get three or four so you have a spare.
Next, Build TWO RFM69 Radio Test Devices
|
|
|
Post by papa on Jun 7, 2018 21:26:52 GMT
Build TWO RFM69 Radio Test Devices
<< click on pic for larger view
Use this schematic to wire the RFM69s to Arduino compatibles that send only 3.3 volts through their data pins, like D10-D13. Following instructions above, you should have soldered short (color-coded?) wires to the RFM69 holes. On the other end of each wire (except the antenna), you bare a short portion to insert into the proper socket of the Arduino compatible.
Next, Program the TWO RFM69 Radio Test Devices
|
|
|
Post by papa on Jun 7, 2018 21:32:42 GMT
Program the TWO RFM69 Radio Test DevicesEach of the TWO Buono Unos will be programmed with its own sketch that I adapted from Andy Sigler's repository. EZ_Receive.ino (2.01 KB) << With this sketch, (using Arduino IDE) program one of the nodes so it can receive an RFM69 radio message & send an ACK, an acknowledgement reply. Power this node with an AC outlet. EZ_Send.ino (2.51 KB) << With this sketch, program the OTHER node so it can send an RFM69 radio message seeking an ACK OR NOT. (<< updated August 21, 2022)
Next, Testing the RFM69 Radios, Version 1
|
|
|
Post by papa on Jun 7, 2018 21:38:39 GMT
Testing the RFM69 Radios
Update, August 21, 2022: Power the node with "Receive" programming (via computer USB port or wall power)
Connect the node with "Send" programming to the Arduino IDE computer & open the serial monitor (SM) & make sure (lower right) it's set to 115200 baud. In the SM's top box you may enter 1, but the point of that is you won't know if the message got through. More importantly, in the SM's top box, enter 2. Sometimes SM will tell us the send was not acknowledged. Other times it should be acknowledged & tell us the Radio Signal Strength (RSSI) in dB. RSSI will be in negative numbers. You might get RSSI of -48, very good. Or the RSSI might be -74 or -94. The closer the RSSI is to zero, the stronger the signal is. Our forum sketches use radio send with retry so communication has some redundancy to help succeed. Strong signal is nice, but the main thing is having strong enough signal for communication to succeed much of the time.
As with WiFi routers, placement can makes a difference on communication success. I get best results by placing my RFM69 Gateway as high & as central as possible.
You can use these sketches to test two RFM radios at a time. One of the test devices is a Bare Bones node that you can further build into a DHT End Node. The other test device has two of the parts you need for an RFM69 Gateway."
While you have the test devices programmed, I recommend that you wire & test at least three or four RFM69 radios.
|
|
|
Post by anthonys on Jul 10, 2018 20:48:07 GMT
What would you suggest if I can initialize the nodes, but cant get the receiver to acknowledge I send a number 2 to it. Any ideas for troubleshooting.
Thanks
|
|
|
Post by papa on Jul 11, 2018 12:12:58 GMT
Check any soldering on RFM69s. Check how RFM69 connections to "Arduinos" match schematic.
Make sure antenna is right length for your rfm69 frequency. Try relocating the 2 devices' in relation to each other. If you can safely, test without extra stuff like logic level converters. Keep it simple as possible, without risking the rfm69.
Be patient, but persistent. The rfm69 connections are among the most challenging aspects of the project
That's some ideas. Like I wrote before, my availability this week is limited.
|
|
|
Post by anthonys on Jul 11, 2018 15:12:04 GMT
I have built my RFM69 Gateway, and have my 2 nodes built. One node has the Receive.ino and the other Send.ino, gateway has the RFM_MQTT_GW_25.1_pub1.ino installed. My Raspberry PI has openHAB2 installed and MQTT server with Mosquitto. Is there a way to test all these devices at my office. I have the PI running and using my office IP address, and is using WIFI USB. Does the RFM69 Gateway have to be plugged into an Ethernet port to be able to test all my parts.
I have not been able to test the Nodes using the Send & receive sketches, does the gateway need to be plugged into Ethernet port before I can, and does the PI need to be running in order for the test to work.
Thanks
|
|
|
Post by papa on Jul 16, 2018 15:18:21 GMT
anthonys: "I have not been able to test the Nodes using the Send & receive sketches, does the gateway need to be plugged into Ethernet port before I can." "I can initialize the nodes, but cant get the receiver to acknowledge I send a number 2 to it." ===================== papa: If you are having trouble with the RFM69 devices communicating, it is important you get this to work because so far, this is the simplest I can make the preparation for this project. Let me try to clarify some misunderstandings I believe you have. First, the only purpose of the EZ_Send.ino & EZ_Receive.ino devices in this thread is to have a relatively simple way to test the RFM69 radios & get accustomed to how the nodes' radios will be wired to their Arduinos. These devices use wiring & programming similar to the DIY Home Automation RFM69 Gateway & Nodes, BUT they are NOT a gateway or a node & they will not communicate with the RFM69 Gateway or RFM69 node. Follow the above thread carefully. To test the RFM69 radios, you only need a computer running Arduino IDE & at least two RFM69 radios wired to Arduino compatibles according to the instructions & schematic so the radios are only getting 3.3 volts on the needed digital pins. To one device, upload EZ_Send.ino. To one or more devices, upload EZ_Receive.ino. Connect the EZ_Send.ino device to the USB of the Arduino IDE computer. Connect ONLY ONE EZ_Receive device at a time to power. Run the test by typing 2 [enter] in the Arduino IDE's serial monitor. If it works, remove power from the the first EZ_Receive device & apply power to another EZ_Receive device & run the test with it. If things don't work, try the troubleshooting in this post above. Keep track of which combinations of radios & Arduinos work. Trade radios between Arduinos to narrow down which components are reliable.
Again the EZ_Send & EZ_Receive devices are NOT yet a RFM69 Gateway or RFM69 node for our DIY Home Automation. However, you can convert a working EZ_Send or a working EZ_Receive device into a RFM69 Gateway that will communicate with OpenHAB / MQTT & with RFM69 nodes. As instructed in this thread, the RFM69 Gateway uses an Ethernet Shield with the Arduino & the Gateway RFM69 radio's NSS pin connects to a different Arduino pin than on the EZ_Send or EZ_Receive devices or a node.
anthonys: "Does the RFM69 Gateway have to be plugged into an Ethernet port to be able to test all my parts?"
papa: Testing the RFM69 radios with EZ_Send & EZ_Receive does not use an RFM69 Gateway or Ethernet connection. However, the RFM69 Gateway will only work & communicate with OpenHAB if its Ethernet Shield is connected to the local Ethernet network. See this post for a map of DIY Home Automation connections that include RFM69 radios.
|
|
|
Post by papa on Aug 21, 2022 19:36:10 GMT
Some Serial Monitor Results of RFM69 Tests Following my own instructions for building & programming & powering the RFM69 Test Nodes, I entered "2" a number of times in the upper Serial Monitor box. Here are some sample results:
That is, sometimes the sender device received reply/ACK & sometimes not. In regular sketch practice, the RFM69 sendWithRetry function tries a number of sends until it gets a result. At this forum. the RFM69 code that we use comes from LowPowerLab.com. This LowPowerLab thread gives some sense of how the ACK works. Next, Version 2 of the Sender Programming
|
|
|
Post by papa on Aug 21, 2022 19:41:39 GMT
Program the TWO RFM69 Radio Test Devices, Version 2
For the RFM69 tests above, in the Serial Monitor top input box, we can enter a "1" for a "plain send' or enter a "2" for a "sendWithRetry" (& get an indication of success).
In the EZ_Send2 sketch below, I avoid the inputs & just use sendWithRetry.
Each of the TWO Buono Unos will be programmed with its own sketch that I adapted from Andy Sigler's repository. EZ_Receive.ino found in this post << As above with this same sketch, (using Arduino IDE) program one of the nodes so it can receive an RFM69 radio message & send an ACK, an acknowledgement reply. Power this node with an AC outlet. EZ_Send2.ino (2.19 KB) << With this sketch, program the OTHER node so it can send an RFM69 radio message & receive an ACK. Next, Testing the RFM69 Radios, Version 2
|
|
|
Post by papa on Aug 21, 2022 19:59:41 GMT
Testing the RFM69 Radios, Version 2Power the node with "Receive" programming (via computer USB port or wall power)
Connect the node with "Send" programming to the Arduino IDE computer & open the serial monitor (SM) & make sure (lower right) it's set to 115200 baud. In this version, you will NOT enter a "1" or "2" to the Serial Monitor. Messages should scroll continually through the Serial Monitor Results: Sometimes SM will tell us the send was not acknowledged. Other times it should be acknowledged & tell us the Radio Signal Strength (RSSI) in dB. RSSI will be in negative numbers. You might get RSSI of -48, very good. Or the RSSI might be -74 or -94. The closer the RSSI is to zero, the stronger the signal is. Our forum sketches use radio send with retry so communication has some redundancy to help succeed. Strong signal is nice, but the main thing is having strong enough signal for communication to succeed much of the time. As with WiFi routers, placement can makes a difference on communication success. I get best results by placing my RFM69 Gateway as high & as central as possible.
You can use these sketches to test two RFM radios at a time. One of the test devices is a Bare Bones node that you can further build into a DHT End Node. The other test device has two of the parts you need for an RFM69 Gateway."
While you have the test devices programmed, I recommend that you wire & test at least three or four RFM69 radios.
|
|
|
Post by papa on Aug 21, 2022 20:02:11 GMT
papa: ctodor, I moved your post here, so I could insert some updates above.
Aug 15, 2022 7:51:01 GMT -5 ctodor said:
|
|
|
Post by papa on Aug 21, 2022 20:03:33 GMT
Greetings, ctodor Welcome to the thrills & frustrations of DIY Home Automation. I just saw your post today. Before I offer some suggestions, a disclaimer: My DIY Home Automation system is working (mostly). I don't have any big desire to add features. & I have been busy with other life matters. Thus, I have not been tweaking things for a while (months or more). While I see that some people stop by the forum each day, they have not posted (requests or new projects) for a long time (except spam that I knock down). Therefore without the above incentives to stay current, I'm a bit rusty, but I'll try to offer you some help below.
BTW#1, you might try the EZ_Send2,ino sketch that I offered above.
BTW#2 in order for me to keep offering help, I need to hear responses from you.
|
|
|
Post by papa on Aug 21, 2022 20:08:12 GMT
ctodor & anyone else,
I have rebuilt & reprogrammed my RFM69 radio test devices. Mine work as expected. (Sometimes, even often, I receive an ACK to the messages sent by the EZ_Send device. Sometimes, I don't, but sendWithRetry redundancies would provide reliable communication.
|
|
|
Post by papa on Aug 21, 2022 20:10:59 GMT
ctodor, I first suggest that you provide more information to help diagnosis. You say "Using the attached EZ_Receive and EZ_Send examples I was able to send and receive messages." papa: What evidence do you have that you are able to send & receive messages (because your "later edit" disagrees)? Having the sender device connected to your Arduino IDE computer, did you follow this instruction: "in the Serial Monitor's top box, enter 2" ? What results did you get? What are your versions of the Arduino IDE & the RFM69.h library? What Arduino devices are you using? Are the Arduinos (for ALL pins except for the 5 volt pin) TOTALLY running on 3.3 volts? Otherwise you can damage the RFM69 radio. On sender & receiver device, do the power up LEDs light steadily? (Arduinos that switch between 3.3 & 5 volts may need fiddling with to get reliable connection.) What is the frequency of your RFM69 radios? In BOTH send & receive sketches, did you put that frequency after "#define myFrequency " ? Did you check the wiring of your send & receive devices against the diagram in this post above? Check the wiring again, please. Did you match the antenna lengths to your radio frequency? Did you recheck the quality of how you soldered wires to the radios? Try trading the radios between sender & receiver. What results do you get? Do you have another RFM69 radio to try on the receiver device? If so, try it. Please start reporting answers to the above questions.
|
|