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. [Solved] MySensors 2.0 Ethernet gateway (ENC28J60) restart / IP issue

[Solved] MySensors 2.0 Ethernet gateway (ENC28J60) restart / IP issue

Scheduled Pinned Locked Moved Troubleshooting
49 Posts 9 Posters 26.7k Views 8 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.
  • intelliumI Offline
    intelliumI Offline
    intellium
    wrote on last edited by
    #19

    @tekka Next I tried is adding a capacitor to both the gateway and node RF module. I added a 10uF capacitor to both of them. This seems to have stabilized RF communication. I'm not seeing any failures anymore and data is flowing...

    Back to the original issue... The gateway that seems to die...

    I've added some debug statements to the loop() to see if this would keep on running when the gateway seemingly dies.
    After 2 hours of operation, the gateway stopped responding to pings, and the controller also noticed the gateway was not alive anymore. When this happens, the output of the serial console is :

    New loop iteration: 21734
    New loop iteration: 21735
    New loop iteration: 21736
    New loop iteration: 21737
    New loop iteration: 21738
    New loop iteration: 21739
    New loop iteration: 21740
    New loop iteration: 21741
    New loop iteration: 21742
    New loop iteration: 21743
    New loop iteration: 21744
    

    As you can see, my loop code keeps on running at this point, suggesting it's just the ENC interface thats no longer reachable or has an issue. When I close and re-open the serial port monitor from the Arduino IDE, the gateway springs back to life and everything starts working again.

    1 Reply Last reply
    0
    • intelliumI Offline
      intelliumI Offline
      intellium
      wrote on last edited by
      #20

      The next run it only took 20 mins. before the gateway stopped responding....

      T 1 Reply Last reply
      0
      • intelliumI intellium

        The next run it only took 20 mins. before the gateway stopped responding....

        T Offline
        T Offline
        tekka
        Admin
        wrote on last edited by
        #21

        @intellium Issues with ENC: https://forum.arduino.cc/index.php?topic=398258.0

        sounds pretty much the same...

        intelliumI 1 Reply Last reply
        0
        • T tekka

          @intellium Issues with ENC: https://forum.arduino.cc/index.php?topic=398258.0

          sounds pretty much the same...

          intelliumI Offline
          intelliumI Offline
          intellium
          wrote on last edited by
          #22

          @tekka Yeah, I was afraid of that....

          I think I might just build a serial gateway and use that for Domoticz as those seem a lot more stable. Then when I find a good source for a w5100 module, I'll get some of those for building an ethernet gateway.

          1 Reply Last reply
          0
          • intelliumI Offline
            intelliumI Offline
            intellium
            wrote on last edited by
            #23

            Just a little update:

            I build a serial gateway and attached it to Domoticz. Been working ever since, even during the night. Guess this is the way to go for now.

            T 1 Reply Last reply
            2
            • intelliumI intellium

              Just a little update:

              I build a serial gateway and attached it to Domoticz. Been working ever since, even during the night. Guess this is the way to go for now.

              T Offline
              T Offline
              tekka
              Admin
              wrote on last edited by
              #24

              @intellium Sounds good - fyi, I'm using both, W5100 and ESP8266-based GWs, w/o issues.

              intelliumI 2 Replies Last reply
              0
              • T tekka

                @intellium Sounds good - fyi, I'm using both, W5100 and ESP8266-based GWs, w/o issues.

                intelliumI Offline
                intelliumI Offline
                intellium
                wrote on last edited by
                #25

                @tekka I've got a bunch of esp8266 modules laying around. Maybe I'll just search how to wire those up to my nano's and find some code to run it as a dedicated gateway / sensor node. I've noticed the site uses a NodeMCU board for this instead of an Arduino (Nano) ?

                1 Reply Last reply
                0
                • GizMoCuzG Offline
                  GizMoCuzG Offline
                  GizMoCuz
                  wrote on last edited by GizMoCuz
                  #26

                  Having the exact issue as the OP, but then with a W5100 shield and a NRF24.
                  Reverting back to MySensors 1.5.4 solves the problem.
                  Now i was on a beta of 2.0 that i uploaded to the gateway quite some time ago, and this worked without issues
                  Something has changed in the final 2.0 release... and i want to revert that change ;)

                  T 1 Reply Last reply
                  0
                  • GizMoCuzG GizMoCuz

                    Having the exact issue as the OP, but then with a W5100 shield and a NRF24.
                    Reverting back to MySensors 1.5.4 solves the problem.
                    Now i was on a beta of 2.0 that i uploaded to the gateway quite some time ago, and this worked without issues
                    Something has changed in the final 2.0 release... and i want to revert that change ;)

                    T Offline
                    T Offline
                    tekka
                    Admin
                    wrote on last edited by
                    #27

                    @GizMoCuz You mean W5100 freezes and MCU remains responsive? SoftSPI?

                    1 Reply Last reply
                    0
                    • GizMoCuzG Offline
                      GizMoCuzG Offline
                      GizMoCuz
                      wrote on last edited by
                      #28

                      No, the Node is resetting itself with the messages in the first post.
                      If i disable debug, it is logging the IP Address over and over again (each second), connection is reset at that moment

                      T 1 Reply Last reply
                      0
                      • GizMoCuzG GizMoCuz

                        No, the Node is resetting itself with the messages in the first post.
                        If i disable debug, it is logging the IP Address over and over again (each second), connection is reset at that moment

                        T Offline
                        T Offline
                        tekka
                        Admin
                        wrote on last edited by
                        #29

                        @GizMoCuz Please upload your sketch and describe your configuration, I will try to reproduce with my HW.

                        1 Reply Last reply
                        0
                        • GizMoCuzG Offline
                          GizMoCuzG Offline
                          GizMoCuz
                          wrote on last edited by GizMoCuz
                          #30

                          The sketch is 99,999% the same as 'GatewayW5100' except i changed:

                          #define MY_IP_ADDRESS 192,168,0,50 
                          

                          The default Arduino ethernet server examples work perfectly

                          Thanks in advance !

                          T 1 Reply Last reply
                          0
                          • GizMoCuzG GizMoCuz

                            The sketch is 99,999% the same as 'GatewayW5100' except i changed:

                            #define MY_IP_ADDRESS 192,168,0,50 
                            

                            The default Arduino ethernet server examples work perfectly

                            Thanks in advance !

                            T Offline
                            T Offline
                            tekka
                            Admin
                            wrote on last edited by
                            #31

                            @GizMoCuz did you uncomment

                            #define MY_DEBUG
                            

                            as suggested above?

                            GizMoCuzG 1 Reply Last reply
                            0
                            • T tekka

                              @GizMoCuz did you uncomment

                              #define MY_DEBUG
                              

                              as suggested above?

                              GizMoCuzG Offline
                              GizMoCuzG Offline
                              GizMoCuz
                              wrote on last edited by GizMoCuz
                              #32

                              @tekka said:

                              @GizMoCuz did you uncomment

                              #define MY_DEBUG
                              

                              as suggested above?

                              Yep, see three posts up (If i disable debug, it is logging the IP Address over and over again (each second), connection is reset at that moment)

                              And unfortunately does not explain why version 1.5 is running (but missing important features/fixes)

                              T 1 Reply Last reply
                              0
                              • GizMoCuzG GizMoCuz

                                @tekka said:

                                @GizMoCuz did you uncomment

                                #define MY_DEBUG
                                

                                as suggested above?

                                Yep, see three posts up (If i disable debug, it is logging the IP Address over and over again (each second), connection is reset at that moment)

                                And unfortunately does not explain why version 1.5 is running (but missing important features/fixes)

                                T Offline
                                T Offline
                                tekka
                                Admin
                                wrote on last edited by
                                #33

                                @GizMoCuz I cannot reproduce your observation with a UNO and W5100 shield. How about power-supply, SPI settings/pins in yor setup?

                                1 Reply Last reply
                                0
                                • M Offline
                                  M Offline
                                  Maks_K
                                  wrote on last edited by
                                  #34

                                  I have the same problem:
                                  Mega 2560+ w5100
                                  Lib 1.5.4 all good
                                  Lib 2.0 restart again and again

                                  T 1 Reply Last reply
                                  0
                                  • M Maks_K

                                    I have the same problem:
                                    Mega 2560+ w5100
                                    Lib 1.5.4 all good
                                    Lib 2.0 restart again and again

                                    T Offline
                                    T Offline
                                    tekka
                                    Admin
                                    wrote on last edited by tekka
                                    #35

                                    @Maks_K @GizMoCuz see here for a solution: https://forum.mysensors.org/topic/4680/mysensors-2-0-ethernet-gateway-atmega-w5100-restart-all-time/3

                                    1 Reply Last reply
                                    1
                                    • T tekka

                                      @intellium Sounds good - fyi, I'm using both, W5100 and ESP8266-based GWs, w/o issues.

                                      intelliumI Offline
                                      intelliumI Offline
                                      intellium
                                      wrote on last edited by
                                      #36

                                      @tekka After my original report that the serial gateway worked through the night, I have had to reset it every ~24 hours. Somewhere around that timeframe, the serial gateway just doesn't respond anymore. Restarting the controller doesn't help. When I reset the serial gateway, it instantly works again and continues to do so for around 24 hours. So it seems that although the serial gateway works longer, it eventually also suffers the same issue.... Is this some kind of memory leak perhaps ?

                                      S Y 2 Replies Last reply
                                      0
                                      • intelliumI intellium

                                        @tekka After my original report that the serial gateway worked through the night, I have had to reset it every ~24 hours. Somewhere around that timeframe, the serial gateway just doesn't respond anymore. Restarting the controller doesn't help. When I reset the serial gateway, it instantly works again and continues to do so for around 24 hours. So it seems that although the serial gateway works longer, it eventually also suffers the same issue.... Is this some kind of memory leak perhaps ?

                                        S Offline
                                        S Offline
                                        sundberg84
                                        Hardware Contributor
                                        wrote on last edited by
                                        #37

                                        @intellium - as said before, I strongly as well suspect power issues. I would try out different power supplies and try changing out different parts in your setup.

                                        Controller: Proxmox VM - Home Assistant
                                        MySensors GW: Arduino Uno - W5100 Ethernet, Gw Shield Nrf24l01+ 2,4Ghz
                                        MySensors GW: Arduino Uno - Gw Shield RFM69, 433mhz
                                        RFLink GW - Arduino Mega + RFLink Shield, 433mhz

                                        intelliumI 1 Reply Last reply
                                        0
                                        • S sundberg84

                                          @intellium - as said before, I strongly as well suspect power issues. I would try out different power supplies and try changing out different parts in your setup.

                                          intelliumI Offline
                                          intelliumI Offline
                                          intellium
                                          wrote on last edited by
                                          #38

                                          @sundberg84 I've tried different power supplies already with the same problem.

                                          I'll source some more components from different shops and will build another gateway to test. Will report back once done.

                                          1 Reply Last reply
                                          0

                                          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                          With your input, this post could be even better 💗

                                          Register Login
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          12

                                          Online

                                          12.0k

                                          Users

                                          11.2k

                                          Topics

                                          113.4k

                                          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