Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MySensors native RSSI support #4

Open
j54n1n opened this issue Aug 2, 2021 · 0 comments
Open

MySensors native RSSI support #4

j54n1n opened this issue Aug 2, 2021 · 0 comments

Comments

@j54n1n
Copy link

j54n1n commented Aug 2, 2021

Hi @jkandasa,

I looked at the source code of MySensors v2.3.2 and did some manual tests regarding RSSI support.

  1. It seems the gateway itself cannot be queried for the RSSI since only the code from MyGatewayTransport.cpp gets processed for internal messages even when the MY_SIGNAL_REPORT_ENABLED symbol is defined in the sketch.

  2. Every other node will respond to internal signal messages when MY_SIGNAL_REPORT_ENABLED is defined in the sketch because code from MyTransport.cpp gets executed instead.

I found following I_SIGNAL_REPORT_REQUEST responses as mentioned in MyTransport.h from my node number 84 with a RFM69 radio by inserting the internal signal messages manually into the serial gateway where the last letter of the message switches the measurement method.

Received RSSI and 'reverse' transmitted RSSI in dBm:

84;0;3;0;29;R
84;255;3;0;31;-60
84;0;3;0;29;R!
84;255;3;0;31;-67

If I understood the code correctly the ! switches from RX to TX measurement a.k.a. from one-way measurement to two-way 'reverse' RSSI measurement derived from a ACK packet.

There is also the standalone transmitted RSSI but with some nonsense value (+127 dBm):

84;0;3;0;29;r
84;255;3;0;31;127

There exist also other internal signal messages for SNR (S, s, S!) TX power and percent (T, P) and uplink quality (U).

The only downside is that this works only if the node is not sleeping and if it has MY_SIGNAL_REPORT_ENABLED enabled in the sketch. If signal report is not enabled or a radio does not support a certain measurement method the value -256 is returned instead in the response message.

As mentioned in #2 in my case since I have a sleeping node it will not respond to signal requests. So I would have to use something like NodeManagers SensorSignal.h which shows up as a classic sensor message of type S_SOUND with V_LEVEL and sensor ID 202 which will be reported as soon as the node wakes up after transmitting some other sensor values. At the same time SensorSignal will enable also MY_SIGNAL_REPORT_ENABLED but without any effect when sleep mode is activated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants