NRF24L01+ problems in 2.1.1 and 2.2.0 Beta
-
@miljume 2.1.1 has been out for many months without problem, so it is not likely that there is a problem with the MySensors library. But you could of course have stumbled on a corner case that no-one has seen before.
Could you post the full debug log for the gateway and the full configure command you used to compile it?
Edit: sorry, I see that you have the full log in a later post. So just post the configure command and branch/version used for each output.
@mfalkvidd Sure, below are commands and debug logs for both 2.1.1 and 2.2.0 Beta
As you can see both of the Gateways fails with 2.1.1. I have seen other people having the exact same problem so that is why I thought it could be something with the libraries
Commands with 2.2.0 Beta (serial GW)
./configure --my-transport=nrf24 ./configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyUSB020 makeDebug Log
mysgw: Starting gateway... mysgw: Protocol version - 2.2.0-beta mysgw: MCO:BGN:INIT GW,CP=RNNGL---,VER=2.2.0-beta mysgw: TSF:LRT:OK mysgw: TSM:INIT mysgw: TSF:WUR:MS=0 mysgw: TSM:INIT:TSP OK mysgw: TSM:INIT:GW MODE mysgw: TSM:READY:ID=0,PAR=0,DIS=0 mysgw: MCO:REG:NOT NEEDED mysgw: MCO:BGN:STP mysgw: MCO:BGN:INIT OK,TSP=1Domoticz Log
2017-10-10 18:43:07.538 MySensors: Using serial port: /dev/ttyUSB020 2017-10-10 18:43:07.538 Error: Serial Port closed!... Error: End of file 2017-10-10 18:43:08.538 MySensors: retrying in 30 seconds...Repeats every 30th second,
Commands with 2.2.0 Beta (Ethernet GW)
./configure --my-transport=nrf24 ./configure --my-gateway=ethernet --my-port=5003 ./configure --my-gateway=ethernet --my-controller-ip-address=127.0.0.1 makeDebug Log
mysgw: Starting gateway... mysgw: Protocol version - 2.2.0-beta mysgw: MCO:BGN:INIT GW,CP=RNNGL---,VER=2.2.0-beta mysgw: TSF:LRT:OK mysgw: TSM:INIT mysgw: TSF:WUR:MS=0 mysgw: TSM:INIT:TSP OK mysgw: TSM:INIT:GW MODE mysgw: TSM:READY:ID=0,PAR=0,DIS=0 mysgw: MCO:REG:NOT NEEDED mysgw: connect: Connection refused mysgw: failed to connect mysgw: Eth: connect mysgw: connect: Connection refused mysgw: failed to connect mysgw: Eth: connectCommands with 2.1.1 (serial GW)
./configure --my-transport=nrf24 ./configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyUSB020 makeDebug Log
mysgw: Starting gateway... mysgw: Protocol version - 2.1.1 mysgw: MCO:BGN:INIT GW,CP=RNNG---,VER=2.1.1 mysgw: TSM:INIT mysgw: TSF:WUR:MS=0 mysgw: !TSM:INIT:TSP FAIL mysgw: TSM:FAIL:CNT=1 mysgw: TSM:FAIL:PDTCommands with 2.1.1 (Ethernet GW)
./configure --my-transport=nrf24 ./configure --my-gateway=ethernet --my-port=5003 ./configure --my-gateway=ethernet --my-controller-ip-address=127.0.0.1 makeDebug Log
mysgw: Starting gateway... mysgw: Protocol version - 2.1.1 mysgw: MCO:BGN:INIT GW,CP=RNNG---,VER=2.1.1 mysgw: TSM:INIT mysgw: TSF:WUR:MS=0 mysgw: !TSM:INIT:TSP FAIL mysgw: TSM:FAIL:CNT=1 mysgw: TSM:FAIL:PDT -
@mfalkvidd Sure, below are commands and debug logs for both 2.1.1 and 2.2.0 Beta
As you can see both of the Gateways fails with 2.1.1. I have seen other people having the exact same problem so that is why I thought it could be something with the libraries
Commands with 2.2.0 Beta (serial GW)
./configure --my-transport=nrf24 ./configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyUSB020 makeDebug Log
mysgw: Starting gateway... mysgw: Protocol version - 2.2.0-beta mysgw: MCO:BGN:INIT GW,CP=RNNGL---,VER=2.2.0-beta mysgw: TSF:LRT:OK mysgw: TSM:INIT mysgw: TSF:WUR:MS=0 mysgw: TSM:INIT:TSP OK mysgw: TSM:INIT:GW MODE mysgw: TSM:READY:ID=0,PAR=0,DIS=0 mysgw: MCO:REG:NOT NEEDED mysgw: MCO:BGN:STP mysgw: MCO:BGN:INIT OK,TSP=1Domoticz Log
2017-10-10 18:43:07.538 MySensors: Using serial port: /dev/ttyUSB020 2017-10-10 18:43:07.538 Error: Serial Port closed!... Error: End of file 2017-10-10 18:43:08.538 MySensors: retrying in 30 seconds...Repeats every 30th second,
Commands with 2.2.0 Beta (Ethernet GW)
./configure --my-transport=nrf24 ./configure --my-gateway=ethernet --my-port=5003 ./configure --my-gateway=ethernet --my-controller-ip-address=127.0.0.1 makeDebug Log
mysgw: Starting gateway... mysgw: Protocol version - 2.2.0-beta mysgw: MCO:BGN:INIT GW,CP=RNNGL---,VER=2.2.0-beta mysgw: TSF:LRT:OK mysgw: TSM:INIT mysgw: TSF:WUR:MS=0 mysgw: TSM:INIT:TSP OK mysgw: TSM:INIT:GW MODE mysgw: TSM:READY:ID=0,PAR=0,DIS=0 mysgw: MCO:REG:NOT NEEDED mysgw: connect: Connection refused mysgw: failed to connect mysgw: Eth: connect mysgw: connect: Connection refused mysgw: failed to connect mysgw: Eth: connectCommands with 2.1.1 (serial GW)
./configure --my-transport=nrf24 ./configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyUSB020 makeDebug Log
mysgw: Starting gateway... mysgw: Protocol version - 2.1.1 mysgw: MCO:BGN:INIT GW,CP=RNNG---,VER=2.1.1 mysgw: TSM:INIT mysgw: TSF:WUR:MS=0 mysgw: !TSM:INIT:TSP FAIL mysgw: TSM:FAIL:CNT=1 mysgw: TSM:FAIL:PDTCommands with 2.1.1 (Ethernet GW)
./configure --my-transport=nrf24 ./configure --my-gateway=ethernet --my-port=5003 ./configure --my-gateway=ethernet --my-controller-ip-address=127.0.0.1 makeDebug Log
mysgw: Starting gateway... mysgw: Protocol version - 2.1.1 mysgw: MCO:BGN:INIT GW,CP=RNNG---,VER=2.1.1 mysgw: TSM:INIT mysgw: TSF:WUR:MS=0 mysgw: !TSM:INIT:TSP FAIL mysgw: TSM:FAIL:CNT=1 mysgw: TSM:FAIL:PDT@miljume thanks. And yes, there seems to be something fishy going on since other people also have problems.
I don't have a spare raspberry pi at the moment so I can't reproduce the problem. Hopefully someone else can help troubleshooting. I'll try to get my hands on a new raspberry within a week.
-
@mfalkvidd Sure, below are commands and debug logs for both 2.1.1 and 2.2.0 Beta
As you can see both of the Gateways fails with 2.1.1. I have seen other people having the exact same problem so that is why I thought it could be something with the libraries
Commands with 2.2.0 Beta (serial GW)
./configure --my-transport=nrf24 ./configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyUSB020 makeDebug Log
mysgw: Starting gateway... mysgw: Protocol version - 2.2.0-beta mysgw: MCO:BGN:INIT GW,CP=RNNGL---,VER=2.2.0-beta mysgw: TSF:LRT:OK mysgw: TSM:INIT mysgw: TSF:WUR:MS=0 mysgw: TSM:INIT:TSP OK mysgw: TSM:INIT:GW MODE mysgw: TSM:READY:ID=0,PAR=0,DIS=0 mysgw: MCO:REG:NOT NEEDED mysgw: MCO:BGN:STP mysgw: MCO:BGN:INIT OK,TSP=1Domoticz Log
2017-10-10 18:43:07.538 MySensors: Using serial port: /dev/ttyUSB020 2017-10-10 18:43:07.538 Error: Serial Port closed!... Error: End of file 2017-10-10 18:43:08.538 MySensors: retrying in 30 seconds...Repeats every 30th second,
Commands with 2.2.0 Beta (Ethernet GW)
./configure --my-transport=nrf24 ./configure --my-gateway=ethernet --my-port=5003 ./configure --my-gateway=ethernet --my-controller-ip-address=127.0.0.1 makeDebug Log
mysgw: Starting gateway... mysgw: Protocol version - 2.2.0-beta mysgw: MCO:BGN:INIT GW,CP=RNNGL---,VER=2.2.0-beta mysgw: TSF:LRT:OK mysgw: TSM:INIT mysgw: TSF:WUR:MS=0 mysgw: TSM:INIT:TSP OK mysgw: TSM:INIT:GW MODE mysgw: TSM:READY:ID=0,PAR=0,DIS=0 mysgw: MCO:REG:NOT NEEDED mysgw: connect: Connection refused mysgw: failed to connect mysgw: Eth: connect mysgw: connect: Connection refused mysgw: failed to connect mysgw: Eth: connectCommands with 2.1.1 (serial GW)
./configure --my-transport=nrf24 ./configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyUSB020 makeDebug Log
mysgw: Starting gateway... mysgw: Protocol version - 2.1.1 mysgw: MCO:BGN:INIT GW,CP=RNNG---,VER=2.1.1 mysgw: TSM:INIT mysgw: TSF:WUR:MS=0 mysgw: !TSM:INIT:TSP FAIL mysgw: TSM:FAIL:CNT=1 mysgw: TSM:FAIL:PDTCommands with 2.1.1 (Ethernet GW)
./configure --my-transport=nrf24 ./configure --my-gateway=ethernet --my-port=5003 ./configure --my-gateway=ethernet --my-controller-ip-address=127.0.0.1 makeDebug Log
mysgw: Starting gateway... mysgw: Protocol version - 2.1.1 mysgw: MCO:BGN:INIT GW,CP=RNNG---,VER=2.1.1 mysgw: TSM:INIT mysgw: TSF:WUR:MS=0 mysgw: !TSM:INIT:TSP FAIL mysgw: TSM:FAIL:CNT=1 mysgw: TSM:FAIL:PDT@miljume said in NRF24L01+ problems in 2.1.1 and 2.2.0 Beta:
./configure --my-transport=nrf24
./configure --my-gateway=ethernet --my-port=5003it should be on a single line like this
./configure --my-transport=nrf24 --my-gateway=ethernet --my-port=5003--my-controller-ip-address=127.0.0.1 is not needed
-
@miljume said in NRF24L01+ problems in 2.1.1 and 2.2.0 Beta:
./configure --my-transport=nrf24
./configure --my-gateway=ethernet --my-port=5003it should be on a single line like this
./configure --my-transport=nrf24 --my-gateway=ethernet --my-port=5003--my-controller-ip-address=127.0.0.1 is not needed
-
@miljume I've seen the same length errors in the past when my radio wiring wasn't stable (flaky jumper wires). The TSP Fail messages indicate the same.
Could you check your connections from the pi to the radio? -
@Yveaux Thanks for the feedback but I am using a RPI Shield so the connections should be stable
@miljume I am having the same issue since 2.1 and trying to revert to 2.2 beta it fails as well. I am using an RPi model 2 B and the same RPI shield (I have traded out the shield as I have a few and same result). All of my nodes have been offline for months as the gateway does not function.
-
@miljume said in NRF24L01+ problems in 2.1.1 and 2.2.0 Beta:
./configure --my-transport=nrf24
./configure --my-gateway=ethernet --my-port=5003it should be on a single line like this
./configure --my-transport=nrf24 --my-gateway=ethernet --my-port=5003--my-controller-ip-address=127.0.0.1 is not needed
@gohan Now I have tried compiling it with one line command but the GW still don't start with 2.1.1
./configure --my-transport=nrf24 --my-gateway=ethernet --my-port=5003mysgw: Starting gateway... mysgw: Protocol version - 2.1.1 mysgw: MCO:BGN:INIT GW,CP=RNNG---,VER=2.1.1 mysgw: TSM:INIT mysgw: TSF:WUR:MS=0 mysgw: !TSM:INIT:TSP FAIL mysgw: TSM:FAIL:CNT=1 mysgw: TSM:FAIL:PDT -
@gohan Now I have tried compiling it with one line command but the GW still don't start with 2.1.1
./configure --my-transport=nrf24 --my-gateway=ethernet --my-port=5003mysgw: Starting gateway... mysgw: Protocol version - 2.1.1 mysgw: MCO:BGN:INIT GW,CP=RNNG---,VER=2.1.1 mysgw: TSM:INIT mysgw: TSF:WUR:MS=0 mysgw: !TSM:INIT:TSP FAIL mysgw: TSM:FAIL:CNT=1 mysgw: TSM:FAIL:PDT -
@miljume I see alternating !TSM:INIT:TSP Fail and TSM:INIT:TSP OK in your logs.
The fails indicate a failure to communicate with the radio module.
Is there a pattern in these fails between software versions?@Yveaux The FAIL´s all occur with 2.1.1 and the OK is with 2.2.0 Beta. Same radio connections for both so the FAIL´s should not be connected to communication with the radio module. I have also tried 3 radios and 2 different ways of connecting them (Shield and Dupont cables) Even if 2.2.0 starts OK the problem is that it for the Ethernet GW it fails to connect
mysgw: Starting gateway... mysgw: Protocol version - 2.2.0-beta mysgw: MCO:BGN:INIT GW,CP=RNNGL---,VER=2.2.0-beta mysgw: TSF:LRT:OK mysgw: TSM:INIT mysgw: TSF:WUR:MS=0 mysgw: TSM:INIT:TSP OK mysgw: TSM:INIT:GW MODE mysgw: TSM:READY:ID=0,PAR=0,DIS=0 mysgw: MCO:REG:NOT NEEDED mysgw: connect: Connection refused mysgw: failed to connect mysgw: Eth: connect mysgw: connect: Connection refused mysgw: failed to connect mysgw: Eth: connectAnd for the Serial GW it gives the following error in Domoticz
2017-10-10 18:43:07.538 MySensors: Using serial port: /dev/ttyUSB020 2017-10-10 18:43:07.538 Error: Serial Port closed!... Error: End of file 2017-10-10 18:43:08.538 MySensors: retrying in 30 seconds...None of them picks up sensor reports
-
Did you check if spi is enabled in configuration? Sorry for stupid questions, but I need to broaden the search for the issue
@gohan, I can only speak for me but I have done the following on my RPi 2 B:
Changed out radios
Used shield for radio or just straight wiring to radio
New flash of latest minimal Raspbian
Enabled SPIAnd various combinations of those. Maybe something broke in an update to Raspbian or some other change to the mysensors repo?
-
Did you check if spi is enabled in configuration? Sorry for stupid questions, but I need to broaden the search for the issue
-
With 2.1.1 I have the exact same problems.
However, everything seems to be fine with 2.2.0 Beta:
git clone https://github.com/mysensors/MySensors.git --branch development cd MySensors ./configure --my-transport=nrf24 --my-gateway=ethernet --my-port=5003 --my-rf24-pa-level=RF24_PA_MAX makeIn domoticz:

The result:
pi@raspberrypi:~/MySensors $ sudo ./bin/mysgw -d mysgw: Starting gateway... mysgw: Protocol version - 2.2.0-beta mysgw: MCO:BGN:INIT GW,CP=RNNGL---,VER=2.2.0-beta mysgw: TSF:LRT:OK mysgw: TSM:INIT mysgw: TSF:WUR:MS=0 mysgw: TSM:INIT:TSP OK mysgw: TSM:INIT:GW MODE mysgw: TSM:READY:ID=0,PAR=0,DIS=0 mysgw: MCO:REG:NOT NEEDED mysgw: Listening for connections on 0.0.0.0:5003 mysgw: MCO:BGN:STP mysgw: MCO:BGN:INIT OK,TSP=1 mysgw: TSF:MSG:READ,2-2-0,s=1,c=1,t=0,pt=7,l=5,sg=0:24.0 mysgw: TSF:MSG:READ,2-2-0,s=2,c=1,t=1,pt=2,l=2,sg=0:58After success with 2.2.0 Beta I tried to go back to 2.1.1. However, it still does not work.
I am on rpi3 and use a socket adapter board for the radio.
-
So, I did a lot of re-configuring and using 2.2.0 beta when a node sends a value payload (in my case a temp/humidity/battery value I get this while running my RPi ethernet gateway in debug:
mysgw: TSF:MSG:READ,3-3-255,s=255,c=3,t=7,pt=0,l=0,sg=0: mysgw: TSF:MSG:BC mysgw: TSF:MSG:FPAR REQ,ID=3 mysgw: TSF:CKU:OK,FCTRL mysgw: TSF:MSG:GWL OK mysgw: !TSF:MSG:SEND,0-0-3-3,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0 mysgw: TSF:MSG:READ,3-3-255,s=255,c=3,t=7,pt=0,l=0,sg=0: mysgw: TSF:MSG:BC mysgw: TSF:MSG:FPAR REQ,ID=3 mysgw: TSF:CKU:OK,FCTRL mysgw: TSF:MSG:GWL OKThis continues until I kill the process. In the middle of all of these error messages though, it also reports client PING events:
mysgw: Client 0: 0;0;3;0;18;PINGOther interesting items of note:
Domoticz says the values for temp have not been updated for 3+ hours for that node.
Domoticz says that node only has a temp sensor.
MYSController reports it having 2 sensors (temp and humidity) and it reports the values when i would expect them to be sent (ie, not 3+ hours old but updated continuously when temp changes).I am at my wits end here.