Hey guys, I am trying to send some data from my node moteino to gateway moteino so that they can be displayed in gateway's serial monitor. The data includes i) node's battery voltage, ii) soil moisture attached to node moteino and iii) node's RSSI. I am able to send the first two but not the last one. Note: I know we can display gateway moteino's RSSI in gateway's serial monitor and node's RSSI in node's serial monitor but what I'm trying to do is to send node's RSSI (think of the RSSI as one of the node's sensor readings) and display it in gateway's serial monitor. Any help will be highly appreciated.
The RSSI = Receiver Signal Strength Indicator
This is not something you send, it's something the receiver (gateway) will indicate, how "loud" the received signal was.
You can use the PiGateway example (https://github.com/LowPowerLab/RFM69/blob/master/Examples/PiGateway/PiGateway.ino) sketch to read RSSI from receiver radio for the received packet, and transmit it to your gateway host via serial.
Another important point is that the node's RSSI is actually a combined measure of its receive sensitivity and the transmitter's (Gateway in your case) signal level received at the node. I wouldn't use the term 'nodes RSSI' as that could be misunderstood.
Tom
Yes, Tom is correct.
Receiver sensitivity can be influenced by many factors. For all things equal, reading RSSI at the receiver should be enough to get a sense of a node's performance.
You could have your node transmit it's transmit power level if you want a more advanced view of what a node is doing and how good the signal is based on its transmit power level as well. But we're splitting hais here. Even with RFM69_ATC (Tom's contribution) the node should auto adjust power based on RSSI feedback from the gateway.
Thank you for the explanation, Felix and Tom. But I'm still not convinced that we can't make it display on gateway's serial monitor or send it to Raspberry Pi. Actually, let me elaborate what I am really trying to do. I want to deploy multiple nodes (~100m apart: not decided yet) in a forest area in which soil moisture sensors will be hooked up. My goal is to store long-time (i.e, from few months up to a whole year) data I mentioned earlier including the each node's RSL (Receive Signal Level=Receive power at Receiver) using Raspberry Pi. Apart from the soil moisture, one of the other things that I want to observe is to see how the vegetation/weather changes in a 12-month period and how the change impact the RSL or RSSI or Rx power at Receiver using Raspberry Pi.
I want to download the CSV file from the Raspberry Pi 3 containing all the information I mentioned including RSSI. Won't we be able to store the RSSI using some command such as int RSL=radio.RSSI and send it to gateway using sprintf(sendMessage, "RSL:%s SM:%s V:%s", RSL_str, SM_str, Vcap_str);. But I'm getting RSL:00 as shown in https://drive.google.com/open?id=0B8PhSKAQEDsJUlozcFVTUThaWTQ (https://drive.google.com/open?id=0B8PhSKAQEDsJUlozcFVTUThaWTQ).
Please be advised that I'm not a good programmer that's why I don't know why it's not working. Any suggestion please...
Quote from: SanG on October 26, 2017, 09:44:19 AM
Thank you for the explanation, Felix and Tom. But I'm still not convinced that we can't make it display on gateway's serial monitor or send it to Raspberry Pi. Actually, let me elaborate what I am really trying to do. I want to deploy multiple nodes (~100m apart: not decided yet) in a forest area in which soil moisture sensors will be hooked up. My goal is to store long-time (i.e, from few months up to a whole year) data I mentioned earlier including the each node's RSL (Receive Signal Level=Receive power at Receiver) using Raspberry Pi. Apart from the soil moisture, one of the other things that I want to observe is to see how the vegetation/weather changes in a 12-month period and how the change impact the RSL or RSSI or Rx power at Receiver using Raspberry Pi.
I want to download the CSV file from the Raspberry Pi 3 containing all the information I mentioned including RSSI. Won't we be able to store the RSSI using some command such as int RSL=radio.RSSI and send it to gateway using sprintf(sendMessage, "RSL:%s SM:%s V:%s", RSL_str, SM_str, Vcap_str);. But I'm getting RSL:00 as shown in https://drive.google.com/open?id=0B8PhSKAQEDsJUlozcFVTUThaWTQ (https://drive.google.com/open?id=0B8PhSKAQEDsJUlozcFVTUThaWTQ).
Please be advised that I'm not a good programmer that's why I don't know why it's not working. Any suggestion please...
Including your node's sketch might be helpful, but, in general, radio.RSSI is ONLY accurate immediately after a successful return from radio.receiveDone() call.
Tom
Quote from: TomWS on October 26, 2017, 09:52:33 AM
Including your node's sketch might be helpful, but, in general, radio.RSSI is ONLY accurate immediately after a successful return from radio.receiveDone() call.
Tom
Here's the code I'm working on: https://drive.google.com/open?id=0B8PhSKAQEDsJUTQzckppeFRmRjA (https://drive.google.com/open?id=0B8PhSKAQEDsJUTQzckppeFRmRjA)
Quote from: SanG on October 26, 2017, 10:54:11 AM
Here's the code I'm working on: https://drive.google.com/open?id=0B8PhSKAQEDsJUTQzckppeFRmRjA (https://drive.google.com/open?id=0B8PhSKAQEDsJUTQzckppeFRmRjA)
Perhaps the second
int RSL = radio.RSSI;
dtostrf(RSL, 3, 2, RSL_str);
is wiping out the value you retrieved in the first:
if (radio.receiveDone())
{
int SenderID = radio.SENDERID;
int RSL = radio.RSSI;
And, whatever you do, do NOT do:
Serial.print('[');
Serial.print(SenderID, DEC);
Serial.print("] ");
for (byte i = 0; i < radio.DATALEN; i++)
Serial.print((char)radio.DATA[i]);
Serial.print(" [Rx_RSL: ");
Serial.print(RSL);
Serial.print(" dBm]");
prior to saving any data you received and need from radio.receiveDone().
This is a very bad coding practice that continues to be propagated in the RFM69 library examples. You're wasting time printing while the data could be overwritten by a subsequent receive packet. Save it first and then print the saved values it if you want.
Tom