Radio FAIL after ~3 weeks [SOLVED]
-
@Reza
Sometimes it is better to step back and have a look from the distance.A receipe for a clean restart.
you need:
2 working Arduinos with radio (node 4 and node 3 from your log)
1 working Computer/Laptop with 2 free USB interfaces
preferably Windows with Arduino IDE installed. (Linux might work too.)
connect both arduinos to your USB ports.
if Arduinos are different - write down which Arduino is on which port (eg. com34: or similar)- start Arduino IDE
- from examples/Mysensors load "Gateway serial"
2a. choose one USB/COM-port. - don´t change anything and load it to the Arduino No.1
- from examples/Mysensors load "MockMySensors"
4a. choose the other USB/COM-Port - don`t change anything and load it to Arduino No.2
You are done. Watch Arduinos communicating via serial monitor.
Ok- you are right - it is not truely simultaneaus - but close enough.
If this is ok you should try to upload the relay-sketch and watch what is happening.
This should not take to long, and as a result you will hopefully know:
- my hardware is ok or not
- my software (MySensors) is ok or not
- my sketch is ok or not.
@tboha
i think found problem . i was careless about parent, relay is bad working when use a parent device for connect to gateway.but when connect directly , work better . more better . but now there is 2 questions ! first i am near gateway (1meter) and relay for test is near gateway.but after start or reset , some time relay choose a node (10 m far) for parent, while gateway is near that ! why ?
i know that i can use static parent for nodes but i want know why node choose a node 10m far for parent while gateway is in near (1m)and second question. why with a parent relay work very bad and more command dont send and there is error!? this is related to power of radio of parent ?
thank you -
@Reza this is weird - i have to think about.
Just for clarification:it seems you issued a command at your controller which results in sending
60;2;1;0;2;1
dissected:
60; = to node 60,
2; = sensor 2
1; = set value
0; = unacknowledged message (?)
2; = subtype is V_LIGHT
1; = payload is "1"I think you hit button "Relais 2 ON" .
The weird thing is - you haven`t asked for acknowledge - but system is trying to get acknowledge ---- strange.
I just got your next question, I have to think about this too.
-
@tboha
i think found problem . i was careless about parent, relay is bad working when use a parent device for connect to gateway.but when connect directly , work better . more better . but now there is 2 questions ! first i am near gateway (1meter) and relay for test is near gateway.but after start or reset , some time relay choose a node (10 m far) for parent, while gateway is near that ! why ?
i know that i can use static parent for nodes but i want know why node choose a node 10m far for parent while gateway is in near (1m)and second question. why with a parent relay work very bad and more command dont send and there is error!? this is related to power of radio of parent ?
thank you@Reza I think we are getting close to solution.
but after start or reset , some time relay choose a node (10 m far) for parent, while gateway is near that ! why ?
This seems to be the crucial question.
I never dived into the core functions how MySensors decides about choosing parent.
Maybe it depends upon speed of answer?a little excerpt from an earlier log (which i didn´t read close enough, I told you).
16 TSM:FPAR 52 TSF:MSG:SEND,4-4-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK: 2059 !TSM:FPAR:NO REPLY 2061 TSM:FPAR 2097 TSF:MSG:SEND,4-4-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK: 2165 TSF:MSG:READ,2-2-4,s=255,c=3,t=8,pt=1,l=1,sg=0:1 2170 TSF:MSG:FPAR OK,ID=2,D=2 2340 TSF:MSG:READ,3-3-4,s=255,c=3,t=8,pt=1,l=1,sg=0:3 4105 TSM:FPAR:OK 4106 TSM:IDat 2097 Node 4 broadcasts for parent and gets accepted for parenting from Node 2.
at 2340 Node 3 offers parenting too - upon which request?and why doesn`t GW offer parenting ?? GW shows up at 8240 with response to PING, so it is alive and connection was ok.
at least at the moment - unexpected behavior.
So reading logs give us some hints.
Could you provide a little more from the simultaneous logs? And don´t stick to the NACK logs - the other messages are interesting as well. -
@Reza I think we are getting close to solution.
but after start or reset , some time relay choose a node (10 m far) for parent, while gateway is near that ! why ?
This seems to be the crucial question.
I never dived into the core functions how MySensors decides about choosing parent.
Maybe it depends upon speed of answer?a little excerpt from an earlier log (which i didn´t read close enough, I told you).
16 TSM:FPAR 52 TSF:MSG:SEND,4-4-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK: 2059 !TSM:FPAR:NO REPLY 2061 TSM:FPAR 2097 TSF:MSG:SEND,4-4-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK: 2165 TSF:MSG:READ,2-2-4,s=255,c=3,t=8,pt=1,l=1,sg=0:1 2170 TSF:MSG:FPAR OK,ID=2,D=2 2340 TSF:MSG:READ,3-3-4,s=255,c=3,t=8,pt=1,l=1,sg=0:3 4105 TSM:FPAR:OK 4106 TSM:IDat 2097 Node 4 broadcasts for parent and gets accepted for parenting from Node 2.
at 2340 Node 3 offers parenting too - upon which request?and why doesn`t GW offer parenting ?? GW shows up at 8240 with response to PING, so it is alive and connection was ok.
at least at the moment - unexpected behavior.
So reading logs give us some hints.
Could you provide a little more from the simultaneous logs? And don´t stick to the NACK logs - the other messages are interesting as well.@tboha
Thanks for your time and effort, you're doing an excellent analysis. Please find below some answers to your questions:at 2097 Node 4 broadcasts for parent and gets accepted for parenting from Node 2.
at 2340 Node 3 offers parenting too - upon which request?and why doesn`t GW offer parenting ?? GW shows up at 8240 with response to PING, so it is alive and connection was ok.
The find parent step is initiated by a local I_FIND_PARENT_REQUEST broadcast, i.e. all repeaters/GW will reply with I_FIND_PARENT_RESPONSE if their uplink connections are operational (this prevents circular referencing). Node 3 (@2340) is replying to the same request, but ignored due to a greater distance to the GW (D=3+1=4 vs D=1+1=2 from node 4). The GW does not offer parenting, because it's either too close (radio interference) or too far from the requesting node. After a timeout (default 2000ms) the node uses the closest repeater/GW that replied to the request unless a static/preferred parent is defined.
-
@Reza I think we are getting close to solution.
but after start or reset , some time relay choose a node (10 m far) for parent, while gateway is near that ! why ?
This seems to be the crucial question.
I never dived into the core functions how MySensors decides about choosing parent.
Maybe it depends upon speed of answer?a little excerpt from an earlier log (which i didn´t read close enough, I told you).
16 TSM:FPAR 52 TSF:MSG:SEND,4-4-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK: 2059 !TSM:FPAR:NO REPLY 2061 TSM:FPAR 2097 TSF:MSG:SEND,4-4-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK: 2165 TSF:MSG:READ,2-2-4,s=255,c=3,t=8,pt=1,l=1,sg=0:1 2170 TSF:MSG:FPAR OK,ID=2,D=2 2340 TSF:MSG:READ,3-3-4,s=255,c=3,t=8,pt=1,l=1,sg=0:3 4105 TSM:FPAR:OK 4106 TSM:IDat 2097 Node 4 broadcasts for parent and gets accepted for parenting from Node 2.
at 2340 Node 3 offers parenting too - upon which request?and why doesn`t GW offer parenting ?? GW shows up at 8240 with response to PING, so it is alive and connection was ok.
at least at the moment - unexpected behavior.
So reading logs give us some hints.
Could you provide a little more from the simultaneous logs? And don´t stick to the NACK logs - the other messages are interesting as well.@tboha
my friend . i am so sorry , i am weak in english and i can not know what am i do and you told to me what am i do!!
very very thank you for time and tried for me and my problem. i can not get your time more i am sorry . i am very thank you for tried for me but i think , i am failure.
this is very complicate for me because i am beginner.
problems is many. this serial monitor is some problem. every time in serial monitor there is new problem and new error.
i am Ashamed for your time and thank you . i can not understand your guidance. -
@tboha
Thanks for your time and effort, you're doing an excellent analysis. Please find below some answers to your questions:at 2097 Node 4 broadcasts for parent and gets accepted for parenting from Node 2.
at 2340 Node 3 offers parenting too - upon which request?and why doesn`t GW offer parenting ?? GW shows up at 8240 with response to PING, so it is alive and connection was ok.
The find parent step is initiated by a local I_FIND_PARENT_REQUEST broadcast, i.e. all repeaters/GW will reply with I_FIND_PARENT_RESPONSE if their uplink connections are operational (this prevents circular referencing). Node 3 (@2340) is replying to the same request, but ignored due to a greater distance to the GW (D=3+1=4 vs D=1+1=2 from node 4). The GW does not offer parenting, because it's either too close (radio interference) or too far from the requesting node. After a timeout (default 2000ms) the node uses the closest repeater/GW that replied to the request unless a static/preferred parent is defined.
@tekka This is very interesting. I think i will review my own system - just for curiosity. Thank you for this explanation.
@Reza: don´t get desperate. I think you are not a beginner - but if you are - your learning curve is fairly steep.
As mentioned before, sometimes it is better to step backwards and look from the distance.If you aren´t too annoyed, I would offer to guide you to a working two-arduino system. (and I am sure @tekka will give advice if necessary) From there you will probably manage it on your own.
Started correctly MySensors will supply you with a lot of fun -- but today it is not funny for you.
So put away this stuff for today, go fishing and have a cold one.
Tomorrow (or Wednesday, because I don´t know my schedule for tomorrow now) we will build up things in an ordered way. (and please don´t scavenge your current gateway, I think it is the source of all evil and I am too curious about the reason).
footnote: if you are worried about your English (I am not) - give google translate a try - if available for your language
-
@tekka This is very interesting. I think i will review my own system - just for curiosity. Thank you for this explanation.
@Reza: don´t get desperate. I think you are not a beginner - but if you are - your learning curve is fairly steep.
As mentioned before, sometimes it is better to step backwards and look from the distance.If you aren´t too annoyed, I would offer to guide you to a working two-arduino system. (and I am sure @tekka will give advice if necessary) From there you will probably manage it on your own.
Started correctly MySensors will supply you with a lot of fun -- but today it is not funny for you.
So put away this stuff for today, go fishing and have a cold one.
Tomorrow (or Wednesday, because I don´t know my schedule for tomorrow now) we will build up things in an ordered way. (and please don´t scavenge your current gateway, I think it is the source of all evil and I am too curious about the reason).
footnote: if you are worried about your English (I am not) - give google translate a try - if available for your language
-
So let us start from scratch.
Before i want to know
- what type of computer are you using (laptop?)
- Operating system? (Windows?, which version)
- are you familiar with any kind of terminal? (Putty, Kermit?)
- does your OrangePi have wifi?
-
@tboha
i use a loptop with win 7 . i use putty for connect to orangepi. no orange pi is connect with LANHopefully your Nodes 2, 3 and 4 are ok (they communicated correctly according to your log).
So take two of them.
Make one a new serial GW and the other a "MockMySensors" Node.Despite my old Message - please change RF-Channels to another Channel (i don´t know is 72 legal?) for both Arduinos,
Please connect both to your Windows 7 machine with some longer USB cables so you can space them a little apart.
I built meanwhile the same complex - one serial GW and one Mock-Node
-
Hopefully your Nodes 2, 3 and 4 are ok (they communicated correctly according to your log).
So take two of them.
Make one a new serial GW and the other a "MockMySensors" Node.Despite my old Message - please change RF-Channels to another Channel (i don´t know is 72 legal?) for both Arduinos,
Please connect both to your Windows 7 machine with some longer USB cables so you can space them a little apart.
I built meanwhile the same complex - one serial GW and one Mock-Node
-
@tboha
i dont know what is mock my sensors ! so you told me build a new gateway with channel for example 1 ? ( my gateway is channel 0 now) and build a node(relay with channel 1)? gateway connect to my loptop with usb cable ?@Reza "MockMySensors" is a Sketch from Mysensors Examples - it doesn´t need any hardware and simulates input for your GW and controller (e.g. giving random numbers as temperature or as humidity - you can chose within the sketch). So you get some Network traffic to check your components without any effort.
Yes change Channel to a private one - far away from channel 0. Maybe 72 is ok - I will look for it.
-
@tboha
i dont know what is mock my sensors ! so you told me build a new gateway with channel for example 1 ? ( my gateway is channel 0 now) and build a node(relay with channel 1)? gateway connect to my loptop with usb cable ? -
@Reza "MockMySensors" is a Sketch from Mysensors Examples - it doesn´t need any hardware and simulates input for your GW and controller (e.g. giving random numbers as temperature or as humidity - you can chose within the sketch). So you get some Network traffic to check your components without any effort.
Yes change Channel to a private one - far away from channel 0. Maybe 72 is ok - I will look for it.
-
@tboha
my dear friend i suggest continue about this my problem in personal chat or a new topic from me! because other friend may be sad about this long chat.thank you -
@Reza:
I tried to reproduce the errors shown by your log.
Part of the errors could be reproduced.
So if you are leaving range of stable connections, node will try to get an new parent (within range). So broadcasting for new parent is "normal". As long as there is no valid connection node will reject sending messages because "Transport Not Ready". So this is "normal", too.Leaving range resulted in one or two NACK, then connection died quietly. I never got this amount of NACK you got.
I could not reproduce !TSF:MSG:LEN:0!=8 or something similar. This means the message has been crippled (possibly).
Reviewing logs and testing on my configuration revealed no clue to defective Chips (in regard to NRF24L01). Chips could be fake though, but at least software functions seem to be ok.
Fake NRF modules are reported to have very varying (worse) connection distances, sometimes down to a few (possibly only one) meter(s). Maybe -- may be not.
There are two major differences between our setups. I am currently not working with ACKs, I will test this tomorrow.
Second - I got no actual relays connected (only LEDs). You reported transmission break down simultaneously to pressing switches at higher rate. Are you supplying DC for relays from Arduino or from separate DC-supply? Have you made any arrangement preventing inductive spikes (ferrite rings, self-induction recuperation diode etc) ?
If you simply unhook your relays and try again - you get better results? (since your non-inductive sensors work well).If this will turnout true - you may give Solid-State-Relais a try.




