Serial Gateway crash and reloads
-
Why would this message cause the gateway to crash and reloads ? All it does is send a text field to the gateway and requesting an ack:
0;255;3;0;9;TSF:MSG:READ,10-10-0,s=9,c=1,t=47,pt=0,l=8,sg=0:c350fd4b
0;255;3;0;9;TSF:MSG:ACK REQ
0;255;3;0;9;!TSF:MSG:SEND,0-0-10-10,s=9,c=1,t=47,pt=0,l=8,sg=0,ft=0,st=NACK:c350fd4b
0;255;3;0;9;MCO:BGN:INIT GW,CP=RRNGA--,VER=2.1.1
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;11;MySensors Serial Gateway
0;255;3;0;12;2.0.0
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,10-10-0,s=8,c=1,t=16,pt=2,l=2,sg=0:1
10;8;1;0;16;1
0;255;3;0;9;TSF:MSG:READ,10-10-0,s=8,c=1,t=16,pt=2,l=2,sg=0:0
10;8;1;0;16;0
0;255;3;0;9;TSF:MSG:READ,10-10-0,s=9,c=1,t=47,pt=0,l=8,sg=0:c350fd4b
0;255;3;0;9;TSF:MSG:ACK REQ
0;255;3;0;9;!TSF:MSG:SEND,0-0-10-10,s=9,c=1,t=47,pt=0,l=8,sg=0,ft=0,st=NACK:c350fd4b
0;255;3;0;9;MCO:BGN:INIT GW,CP=RRNGA--,VER=2.1.1
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;11;MySensors Serial Gateway
0;255;3;0;12;2.0.0
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,10-10-0,s=255,c=3,t=22,pt=5,l=4,sg=0:60250
10;255;3;0;22;60250Any suggestions on how to fix this is appreciated.
Regards,
Martin
-
@martins how is the node powered? Have you checked the troubleshooting chart at https://forum.mysensors.org/topic/666/debug-faq-and-how-ask-for-help/ ?
-
Powered by a raspberry pi 3 of its 3.3 v. Couple of mockmysensors running of this serial gateway as well asva door sensor without any problem. However as soon as this rfid sensor sends a s_info back containing text and request an ack the gateway reboots. If I remove the sendmsg it runs fine. This text however contains the rfid_ui key and is required to log which card triggered the event.
-
Do you have a capacitor on the 3.3V? Maybe the rpi can't supply enough power when transmitting.
-
I comment out one msg.set from the sensor and that fix the problem. I really don't think this is power related. And this is the gateway guys. It is only powering an arduino mini pro and a rfm69.
-
Even connected directly via usb to the ide I get the same symptom.
-
Post your code and some more details on your hardware used. Btw, have you tried to swap the arduino in the gateway?
-
This works perfect without the gateway reloading:
void granted (int setDelay) { value = 1; send(msg.set(value==HIGH ? 1 : 0)); delay(setDelay); value = 0; send(msg.set(value==HIGH ? 1 : 0)); #ifdef MY_DEBUG Serial.print("UID sent to Controller: "); Serial.println(uid_rfid_str); #endif // Send to gateway the UID to keep log of who entered // send(TEXTMsg.set(uid_rfid), false); }
However as soon as I uncomment this it reloads:
send(TEXTMsg.set(uid_rfid), true);
Some more code:
MyMessage msg(CHILD_ID,V_TRIPPED); MyMessage TEXTMsg(CHILD_ID_TXT,V_TEXT); // Send UID of RFID tag void presentation() { sendSketchInfo("RFID Gate", "1.0"); present(CHILD_ID, S_DOOR); sendSketchInfo("RFID UID", "0.0.1"); present(CHILD_ID_TXT, S_INFO, "RFID UID", true); }
-
Changed the arduino pro mini. Same effect. As soon as this is executed the serial gateway restarts
send(TEXTMsg.set(uid_rfid), true);
Output on serial gateway:
0;255;3;0;9;!TSF:MSG:SEND,0-0-10-10,s=9,c=1,t=47,pt=0,l=8,sg=0,ft=0,st=NACK:c350fd4b
Gateway restart
0;255;3;0;9;MCO:BGN:INIT GW,CP=RRNGA--,VER=2.1.1
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;11;MySensors Serial Gateway
0;255;3;0;12;2.0.0
0;255;3;0;9;MCO:BGN:STP
0;255;3;0;9;MCO:BGN:INIT OK,TSP=1
-
Narrowed it down a bit more. As soon as I change the true (req ack) to false the gateway don't crash anymore. So my question now is why would a ack req cause the gateway to crash ?
send(TEXTMsg.set(uid_rfid), false);```
-
What Arduino ide version are you using? And what avr boards definitions?
PS I corrected the code tags in your previous post as you didn't put them on separate lines and they were not working correctly
-
IDE 1.8.1
-
@martins the 3v3 from rpi can only supply very low currents iirr. This could cause issues as soon as you start using the radio (sending messages).
Could you try powering from a different, beefier power supply to rule out the supply?
-
@Yveaux he said he connected directly the USB to computer but still gets reboots. Maybe downgrading avr boards to 1.6.11 or earlier?
-
@gohan I couldn't tell if he switched power supply. USB is 5v, his pro mini 3v3, so where does the 3v3 come from?
-
-
@martins Ok, clear. I have an almost identical board that only delivers 5V to the target.
-
@martins Did you ever find a solution for this? I am facing similar problems with the serial gateway: https://forum.mysensors.org/topic/6684/serial-gateway-restarting/13