@hek said:
attribute (weak)
I search the MySensor project,the loop()/lsetup() is weak functions (attribute (weak)) ,but the main is not clear.
@hek said:
attribute (weak)
I search the MySensor project,the loop()/lsetup() is weak functions (attribute (weak)) ,but the main is not clear.
Yeah,But why you can override the main()-method? in a project,The main() should not be the only one? I didn't understand the principle of internal ^_^ Looking forward to your reply!
What is the relationship about hardware\arduino\cores\arduino\main.cpp and the MyMainDefaut.cpp?
I put a LightSensor and a SerialGateway in my sensor network,when i send Discover request (255;255;3;0;20;0
) the SerialGateway don't send the response.but when i put a DimmableLight and the Same SerialGateway in my sensor network,i send the Discover request ,the response is 99;255;3;0;21;0
.So,Why the Light Sensor can't be discoverd?
Sometimes the node don't send the node prasentation like “1;255;0;0;17;2.0.0”.
[2016-08-07 22:59:32][receive] >> 0;255;3;0;9;TSP:MSG:READ 1-1-255 s=255,c=3,t=7,pt=0,l=0,sg=0:
[2016-08-07 22:59:32][receive] >> 0;255;3;0;9;TSP:MSG:BC
[2016-08-07 22:59:32][receive] >> 0;255;3;0;9;TSP:MSG:FPAR REQ (sender=1)
[2016-08-07 22:59:32][receive] >> 0;255;3;0;9;TSP:CHKUPL:OK
[2016-08-07 22:59:32][receive] >> 0;255;3;0;9;TSP:MSG:GWL OK
[2016-08-07 22:59:32][receive] >> 0;255;3;0;9;TSP:MSG:SEND 0-0-1-1 s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=ok:0
[2016-08-07 22:59:34][receive] >> 0;255;3;0;9;TSP:MSG:READ 1-1-0 s=255,c=3,t=24,pt=1,l=1,sg=0:1
[2016-08-07 22:59:34][receive] >> 0;255;3;0;9;TSP:MSG:PINGED (ID=1, hops=1)
[2016-08-07 22:59:34][receive] >> 0;255;3;0;9;TSP:MSG:SEND 0-0-1-1 s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=ok:1
[2016-08-07 22:59:34][receive] >> 0;255;3;0;9;TSP:MSG:READ 1-1-0 s=255,c=3,t=15,pt=6,l=2,sg=0:0100
[2016-08-07 22:59:34][receive] >> 0;255;3;0;9;!TSP:MSG:SEND 0-0-1-1 s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=fail:0100
[2016-08-07 22:59:34][receive] >> 0;255;3;0;9;TSP:MSG:READ 1-1-0 s=255,c=0,t=17,pt=0,l=5,sg=0:2.0.0
[2016-08-07 22:59:34][receive] >> 1;255;0;0;17;2.0.0 // sometimes lost!!!!!!!!!!!!!!!
[2016-08-07 22:59:34][receive] >> 0;255;3;0;9;TSP:MSG:READ 1-1-0 s=255,c=3,t=6,pt=1,l=1,sg=0:0
[2016-08-07 22:59:35][receive] >> 1;255;3;0;6;0
[2016-08-07 22:59:36][receive] >> 0;255;3;0;9;TSP:MSG:READ 1-1-0 s=255,c=3,t=11,pt=0,l=10,sg=0:RGB Sensor
[2016-08-07 22:59:36][receive] >> 1;255;3;0;11;RGB Sensor
[2016-08-07 22:59:36][receive] >> 0;255;3;0;9;TSP:MSG:READ 1-1-0 s=255,c=3,t=12,pt=0,l=3,sg=0:1.0
[2016-08-07 22:59:36][receive] >> 1;255;3;0;12;1.0
[2016-08-07 22:59:36][receive] >> 0;255;3;0;9;TSP:MSG:READ 1-1-0 s=0,c=0,t=3,pt=0,l=0,sg=0:
[2016-08-07 22:59:36][receive] >> 1;0;0;0;3;
[2016-08-07 22:59:37][receive] >> 0;255;3;0;9;TSP:MSG:READ 1-1-0 s=1,c=0,t=3,pt=0,l=0,sg=0:
[2016-08-07 22:59:37][receive] >> 1;1;0;0;3;
[2016-08-07 22:59:37][receive] >> 0;255;3;0;9;TSP:MSG:READ 1-1-0 s=2,c=0,t=3,pt=0,l=0,sg=0:
[2016-08-07 22:59:37][receive] >> 1;2;0;0;3;
[2016-08-07 22:59:37][receive] >> 0;255;3;0;9;TSP:MSG:READ 1-1-0 s=3,c=0,t=3,pt=0,l=0,sg=0:
[2016-08-07 22:59:37][receive] >> 1;3;0;0;3;
[2016-08-07 22:59:37][receive] >> 0;255;3;0;9;TSP:MSG:READ 1-1-0 s=255,c=3,t=26,pt=1,l=1,sg=0:2
[2016-08-07 22:59:37][receive] >> 0;255;3;0;9;TSP:MSG:SEND 0-0-1-1 s=255,c=3,t=27,pt=1,l=1,sg=0,ft=0,st=ok:1
[2016-08-07 22:59:41][receive] >> 0;255;3;0;9;TSP:SANCHK:OK
Thanks for replay!
I read the doc,just can‘t find how to modified the gateway id.If in the network,there are two gateway,What will it be?
The default serial Gateway ID is 0, so,how to change the gateway ID?
@tekka thank you for your reminding!
@AWI thanks for your replay!
in your way,the node can always sleep
if it don't send mesage? When i want to wake it up,i can send request(<sensor>)
from the controller? How do I deal with the request
message in the sensor node?
Look forward to your reply!