Serial Gateway crash and reloads
-
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:cry:
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 -
@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 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

