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. esp8266 gateway keeps resetting on keepalive

esp8266 gateway keeps resetting on keepalive

Scheduled Pinned Locked Moved Troubleshooting
resetesp8266
14 Posts 5 Posters 7.4k Views 2 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.
  • V Offline
    V Offline
    vlad
    wrote on last edited by
    #1

    Hey guys, I've set up esp8266 gateway and one of the opensource controllers. esp8266 keeps restarting with the errors below. If I disable the controller then esp seems to work fine.
    The software has keepalive set and I believe that might be triggering this error. Has anyone seen anything like that?

    Thanks.

    ESP8266 MySensors Gateway
    Connecting to vhome
    .......Connected!
    IP: 192.168.0.51
    0;0;3;0;9;gateway started, id=0, parent=0, distance=0
    Client 0 connected
    0;0;3;0;14;Gateway startup complete.
    Client 0: 0;255;3;0;2;
    
    Exception (28):
    epc1=0x4000bf80 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000
    
    ctx: cont 
    sp: 3ffeaca0 end: 3ffeaf20 offset: 01a0
    
    >>>stack>>>
    3ffeae40:  00000000 3fffdc20 3ffe97c7 40203ac0  
    3ffeae50:  3ffeaf80 00000001 3ffe8fc9 4020b73c  
    3ffeae60:  3ffeaf80 0000000b 3ffe98bf 00000000  
    3ffeae70:  00000003 00000000 3ffe98a8 4020ae11  
    3ffeae80:  00000001 3ffe98b4 3ffeaf80 4020ae11  
    3ffeae90:  3ffe98b4 3ffe98b4 3ffeaf80 3ffeaf80  
    3ffeaea0:  3ffe98b4 3ffe97c0 3ffe97c7 402024b4  
    3ffeaeb0:  3ffe9ab8 3ffe98b4 00000000 40202784  
    3ffeaec0:  3ffe8e48 00000000 000003e8 3ffe9c4c  
    3ffeaed0:  00000000 3fff4c88 3fff4c18 3ffeaf4c  
    3ffeaee0:  00000000 0000000a 00000000 00000000  
    3ffeaef0:  40201c35 3300a8c0 00000000 3ffeaf4c  
    3ffeaf00:  3fffdc20 00000000 3ffeaf44 40201c92  
    3ffeaf10:  00000000 00000000 3ffe9f00 40100378  
    <<<stack<<<
    
     ets Jan  8 2013,rst cause:1, boot mode:(3,7)
    
    load 0x4010f000, len 1264, room 16 
    tail 0
    chksum 0x42
    csum 0x42
    ~ld
    
    
    ESP8266 MySensors Gateway
    Connecting to vhome
    .....Connected!
    IP: 192.168.0.51
    0;0;3;0;9;gateway started, id=0, parent=0, distance=0
    
    1 Reply Last reply
    0
    • L Offline
      L Offline
      Luppie
      wrote on last edited by
      #2

      It looks like the problem that I also have with my gateway described in my topic

      1 Reply Last reply
      0
      • T Offline
        T Offline
        twisted
        wrote on last edited by
        #3

        Snap here too.

        1 Reply Last reply
        0
        • V Offline
          V Offline
          vlad
          wrote on last edited by
          #4

          It does look like the same issue. Mine does not restart on a sensor connection (I have one node with 4 reed switches) but totally restarts on keepalive call.

          1 Reply Last reply
          0
          • V Offline
            V Offline
            vlad
            wrote on last edited by vlad
            #5

            On further inspection it looks like a different issue since I don't get reboots unless connected to Mycontroller. If I shut down the software reboots stop. Sensors send things to the gateway just fine.

            If I set keepalive to very long then things are good and there are no reboots all the time(assuming it will reboot once that timer lapses). If I start mycontroller while esp is running then esp will reboot for sure.

            This has something to do with tcp sockets and keepalive.

            1 Reply Last reply
            0
            • hekH Offline
              hekH Offline
              hek
              Admin
              wrote on last edited by
              #6

              Are you guys getting the same resets when using dev-branch?

              1 Reply Last reply
              0
              • V Offline
                V Offline
                vlad
                wrote on last edited by
                #7

                Can't get dev branch to build -

                GatewayESP8266.ino:131:27: fatal error: ESP8266WiFi.h: No such file or directory
                1 Reply Last reply
                0
                • hekH Offline
                  hekH Offline
                  hek
                  Admin
                  wrote on last edited by
                  #8

                  Did you change board type to NodeMCU?

                  1 Reply Last reply
                  0
                  • V Offline
                    V Offline
                    vlad
                    wrote on last edited by
                    #9

                    Very sorry, I got past that point but forgot about it. I ended up having to remove all of the libraries and then extract dev branch, otherwise merging the two didn't work.

                    I think this issue is now gone, I can keep controller running and the gateway doesn't reboot. I do have a new issue though, sensors now crash the controller (was not the case in 1.5)

                    I just used a simple trigger example from dev branch and that crashes the gateway in some scenarios. It crashed it when I turned off the sensor node, it crashed when I opened serial monitor for sensor node, it crashes mid way, etc

                    Seems like any client communication has a high chance to crash it.

                    âm+ÿ¡šóÿ0;0;3;0;9;Starting gateway (1.6.0-beta)
                                                   
                    0;0;3;0;9;Radio init successful.
                                                                   
                    scandone
                                                                                          
                    f 0, scandone
                                                                                     
                    .add 0
                                                                                            
                    aid 1
                                                                                             
                    pm open phy_2,type:2 0 0
                                                                          
                    cnt 
                                                                                              
                          
                                                                                            
                    connected with vhome, channel 6
                                                                   
                    dhcp client start...
                                                                              
                    .........ip:192.168.0.51,mask:255.255.255.0,gw:192.168.0.1
                                        
                    .IP: 192.168.0.51
                                                                                 
                    0;0;3;0;9;Init complete, id=0, parent=0, distance=0
                                                
                    0;0;3;0;9;Client 0 connected
                                                                       
                    0;0;3;0;9;read: 20-20-0 s=255,c=0,t=17,pt=0,l=10,sg=0:1.6.0-beta
                                   
                    0;0;3;0;9;read: 20-20-0 s=255,c=3,t=6,pt=1,l=1,sg=0:0
                                              
                    0;0;3;0;9;Client 0: 20;255;3;0;6;M
                                                                 
                    0;0;3;0;9;send: 0-0-20-20 s=255,c=3,t=6,pt=0,l=1,sg=0,st=ok:M
                                      
                    0;0;3;0;9;read: 20-20-0 s=3,c=0,t=0,pt=0,l=0,sg=0:
                                                 
                    0;0;3;0;9;read: 20-20-0 s=3,c=1,t=16,pt=2,l=2,sg=0:1
                                               
                    0;0;3;0;9;read: 20-20-0 s=3,c=1,t=16,pt=2,l=2,sg=0:0
                                               
                    0;0;3;0;9;read: 20-20-0 s=3,c=1,t=16,pt=2,l=2,sg=0:1
                                               
                    0;0;3;0;9;read: 20-20-0 s=3,c=1,t=16,pt=2,l=2,sg=0:0
                                               
                    0;0;3;0;9;read: 20-20-0 s=3,c=1,t=16,pt=2,l=2,sg=0:1
                                               
                    0;0;3;0;9;Client 0: 0;255;3;0;2;
                                                                   
                    Fatal exception (28):
                                                                             
                    epc1=0x4000bf80, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000000, depc=0x0
                    0000000
                                                                                           
                             
                                                                                         
                    Exception (28):
                                                                                   
                    epc1=0x4000bf80 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000
                    000
                                                                                               
                         
                                                                                             
                    ctx: cont 
                                                                                        
                    sp: 3ffea5f0 end: 3ffea8a0 offset: 01a0
                                                           
                                                             
                                                         
                    >>>stack>>>
                                                                                       
                    3ffea790:  3fff1c88 40219430 3ffea980 402039e4  
                                                  
                    3ffea7a0:  40213751 3fff4b78 00000001 3ffea7d0  
                                                  
                    3ffea7b0:  3ffea7c0 00000004 3ffeabfc 00000000  
                                                  
                    3ffea7c0:  00000003 00000000 00000001 00000000  
                                                  
                    3ffea7d0:  3ffeaa68 3ffeaa74 0000000a 3ffeaac8  
                                                  
                    3ffea7e0:  00000001 3ffeab98 00000000 40203f34  
                                                  
                    3ffea7f0:  00000000 3ffeaa68 3ffeab98 40203624  
                                                  
                    3ffea800:  3fffdc20 00000000 3ffeaa58 3ffeabfb  
                                                  
                    3ffea810:  00000000 00000003 00000000 402042f3  
                                                  
                    3ffea820:  3ffea8cc 3ffea924 00000014 4020217e  
                                                  
                    3ffea830:  00000000 3fff4bc8 3ffea950 00000000  
                                                  
                    3ffea840:  00000010 00000000 00000014 00000002  
                                                  
                    3ffea850:  00000003 00000012 00000000 3ffeaa60  
                                                  
                    3ffea860:  3fffdc20 00000000 3ffeaa58 40204a1c  
                                                  
                    3ffea870:  40203c55 00000000 3ffeaa58 4020435f  
                                                  
                    3ffea880:  00000000 00000000 3ffeaa58 4020496a  
                                                  
                    3ffea890:  00000000 00000000 3ffe9880 40100118  
                                                  
                    <<<stack<<<
                                                                                        
                    òm+ÿ(æz=0;0;3;0;9;Starting gateway (1.6.0-beta)
                                                    
                    0;0;3;0;9;Radio init successful.
                                                                   
                    scandone
                                                                                          
                    f 0, scandone
                                                                                     
                    .add 0
                                                                                            
                    aid 1
                                                                                             
                    pm open phy_2,type:2 0 0
                                                                          
                    cnt 
                                                                                              
                          
                                                                                            
                    connected with vhome, channel 6
                                                                   
                    dhcp client start...
                                                                              
                    .........ip:192.168.0.51,mask:255.255.255.0,gw:192.168.0.1
                                        
                    .IP: 192.168.0.51
                                                                                 
                    0;0;3;0;9;Init complete, id=0, parent=0, distance=0
                    1 Reply Last reply
                    0
                    • V Offline
                      V Offline
                      vlad
                      wrote on last edited by
                      #10

                      Removed the sensor completely and gateway still reboots, it just takes much longer now

                      0;0;3;0;9;Starting gateway (1.6.0-beta)
                      0;0;3;0;9;Radio init successful.
                      scandone
                      f 0, ....scandone
                      .add 0
                      aid 1
                      pm open phy_2,type:2 0 0
                      cnt 
                      
                      connected with vhome, channel 6
                      dhcp client start...
                      ..ip:192.168.0.51,mask:255.255.255.0,gw:192.168.0.1
                      .IP: 192.168.0.51
                      0;0;3;0;9;Init complete, id=0, parent=0, distance=0
                      0;0;3;0;9;Client 0 connected
                      0;0;3;0;9;Client 0: 0;255;3;0;2;
                      Fatal exception (28):
                      epc1=0x4000bf80, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000000, depc=0x00000000
                      
                      Exception (28):
                      epc1=0x4000bf80 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000
                      
                      ctx: cont 
                      sp: 3ffea5f0 end: 3ffea8a0 offset: 01a0
                      
                      >>>stack>>>
                      3ffea790:  3fff1c28 40219388 3ffea980 402039e4  
                      3ffea7a0:  402136a9 3fff4b68 3ffeaa58 3ffea7d0  
                      3ffea7b0:  3ffea7c0 00000004 3ffeabf4 00000000  
                      3ffea7c0:  00000003 00000000 00000001 00000000  
                      3ffea7d0:  3ffeaa60 3ffeaa6c 0000000a 3ffeaac0  
                      3ffea7e0:  00000001 3ffeab90 00000000 40203ec8  
                      3ffea7f0:  00000000 3ffeaa60 3fff4bb8 40206a0a  
                      3ffea800:  3fffdc20 00000000 3ffeaa50 3ffeabf3  
                      3ffea810:  00000000 00000003 00000000 4020428b  
                      3ffea820:  3ffe8f20 00000000 000003e8 402024f1  
                      3ffea830:  00000000 3fff4bb8 3ffea950 3ffea860  
                      3ffea840:  00000000 00000004 3ffea950 40202d34  
                      3ffea850:  3fffdc20 00000000 00000000 3ffeaa58  
                      3ffea860:  3fffdc20 00000000 3ffeaa50 40204994  
                      3ffea870:  40203be9 00000000 3ffeaa50 402042e3  
                      3ffea880:  00000000 00000000 3ffeaa50 402048e6  
                      3ffea890:  00000000 00000000 3ffe9880 40100118  
                      <<<stack<<<
                      òm+ÿP9<áÿ0;0;3;0;9;Starting gateway (1.6.0-beta)
                      0;0;3;0;9;Radio init successful.
                      scandone
                      f 0, ....scandone
                      .reconnect
                      f -240, ....scandone
                      .reconnect
                      f 0, ....scandone
                      .add 0
                      aid 1
                      pm open phy_2,type:2 0 0
                      cnt 
                      
                      connected with vhome, channel 6
                      dhcp client start...
                      ..ip:192.168.0.51,mask:255.255.255.0,gw:192.168.0.1
                      .IP: 192.168.0.51
                      0;0;3;0;9;Init complete, id=0, parent=0, distance=0
                      hekH 1 Reply Last reply
                      0
                      • V vlad

                        Removed the sensor completely and gateway still reboots, it just takes much longer now

                        0;0;3;0;9;Starting gateway (1.6.0-beta)
                        0;0;3;0;9;Radio init successful.
                        scandone
                        f 0, ....scandone
                        .add 0
                        aid 1
                        pm open phy_2,type:2 0 0
                        cnt 
                        
                        connected with vhome, channel 6
                        dhcp client start...
                        ..ip:192.168.0.51,mask:255.255.255.0,gw:192.168.0.1
                        .IP: 192.168.0.51
                        0;0;3;0;9;Init complete, id=0, parent=0, distance=0
                        0;0;3;0;9;Client 0 connected
                        0;0;3;0;9;Client 0: 0;255;3;0;2;
                        Fatal exception (28):
                        epc1=0x4000bf80, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000000, depc=0x00000000
                        
                        Exception (28):
                        epc1=0x4000bf80 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000
                        
                        ctx: cont 
                        sp: 3ffea5f0 end: 3ffea8a0 offset: 01a0
                        
                        >>>stack>>>
                        3ffea790:  3fff1c28 40219388 3ffea980 402039e4  
                        3ffea7a0:  402136a9 3fff4b68 3ffeaa58 3ffea7d0  
                        3ffea7b0:  3ffea7c0 00000004 3ffeabf4 00000000  
                        3ffea7c0:  00000003 00000000 00000001 00000000  
                        3ffea7d0:  3ffeaa60 3ffeaa6c 0000000a 3ffeaac0  
                        3ffea7e0:  00000001 3ffeab90 00000000 40203ec8  
                        3ffea7f0:  00000000 3ffeaa60 3fff4bb8 40206a0a  
                        3ffea800:  3fffdc20 00000000 3ffeaa50 3ffeabf3  
                        3ffea810:  00000000 00000003 00000000 4020428b  
                        3ffea820:  3ffe8f20 00000000 000003e8 402024f1  
                        3ffea830:  00000000 3fff4bb8 3ffea950 3ffea860  
                        3ffea840:  00000000 00000004 3ffea950 40202d34  
                        3ffea850:  3fffdc20 00000000 00000000 3ffeaa58  
                        3ffea860:  3fffdc20 00000000 3ffeaa50 40204994  
                        3ffea870:  40203be9 00000000 3ffeaa50 402042e3  
                        3ffea880:  00000000 00000000 3ffeaa50 402048e6  
                        3ffea890:  00000000 00000000 3ffe9880 40100118  
                        <<<stack<<<
                        òm+ÿP9<áÿ0;0;3;0;9;Starting gateway (1.6.0-beta)
                        0;0;3;0;9;Radio init successful.
                        scandone
                        f 0, ....scandone
                        .reconnect
                        f -240, ....scandone
                        .reconnect
                        f 0, ....scandone
                        .add 0
                        aid 1
                        pm open phy_2,type:2 0 0
                        cnt 
                        
                        connected with vhome, channel 6
                        dhcp client start...
                        ..ip:192.168.0.51,mask:255.255.255.0,gw:192.168.0.1
                        .IP: 192.168.0.51
                        0;0;3;0;9;Init complete, id=0, parent=0, distance=0
                        hekH Offline
                        hekH Offline
                        hek
                        Admin
                        wrote on last edited by
                        #11

                        What do you mean by:

                        Removed the sensor completely

                        Did you alter the esp-gateway sketch? If so, you might wanna post it here.

                        1 Reply Last reply
                        0
                        • V Offline
                          V Offline
                          vlad
                          wrote on last edited by
                          #12

                          Other than login/password and commenting out static ip part nothing was changed.
                          I wonder if it's power even though I'm powering from one of those breadboard power sources that's connected to 9v and is feeding 3.3v to esp/radio.

                          1 Reply Last reply
                          0
                          • V Offline
                            V Offline
                            vlad
                            wrote on last edited by
                            #13

                            Looks like I might have jumped the gun on dev being better than release branch. I changed the keepalive timeout to a long time and constant reboots stopped.

                            So this is the same issue then, it might just get exacerbated when node has something to say to the gateway/controller.

                            By removed sensor I meant I turned it off completely (it is the only sensor node in the network). Gateway was still rebooting even with no nodes on the network.

                            I took apart my ethernet gateway so I think I'll just stick with this one and set keepalive to a long time. Gateway will still reboot but it won't be every minute and that should be ok until the fix is found.

                            tpenguin74T 1 Reply Last reply
                            0
                            • V vlad

                              Looks like I might have jumped the gun on dev being better than release branch. I changed the keepalive timeout to a long time and constant reboots stopped.

                              So this is the same issue then, it might just get exacerbated when node has something to say to the gateway/controller.

                              By removed sensor I meant I turned it off completely (it is the only sensor node in the network). Gateway was still rebooting even with no nodes on the network.

                              I took apart my ethernet gateway so I think I'll just stick with this one and set keepalive to a long time. Gateway will still reboot but it won't be every minute and that should be ok until the fix is found.

                              tpenguin74T Offline
                              tpenguin74T Offline
                              tpenguin74
                              wrote on last edited by
                              #14

                              @vlad I am having the same issue. Where did you change keepalive timeout to a long time?
                              Essentially, what file did you edit, what parameter and to how long?

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


                              11

                              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