Strange issue with RPI and sensors registering... seems to fall asleep (w/ WORKAROUND)



  • Hi there,

    I recently built a RPi2 with the an NRF24L01 + Antenna. I am running the NRF24 via a 3.3v regulator on the 5v rail of the Pi. The RPi is wired to my network, so no additional wifi card. The build of the RPi and NRF driver is by the book. I followed the instructions exactly.

    I am using Domoticz as a controller and it runs on a separate box. The RPi is just the gateway. It does nothing else.

    I have deployed a few test sensors and they seem to work fine once they been registered... It's just the RPi doesnt seem to pick up any new sensors, until I use my weird workaround.

    I watch the Serial output of the ATmega328 sensor and I can see that its failing to communicate with the pi...

    So in order to get it to work, I SSH into my pi, and just hold down the enter key on the command line. It seems to wake up the pi and I immediately see the sensor register and start to send its data.

    Really strange, but this is the only way I can get it to work. I have done it multiple times, and it definitely looks like the NRF24 on the pi is falling asleep. Or perhaps the Pi's cpu is throttling back when not much is going on.

    Anyone else seen this issue?

    Thanks,

    loiphin.

    Actually it seems to happen whenever you power up the sensor, even if it was previously registered:

    Starting sensor (RNNNA-, 2.0.0)
    TSM:INIT
    TSM:RADIO:OK
    TSP:ASSIGNID:OK (ID=4)
    TSM:FPAR
    TSP:MSG:SEND 4-4-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSM:FPAR
    TSP:MSG:SEND 4-4-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSM:FPAR
    TSP:MSG:SEND 4-4-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSM:FPAR
    TSP:MSG:SEND 4-4-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    !TSM:FPAR:FAIL
    !TSM:FAILURE
    TSM:PDT
    TSM:INIT
    TSM:RADIO:OK
    TSP:ASSIGNID:OK (ID=4)
    TSM:FPAR
    TSP:MSG:SEND 4-4-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSM:FPAR
    TSP:MSG:SEND 4-4-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSM:FPAR
    TSP:MSG:SEND 4-4-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSM:FPAR
    TSP:MSG:SEND 4-4-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    !TSM:FPAR:FAIL
    !TSM:FAILURE
    TSM:PDT
    
    At this point I ssh'd into my Pi and held down the enter key, just to wake up the CPU I guess..
    
    TSM:INIT
    TSM:RADIO:OK
    TSP:ASSIGNID:OK (ID=4)
    TSM:FPAR
    TSP:MSG:SEND 4-4-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSP:MSG:READ 0-0-4 s=255,c=3,t=8,pt=1,l=1,sg=0:0
    TSP:MSG:FPAR RES (ID=0, dist=0)
    TSP:MSG:PAR OK (ID=0, dist=1)
    TSM:FPAR:OK
    TSM:ID
    TSM:CHKID:OK (ID=4)
    TSM:UPL
    TSP:PING:SEND (dest=0)
    TSP:MSG:SEND 4-4-0-0 s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=ok:1
    TSP:MSG:READ 0-0-4 s=255,c=3,t=25,pt=1,l=1,sg=0:1
    TSP:MSG:PONG RECV (hops=1)
    TSP:CHKUPL:OK
    TSM:UPL:OK
    TSM:READY
    TSP:MSG:SEND 4-4-0-0 s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=ok:0100
    TSP:MSG:SEND 4-4-0-0 s=255,c=0,t=17,pt=0,l=5,sg=0,ft=0,st=ok:2.0.0
    TSP:MSG:SEND 4-4-0-0 s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=ok:0
    TSP:MSG:READ 0-0-4 s=255,c=3,t=15,pt=6,l=2,sg=0:0100
    TSP:MSG:READ 0-0-4 s=255,c=3,t=6,pt=0,l=1,sg=0:M
    TSP:MSG:SEND 4-4-0-0 s=255,c=3,t=11,pt=0,l=22,sg=0,ft=0,st=ok:TemperatureAndHumidity
    TSP:MSG:SEND 4-4-0-0 s=255,c=3,t=12,pt=0,l=3,sg=0,ft=0,st=ok:1.1
    TSP:MSG:SEND 4-4-0-0 s=0,c=0,t=7,pt=0,l=0,sg=0,ft=0,st=ok:
    TSP:MSG:SEND 4-4-0-0 s=1,c=0,t=6,pt=0,l=0,sg=0,ft=0,st=ok:
    Request registration...
    TSP:MSG:SEND 4-4-0-0 s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=ok:2
    TSP:MSG:READ 0-0-4 s=255,c=3,t=27,pt=1,l=1,sg=0:1
    Node registration=1
    Init complete, id=4, parent=0, distance=1, registration=1
    TSP:MSG:SEND 4-4-0-0 s=1,c=1,t=0,pt=7,l=5,sg=0,ft=0,st=ok:22.0
    T: 22.00
    TSP:MSG:SEND 4-4-0-0 s=0,c=1,t=1,pt=7,l=5,sg=0,ft=0,st=ok:36.0
    H: 36.00
    
    Stopped holding down enter here. After which it continues fine on its own...
    
    


  • No one have this problem?? Bueller... Bueller .... Bueller.... anyone?


Log in to reply
 

422
Online

6.7k
Users

7.6k
Topics

80.4k
Posts

Looks like your connection to MySensors Forum was lost, please wait while we try to reconnect.