Gateway sends NACK to node
-
-
This is very strange but could indicate where to look for similar problems. I dumped the mysensors gateway and node and programed the arduinos with the standard arduino Lora libary to establish a serial device on HA. This worked first time and I could get messages through, no problem. This means that the radios was at least working. Then I reprogramed the gateway and the node with mysensors serial GW and node options. The radios connected first time and I don't think I received a single NACK for two days now.
So I can only think that there must be some radio setup parameters that are stuck in memory or something like that.Any ideas from someone on this?
-
This is very strange but could indicate where to look for similar problems. I dumped the mysensors gateway and node and programed the arduinos with the standard arduino Lora libary to establish a serial device on HA. This worked first time and I could get messages through, no problem. This means that the radios was at least working. Then I reprogramed the gateway and the node with mysensors serial GW and node options. The radios connected first time and I don't think I received a single NACK for two days now.
So I can only think that there must be some radio setup parameters that are stuck in memory or something like that.Any ideas from someone on this?
@mariusl said in Gateway sends NACK to node:
Any ideas from someone on this?
#define MY_TRANSPORT_STATE_TIMEOUT_MS (5*1000ul)
//#define MY_RFM95_MODEM_CONFIGRUATION RFM95_BW125CR45SF1288
#define MY_RFM95_MODEM_CONFIGRUATION RFM95_BW125CR48SF4096These lines can affect. the TRANSPORT_STATE_TIMEOUT may be less than a actual message sending time. you will get constant NACK's.
-
@mariusl said in Gateway sends NACK to node:
Any ideas from someone on this?
#define MY_TRANSPORT_STATE_TIMEOUT_MS (5*1000ul)
//#define MY_RFM95_MODEM_CONFIGRUATION RFM95_BW125CR45SF1288
#define MY_RFM95_MODEM_CONFIGRUATION RFM95_BW125CR48SF4096These lines can affect. the TRANSPORT_STATE_TIMEOUT may be less than a actual message sending time. you will get constant NACK's.
@yury said in Gateway sends NACK to node:
These lines can affect. the TRANSPORT_STATE_TIMEOUT may be less than a actual message sending time. you will get constant NACK's.
I have it working fine now but I would like to make it as robust as possible. What would you suggest as a good value for the timeout?
-
@mariusl said in Gateway sends NACK to node:
good value for the timeout?
here are the delay examples in the docs
https://www.mysensors.org/apidocs/group__RFM95grp.html#ga23a30185cbd40984e65d5269983bf840for yours #define MY_RFM95_MODEM_CONFIGRUATION RFM95_BW125CR48SF4096
I would use #define RFM95_RETRY_TIMEOUT_MS (2000ul)
any reason for the Spread factor SF4096 ?
-
@mariusl said in Gateway sends NACK to node:
good value for the timeout?
here are the delay examples in the docs
https://www.mysensors.org/apidocs/group__RFM95grp.html#ga23a30185cbd40984e65d5269983bf840for yours #define MY_RFM95_MODEM_CONFIGRUATION RFM95_BW125CR48SF4096
I would use #define RFM95_RETRY_TIMEOUT_MS (2000ul)
any reason for the Spread factor SF4096 ?
-
@mariusl said in Gateway sends NACK to node:
what it does
SF number is chips (chirps) needed to code each bit. SF4096 is maximum range especially in urban area, but very long delay . I tried different combinations and found below MY_RFM95_MODEM_CONFIGRUATION is pretty much good. 20 - 30% less in terms of distance and delay #define RFM95_RETRY_TIMEOUT_MS (300ul) is enoght. Much faster.
#define MY_RFM95_MODEM_CONFIGRUATION RFM95_BW_500KHZ | RFM95_CODING_RATE_4_5, RFM95_SPREADING_FACTOR_2048CPS | RFM95_RX_PAYLOAD_CRC_ON, RFM95_AGC_AUTO_ON
-
Aah ok that makes sense. My application is for rural use and I need the max distance possible. The slow response will not be a problem as the sensors don't send a lot of data at all. So maybe I will stay with the SF4096 for now but I will do some experimenting with the settings. Just to understand them a bit better.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login