NRF24L01 and SenseBender Gateway - Trying to get basic comms working



  • Hi,

    Just got a SenseBender Gateway and separately some Arduino Nanos and nRF24L01's. I've followed the guides to wire things up and have flashed example programs. For the nano, I've flashed the DustSensor from the MySensors examples directory. I don't have any actual dust sensor connected to the analogue input pin, but I assume it will just send some value for the pin, whether it floats high or low. For the gateway I re-flashed the default SenseBenderSerial Gateway code from the examples directory. I have the latest Arduino development environment 1.8.5, and also the MySensor 2.1.1 libraries. Both devices are being powered from USB ports on my PC.

    I seem to be getting some sort of comms between the sensor node and the gateway, but the sensor seems to be attempting some repeated connection and then drops out for a few seconds before trying again. I'm hoping it's something simple that the more experienced can spot from the serial comms?

    Here is the Sensor node serial comms:

    0 MCO:BGN:INIT NODE,CP=RNNNA--,VER=2.1.1
    3 TSM:INIT
    4 TSF:WUR:MS=0
    11 TSM:INIT:TSP OK
    12 TSM:FPAR
    15 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    646 TSF:MSG:READ,0-0-255,s=255,c=3,t=8,pt=1,l=1,sg=0:0
    651 TSF:MSG:FPAR OK,ID=0,D=1
    2022 TSM:FPAR:OK
    2023 TSM:ID
    2024 TSM:ID:REQ
    2027 TSF:MSG:SEND,255-255-0-0,s=255,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
    4034 TSM:ID
    4035 TSM:ID:REQ
    4037 TSF:MSG:SEND,255-255-0-0,s=255,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
    6045 TSM:ID
    6046 TSM:ID:REQ
    6048 TSF:MSG:SEND,255-255-0-0,s=255,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
    8056 TSM:ID
    8057 TSM:ID:REQ
    8059 TSF:MSG:SEND,255-255-0-0,s=255,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
    10068 !TSM:ID:FAIL
    10070 TSM:FAIL:CNT=1
    10072 TSM:FAIL:PDT
    20075 TSM:FAIL:RE-INIT
    20077 TSM:INIT
    20084 TSM:INIT:TSP OK
    20086 TSM:FPAR
    20088 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    20299 TSF:MSG:READ,0-0-255,s=255,c=3,t=8,pt=1,l=1,sg=0:0
    20304 TSF:MSG:FPAR OK,ID=0,D=1
    22097 TSM:FPAR:OK
    22098 TSM:ID
    22100 TSM:ID:REQ
    22103 TSF:MSG:SEND,255-255-0-0,s=255,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
    24111 TSM:ID
    24112 TSM:ID:REQ
    24115 TSF:MSG:SEND,255-255-0-0,s=255,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
    26122 TSM:ID
    26123 TSM:ID:REQ
    26126 TSF:MSG:SEND,255-255-0-0,s=255,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
    28133 TSM:ID
    28134 TSM:ID:REQ
    28137 TSF:MSG:SEND,255-255-0-0,s=255,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
    30144 !TSM:ID:FAIL
    30145 TSM:FAIL:CNT=2
    30147 TSM:FAIL:PDT
    

    Here is the related SenseBender gateway serial:

    0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGS--,VER=2.1.1
    0;255;3;0;9;TSF:LRT:OK
    0;255;3;0;9;TSM:INIT
    0;255;3;0;9;TSF:WUR:MS=0
    0;255;3;0;9;TSM:INIT:TSP OK
    0;255;3;0;9;TSM:INIT:GW MODE
    0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0
    0;255;3;0;9;MCO:REG:NOT NEEDED
    0;255;3;0;14;Gateway startup complete.
    0;255;0;0;18;2.1.1
    0;255;3;0;9;MCO:BGN:STP
    0;255;3;0;9;MCO:BGN:INIT OK,TSP=1
    0;255;3;0;9;TSF:MSG:READ,255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    0;255;3;0;9;TSF:MSG:BC
    0;255;3;0;9;TSF:MSG:FPAR REQ,ID=255
    0;255;3;0;9;TSF:CKU:OK,FCTRL
    0;255;3;0;9;TSF:MSG:GWL OK
    0;255;3;0;9;TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
    0;255;3;0;9;TSF:MSG:READ,255-255-0,s=255,c=3,t=3,pt=0,l=0,sg=0:
    255;255;3;0;3;
    0;255;3;0;9;TSF:MSG:READ,255-255-0,s=255,c=3,t=3,pt=0,l=0,sg=0:
    255;255;3;0;3;
    0;255;3;0;9;TSF:MSG:READ,255-255-0,s=255,c=3,t=3,pt=0,l=0,sg=0:
    255;255;3;0;3;
    0;255;3;0;9;TSF:MSG:READ,255-255-0,s=255,c=3,t=3,pt=0,l=0,sg=0:
    255;255;3;0;3;
    0;255;3;0;9;TSF:MSG:READ,255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    0;255;3;0;9;TSF:MSG:BC
    0;255;3;0;9;TSF:MSG:FPAR REQ,ID=255
    0;255;3;0;9;TSF:PNG:SEND,TO=0
    0;255;3;0;9;TSF:CKU:OK
    0;255;3;0;9;TSF:MSG:GWL OK
    0;255;3;0;9;TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
    0;255;3;0;9;TSF:MSG:READ,255-255-0,s=255,c=3,t=3,pt=0,l=0,sg=0:
    255;255;3;0;3;
    0;255;3;0;9;TSF:MSG:READ,255-255-0,s=255,c=3,t=3,pt=0,l=0,sg=0:
    255;255;3;0;3;
    0;255;3;0;9;TSF:MSG:READ,255-255-0,s=255,c=3,t=3,pt=0,l=0,sg=0:
    255;255;3;0;3;
    0;255;3;0;9;TSF:MSG:READ,255-255-0,s=255,c=3,t=3,pt=0,l=0,sg=0:
    255;255;3;0;3;
    

    I've tried some things like lowering the transmit power and physically separating the devices by a couple of metres, but that didn't seem to change anything.

    It seems like it is trying to reference node and child ID 255-255? But looking at the DustSensor source code I would expect it reference a node with child-ID 0 (#define CHILD_ID_DUST 0).

    Can anyone spot anything obvious? Happy to provide any further info.

    Thanks.


  • Mod

    @phil2020 your sensor is requesting a node ID from the controller, which you don't seem to have.
    Setup a controller or use fixed node id's in your network.



  • Hi @Yveaux,

    Thanks for the pointer. I installed the http://domoticz.com/ controller and see it all working now. I saw some mention elsewhere on this site about the gateway automatically taking care of assigning nodes etc and storing them in a local table, I assumed without any input from a controller, but I suppose it makes sense to have the controller software involved during that step also.

    Thanks.


Log in to reply
 

Suggested Topics

24
Online

11.4k
Users

11.1k
Topics

112.7k
Posts