I have checked with ethernet port instead of serial:
sudo ./configure --my-debug=enable --my-config-file=/etc/mysensors.conf --my-transport=rs485 --my-gateway=ethernet --my-port=5003 --my-rs485-de-pin=7 --my-rs485-serial-port=/dev/ttyS0 --my-rs485-baudrate=9600 --my-leds-err-pin=12 --my-leds-rx-pin=16 --my-leds-tx-pin=18
The results is:
The gateway works with nodes as expected - no need to hit Enter for updates. It works as daemon as well.
So why it not works on gateway with serial? My suspicious is the port - I was using fake ones (/dev/ttyMySensorsGateway and /dev/ttyUSB020) and the real one /dev/ttyAMA0. Always the same. I tried to listen the (fake) port with "screen" command - nothing was there.
I have another finding/problem. When the gateway starts:
Sep 21 14:20:57 ERROR Failed to open log pipe.
Sep 21 14:20:57 INFO Starting gateway...
Sep 21 14:20:57 INFO Protocol version - 2.3.2
Sep 21 14:20:57 DEBUG MCO:BGN:INIT GW,CP=RSNGL---,FQ=NA,REL=255,VER=2.3.2
Sep 21 14:20:57 DEBUG TSF:LRT:OK
Sep 21 14:20:57 DEBUG TSM:INIT
Sep 21 14:20:57 DEBUG TSF:WUR:MS=0
Sep 21 14:20:57 DEBUG Serial port /dev/ttyS0 (9600 baud) created
Sep 21 14:20:57 DEBUG TSM:INIT:TSP OK
Sep 21 14:20:57 DEBUG TSM:INIT:GW MODE
Sep 21 14:20:57 DEBUG TSM:READY:ID=0,PAR=0,DIS=0
Sep 21 14:20:57 DEBUG MCO:REG:NOT NEEDED
Sep 21 14:20:57 DEBUG Listening for connections on F▒▒:5003
Sep 21 14:20:57 DEBUG MCO:BGN:STP
Sep 21 14:20:57 DEBUG MCO:BGN:INIT OK,TSP=1
Sep 21 14:20:57 DEBUG TSM:READY:NWD REQ
Sep 21 14:20:57 DEBUG ?TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK:
Sep 21 14:21:10 DEBUG TSF:MSG:READ,50-50-0,s=0,c=1,t=23,pt=2,l=2,sg=0:58
... you can find that instead of IP address (I was expecting 127.0.0.0 or 0.0.0.0) I get a garbage:
DEBUG Listening for connections on F▒▒:5003
After another trial (make clean -> ./configure .... -> make I get similar but with different "garbage":
DEBUG Listening for connections on ▒ݾ:
Home Assistant is unable to find the gateway on ports 127.0.0.1 and 0.0.0.0. I tried local network IP (static) - it was "accepted" (no connection error returned), but no Nodes has been found.
I'm really stubborn to find single board solution for Gateway (RS485 nodes) and Controller but I'm getting tired :(.
mfalkvidd gave you a great link, but if you ever need to see any possible choices, you can run
and it will show you. The extra flags section is one thing (of many) that it says.
Actually, this is very timely for me, as I'm trying to troubleshoot my own radio issues, so I'll use those extra two flags that you mentioned and see what they say.
The logs already show that preceding the recursive calls that TXError1 for example proceeds the entries. In and off itself I thought it a little suggestive, as I couldn't see any without a retransmitted effort. (There wouldn't be a entry at all if the first transmission successfully occurred)
I'll wind things back to no retransmissions, and see how that behaves. I'm not sure how to use a state machine for this, I've got some reading and experimenting to do. Any hints or know of any other code out there in the mysensors world to check for successfull end to end transmissions, and consequently retransmissions?
Many thanks for the input
@Ethan-Chua Some photos of the wiring and set up would be of help here along with a link tothe radio modules you are using. Maybe try moving them further apart, counter-intuitive I know but it might be receiving module being swamped with the power of the TX one. You could also try a different channel (use nrf doctor to find where there are 'quiet' areas) and see if that helps.
Do you have a lot of bluetooth/wifi in the building? anything else in the 2.4GHz band like cameras, keyboard,mouse etc?