Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Troubleshooting
  3. Serial Gateway crash and reloads

Serial Gateway crash and reloads

Scheduled Pinned Locked Moved Troubleshooting
18 Posts 5 Posters 3.5k Views 4 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • martinsM Offline
    martinsM Offline
    martins
    wrote on last edited by
    #1

    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;60250

    Any suggestions on how to fix this is appreciated.

    Regards,
    Martin

    mfalkviddM 1 Reply Last reply
    0
    • martinsM martins

      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;60250

      Any suggestions on how to fix this is appreciated.

      Regards,
      Martin

      mfalkviddM Online
      mfalkviddM Online
      mfalkvidd
      Mod
      wrote on last edited by
      #2

      @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/ ?

      1 Reply Last reply
      1
      • martinsM Offline
        martinsM Offline
        martins
        wrote on last edited by
        #3

        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.

        1 Reply Last reply
        0
        • gohanG Offline
          gohanG Offline
          gohan
          Mod
          wrote on last edited by
          #4

          Do you have a capacitor on the 3.3V? Maybe the rpi can't supply enough power when transmitting.

          1 Reply Last reply
          0
          • martinsM Offline
            martinsM Offline
            martins
            wrote on last edited by
            #5

            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.

            1 Reply Last reply
            0
            • martinsM Offline
              martinsM Offline
              martins
              wrote on last edited by
              #6

              Even connected directly via usb to the ide I get the same symptom.

              1 Reply Last reply
              0
              • gohanG Offline
                gohanG Offline
                gohan
                Mod
                wrote on last edited by gohan
                #7

                Post your code and some more details on your hardware used. Btw, have you tried to swap the arduino in the gateway?

                1 Reply Last reply
                0
                • martinsM Offline
                  martinsM Offline
                  martins
                  wrote on last edited by gohan
                  #8

                  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);
                  }
                  
                  1 Reply Last reply
                  0
                  • martinsM Offline
                    martinsM Offline
                    martins
                    wrote on last edited by
                    #9

                    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

                    1 Reply Last reply
                    0
                    • martinsM Offline
                      martinsM Offline
                      martins
                      wrote on last edited by
                      #10

                      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);```
                      1 Reply Last reply
                      0
                      • gohanG Offline
                        gohanG Offline
                        gohan
                        Mod
                        wrote on last edited by gohan
                        #11

                        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

                        1 Reply Last reply
                        0
                        • martinsM Offline
                          martinsM Offline
                          martins
                          wrote on last edited by
                          #12

                          IDE 1.8.1

                          0_1489826183494_upload-88d0d7f0-c39a-47e1-aa30-6f49a3310a96

                          YveauxY 1 Reply Last reply
                          0
                          • martinsM martins

                            IDE 1.8.1

                            0_1489826183494_upload-88d0d7f0-c39a-47e1-aa30-6f49a3310a96

                            YveauxY Offline
                            YveauxY Offline
                            Yveaux
                            Mod
                            wrote on last edited by
                            #13

                            @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?

                            http://yveaux.blogspot.nl

                            gohanG 1 Reply Last reply
                            0
                            • YveauxY Yveaux

                              @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?

                              gohanG Offline
                              gohanG Offline
                              gohan
                              Mod
                              wrote on last edited by
                              #14

                              @Yveaux he said he connected directly the USB to computer but still gets reboots. Maybe downgrading avr boards to 1.6.11 or earlier?

                              YveauxY 1 Reply Last reply
                              0
                              • gohanG gohan

                                @Yveaux he said he connected directly the USB to computer but still gets reboots. Maybe downgrading avr boards to 1.6.11 or earlier?

                                YveauxY Offline
                                YveauxY Offline
                                Yveaux
                                Mod
                                wrote on last edited by
                                #15

                                @gohan I couldn't tell if he switched power supply. USB is 5v, his pro mini 3v3, so where does the 3v3 come from?

                                http://yveaux.blogspot.nl

                                martinsM 1 Reply Last reply
                                1
                                • YveauxY Yveaux

                                  @gohan I couldn't tell if he switched power supply. USB is 5v, his pro mini 3v3, so where does the 3v3 come from?

                                  martinsM Offline
                                  martinsM Offline
                                  martins
                                  wrote on last edited by martins
                                  #16

                                  @Yveaux

                                  alt text

                                  YveauxY J 2 Replies Last reply
                                  0
                                  • martinsM martins

                                    @Yveaux

                                    alt text

                                    YveauxY Offline
                                    YveauxY Offline
                                    Yveaux
                                    Mod
                                    wrote on last edited by
                                    #17

                                    @martins Ok, clear. I have an almost identical board that only delivers 5V to the target.

                                    http://yveaux.blogspot.nl

                                    1 Reply Last reply
                                    0
                                    • martinsM martins

                                      @Yveaux

                                      alt text

                                      J Offline
                                      J Offline
                                      Jan Gatzke
                                      wrote on last edited by
                                      #18

                                      @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

                                      1 Reply Last reply
                                      0
                                      Reply
                                      • Reply as topic
                                      Log in to reply
                                      • Oldest to Newest
                                      • Newest to Oldest
                                      • Most Votes


                                      16

                                      Online

                                      11.7k

                                      Users

                                      11.2k

                                      Topics

                                      113.1k

                                      Posts


                                      Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                                      • Login

                                      • Don't have an account? Register

                                      • Login or register to search.
                                      • First post
                                        Last post
                                      0
                                      • MySensors
                                      • OpenHardware.io
                                      • Categories
                                      • Recent
                                      • Tags
                                      • Popular