mysensors / MySensors

MySensors library and examples

Home Page:https://www.mysensors.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SUGGESTION: Add log entry when RF channel is too noisy

frapell opened this issue · comments

I was recently having issues where my GW will receive data, but would not send back.
I wrote the details on what was going on in https://forum.mysensors.org/topic/11802/my-rpi-gateway-suddenly-stopped-working-no-idea-what-else-to-try?_=1631270464864
As can be seen in the first message to that thread, all I could see with the default debug messages was !TSF:MSG:SEND because an ACK was not received. This was not really the case.

In reality, what happened was that this function

LOCAL bool RFM69_channelFree(void)
{
// returns true if channel activity under RFM69_CSMA_LIMIT_DBM
const rfm69_RSSI_t RSSI = RFM69_readRSSI(false);
RFM69_DEBUG(PSTR("RFM69:CSMA:RSSI=%" PRIi16 "\n"), RFM69_internalToRSSI(RSSI));
return (RSSI > RFM69_RSSItoInternal(MY_RFM69_CSMA_LIMIT_DBM));
}

would never return true, because there was a faulty node sending garbage into the channel.

I only found out when I added MY_DEBUG_VERBOSE_RFM69 flag when compiling mysgw.

So the suggestion would be to add some more generic message (without the need to use MY_DEBUG_VERBOSE_RFM69) that would say something like "channel too noisy" or something like that...