I am not sure if I am seeing a normal behavior. I don't know if it is expected that the sensor is taking such long time to become visible to the GW. I have recreated the examples from https://www.mysensors.org/build/rs485
The only difference is that I've added SketchInfo for the GW and used Serial1 on MEGA board instead of AltSoftSerial.
The debug on the motion sensor is as follows:
MCO:BGN:INIT NODE,CP=RSNNA--,VER=2.0.1-beta
TSM:INIT
TSM:INIT:TSP OK
TSF:ASID:OK,ID=1
TSM:FPAR
TSF:MSG:SEND,1-1-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
!TSM:FPAR:NO REPLY
TSM:FPAR
TSF:MSG:SEND,1-1-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
!TSM:FPAR:NO REPLY
TSM:FPAR
TSF:MSG:SEND,1-1-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
!TSM:FPAR:NO REPLY
TSM:FPAR
TSF:MSG:SEND,1-1-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
!TSM:FPAR:FAIL
TSM:FAILURE
TSM:FAILURE:PDT
TSM:FAILURE:RE-INIT
TSM:INIT
TSM:INIT:TSP OK
TSF:ASID:OK,ID=1
TSM:FPAR
TSF:MSG:SEND,1-1-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
TSF:MSG:READ,0-0-1,s=255,c=3,t=8,pt=1,l=1,sg=0:0
TSF:MSG:FPAR RES,ID=0,D=0
TSF:MSG:FPAR OK,ID=0,D=1
TSM:FPAR:OK
TSM:ID
TSM:ID:OK,ID=1
TSM:UPL
TSF:PING:SEND,TO=0
TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=OK:1
TSF:CHKUPL:FAIL
!TSM:UPL:FAIL
TSM:FPAR
TSF:MSG:SEND,1-1-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
TSF:MSG:READ,0-0-1,s=255,c=3,t=8,pt=1,l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1,c=1,t=16,pt=0,l=1,sg=0,ft=0,st=OK:0
0
TSF:MSG:SEND,1-1-0-0,s=1,c=1,t=16,pt=0,l=1,sg=0,ft=0,st=OK:0
0
TSF:MSG:SEND,1-1-0-0,s=1,c=1,t=16,pt=0,l=1,sg=0,ft=0,st=OK:0
0
TSF:MSG:SEND,1-1-0-0,s=1,c=1,t=16,pt=0,l=1,sg=0,ft=0,st=OK:0
0
TSF:MSG:SEND,1-1-0-0,s=1,c=1,t=16,pt=0,l=1,sg=0,ft=0,st=OK:0
0
TSF:MSG:SEND,1-1-0-0,s=1,c=1,t=16,pt=0,l=1,sg=0,ft=0,st=OK:0
0
TSF:MSG:SEND,1-1-0-0,s=1,c=1,t=16,pt=0,l=1,sg=0,ft=0,st=OK:0
0
TSF:MSG:SEND,1-1-0-0,s=1,c=1,t=16,pt=0,l=1,sg=0,ft=0,st=OK:0
I don't know how to obtain debug from the Gateway Serial but as far as the GW messages on the console it looked as follows:
0;255;3;0;14;Gateway startup complete.
0;255;0;0;18;2.0.1-beta
0;255;3;0;11;SerialGateway
0;255;3;0;12;0.1
1;255;3;0;6;0
1;255;3;0;11;Motion Sensor
1;255;3;0;12;1.0
1;1;0;0;1;
1;1;1;0;16;0
1;1;1;0;16;0
1;1;1;0;16;0
1;1;1;0;16;0
1;1;1;0;16;0
As you see it takes a fair amount of time (around 30-40 secs) to obtain the readings from the sensor. This happens each time I reset the sensor node but it works instantly if I reset the GW (i.e. the readings appear instantly after the reset). Is it expected behavior?