[SOLVED] ESP8266 WDT reset



  • Hello!
    I'm quite new to this and have successfully created an ESP8266 (Adafruit HUZZA) gateway with an NRF24L01+PA+LNA radio. All is powered by an 2,4A USB charger.

    I've had it up and running without problems for some days. But after tweaking and having problems I reverted back to original settings (only tweaked PA level and channel).
    Now I get it working somewhat. Sometimes it's all fine, I can include and receive values. And then suddenly the chip reboots.

    I can replicate the reboot by restarting my Vera Edge (Reload Engine).

    Client 0 connected
    0;0;3;0;14;Gateway startup complete.
    Client 0: 0;0;3;0;2;Get Version
    
    0;0;3;0;2;1.5.4
    0;0;3;0;9;read: 2-2-0 s=1,c=2,t=24,pt=0,l=0,sg=0:
    2;1;2;0;24;
    Client 0: 2;1;1;0;24;
    
    
    Soft WDT reset
    
    ctx: cont 
    sp: 3ffefe70 end: 3fff01c0 offset: 01b0
    
    >>>stack>>>
    3fff0020:  3ffeee91 00000092 3ffeef88 40203f5e  
    3fff0030:  3ffeee8b 0000000e 3ffeef1c 402040d4  
    3fff0040:  3ffeee8b 00000030 3ffeef1c 40204120  
    3fff0050:  a8e1fc02 000000a8 3ffeef1c 40204276  
    3fff0060:  3ffeee8b 00000007 3ffeef1c 40203d0b  
    3fff0070:  00000017 3ffeef1c 00000011 00000002  
    3fff0080:  000000ff 3ffeee84 3ffeee8b 402031a5  
    3fff0090:  00000019 00000001 00000000 3ffeebf3  
    3fff00a0:  ffffffff 3fff0100 3ffeef1c 00000004  
    3fff00b0:  00000000 00000000 3ffeee8b 4020101c  
    3fff00c0:  3ffeebf2 00000000 00000001 3ffeee84  
    3fff00d0:  3ffeebf3 00000000 3fff00fe 4020102c  
    3fff00e0:  40217ee6 00000002 3ffeee8b 00000000  
    3fff00f0:  000000ff 00000000 3ffeee84 40202ba1  
    3fff0100:  3ffef002 0000000b 3ffeebf3 00000000  
    3fff0110:  000000ff 00000000 3ffeee84 40203460  
    3fff0120:  00000002 3ffeee8b 3ffef0d0 40205bbd  
    3fff0130:  3ffeebe8 3ffeebe8 3ffef0d0 3ffef0d0  
    3fff0140:  00000002 3ffeee84 3ffeee8b 40202439  
    3fff0150:  3ffeedec 3ffeebe8 00000000 402026b4  
    3fff0160:  3ffe8628 00000000 000003e8 40205302  
    3fff0170:  00000000 3fff12c0 0101a8c0 3ffef194  
    3fff0180:  00000000 0000000a 00000000 00000000  
    3fff0190:  40205d49 0501a8c0 00000000 3ffef194  
    3fff01a0:  3fffdc20 00000000 3ffef18d 40205d71  
    3fff01b0:  00000000 00000000 3ffef1a0 40100114  
    <<<stack<<<
    
     ets Jan  8 2013,rst cause:2, boot mode:(3,6)
    

    The client connects, and after a few sec I see soft WDC reset.
    Usualy the ESP just reboots and connect to my wifi and starts receiving values. But to get Vera to connect I need to reload the engine and then the ESP reboots.
    And sometimes it's just hangs afterwards.

     ets Jan  8 2013,rst cause:4, boot mode:(3,6)
    
    wdt reset
    

    The thing is that I had it going several days with PA level at HIGH with no big problem. Except when I wanted to include a new sensor . Then I started checking and everything then fell apart.
    I have dual 100uf capacitor on the 3.3V and one on the input 5V. And can't measure any voltage drops with my multimeter. Only had one 100uf on the 3.3v at first, added the others now when I try to troubleshoot.

    Any ideas with how I shall troubleshoot this?

    Re-flashed with original settings, and then restarted one sensor:

    0;0;3;0;14;Gateway startup complete.
    Client 0 disconnected
    Client 0 connected
    0;0;3;0;14;Gateway startup complete.
    Client 0: 0;0;3;0;2;Get Version
    
    0;0;3;0;2;1.5.4
    0;0;3;0;9;read: 2-2-0 s=255,c=3,t=15,pt=2,l=2,sg=0:544473088
    2;255;3;0;15;536870912
    0;0;3;0;9;read: 2-2-0 s=255,c=0,t=17,pt=0,l=5,sg=0:1.5.4
    2;255;0;0;17;1.5.4
    0;0;3;0;9;read: 2-2-0 s=255,c=3,t=6,pt=1,l=1,sg=0:0
    2;255;3;0;6;0
    Client 0: 2;255;3;0;6;M
    
    
    Soft WDT reset
    
    ctx: cont 
    sp: 3ffefe70 end: 3fff01c0 offset: 01b0
    
    >>>stack>>>
    3fff0020:  3ffeee92 00000093 3ffeef88 40203f5e  
    3fff0030:  3ffeee8b 000000ff 3ffeef1c 402040cb  
    3fff0040:  3ffeee8b 00000030 3ffeef1c 40204120  
    3fff0050:  a8e1fc02 000000a8 3ffeef1c 40204276  
    3fff0060:  3ffeee8b 00000008 3ffeef1c 40203d0b  
    3fff0070:  00000017 3ffeef1c 00000011 00000002  
    3fff0080:  000000ff 3ffeee84 3ffeee8b 402031a5  
    3fff0090:  00000019 00000001 00000000 3ffeebf4  
    3fff00a0:  ffffffff 3fff0100 3ffeef1c 00000004  
    3fff00b0:  00000000 00000000 3ffeee8b 4020101c  
    3fff00c0:  3ffeebf3 00000000 3ffeee8b 3ffeee84  
    3fff00d0:  3ffeebf4 00000000 3fff00fe 4020102c  
    3fff00e0:  40217ee6 00000003 3ffeee8b 00000000  
    3fff00f0:  000000ff 00000000 3ffeee84 40202ba1  
    3fff0100:  3ffef002 0000000d 3ffeebf5 00000000  
    3fff0110:  000000ff 00000000 3ffeee84 40203460  
    3fff0120:  00000002 3ffeee8b 3ffef0d0 40205bbd  
    3fff0130:  3ffeebe8 3ffeebe8 3ffef0d0 3ffef0d0  
    3fff0140:  00000002 3ffeee84 3ffeee8b 40202439  
    3fff0150:  3ffeedec 3ffeebe8 00000000 402026b4  
    3fff0160:  3ffe8628 00000000 000003e8 40205302  
    3fff0170:  00000000 3fff12c0 0101a8c0 3ffef194  
    3fff0180:  00000000 0000000a 00000000 00000000  
    3fff0190:  40205d49 0501a8c0 00000000 3ffef194  
    3fff01a0:  3fffdc20 00000000 3ffef18d 40205d71  
    3fff01b0:  00000000 00000000 3ffef1a0 40100114  
    <<<stack<<<
    
     ets Jan  8 2013,rst cause:2, boot mode:(1,6)
    
    
     ets Jan  8 2013,rst cause:4, boot mode:(1,6)
    
    wdt reset
    

  • Mod

    @Kosika Please indicate which MySensors & ESP ARduino Port you're using.



  • Using Mysensors 1.5 Library and followed the guide here: https://www.mysensors.org/build/esp8266_gateway
    Using arduino version 1.6.8
    *EDIT. Using ESP 2.0.0


  • Mod

    @Kosika please try with MySensors 2.0.0 beta (development branch) and ESP Arduino 2.0.0



  • Hello and thanks for the tips.
    I have now upgraded to 2.0.0 of mysensors library.
    I reflashed the ESP module with the new libraries and open the serial monitor. It connects fine with the router etc.
    But as soon as I start a sensor (not touched them, still 1.5 version) it recieves a message and then reboots.

    connected with Skoda, channel 6
    dhcp client start...
    .ip:192.168.1.5,mask:255.255.255.0,gw:192.168.1.1
    .IP: 192.168.1.5
    0;255;3;0;9;Init complete, id=0, parent=0, distance=0
    0;255;3;0;9;read: 1-1-0 s=255,c=3,t=15,pt=2,l=2,sg=0:0
    
    Soft WDT reset
    
    ctx: cont 
    sp: 3ffef920 end: 3ffefcb0 offset: 01b0
    
    >>>stack>>>
    3ffefad0:  00000000 3ffefff8 3ffefff8 40204083  
    3ffefae0:  402017b8 00000000 3ffefff8 40204083  
    3ffefaf0:  00000000 3ffefff8 00000000 40202152  
    3ffefb00:  001e8480 3ffe0001 3ffefd38 40202152  
    3ffefb10:  00000000 00000040 00000000 00000000  
    3ffefb20:  00000000 00000000 00000001 00000000  
    3ffefb30:  00000001 00000030 00000040 40202179  
    3ffefb40:  00000001 3ffefd30 00000001 402023a2  
    3ffefb50:  00000009 021139b4 00002200 3ffe9c40  
    3ffefb60:  3ffefff8 00000002 3ffefd30 40202ff8  
    3ffefb70:  3ffefff8 00000000 3ffefeef 00000027  
    3ffefb80:  3ffefbf0 3ffefff8 3ffefff8 40204083  
    3ffefb90:  402017b8 3ffefbf1 3ffefff8 00000061  
    3ffefba0:  3ffefbf0 3ffefff8 3ffefbf0 00000000  
    3ffefbb0:  3ffefd54 3ffefd30 00000001 402024b1  
    3ffefbc0:  00000001 00000000 3ffefd38 00000000  
    3ffefbd0:  3ffefd54 3ffefd30 00000001 402035d0  
    3ffefbe0:  3ffe88c0 00000004 00000009 3ffefd30  
    3ffefbf0:  00000003 00000001 3ffefd30 40203657  
    3ffefc00:  00000001 00000003 3ffefd30 40203690  
    3ffefc10:  00000003 00000001 3ffefd54 40203acf  
    3ffefc20:  0000000f 00000002 00000002 00000000  
    3ffefc30:  3ffefcd8 00000000 3ffefd54 3ffeec80  
    3ffefc40:  3fffdc00 00000000 3ffefd30 3ffefc70  
    3ffefc50:  0000000f 00000000 00000001 00000002  
    3ffefc60:  000000ff 00000012 00000000 3ffeec80  
    3ffefc70:  3fffdc20 00000000 3ffeec78 3ffeec80  
    3ffefc80:  3fffdc20 00000000 3ffeec78 40203388  
    3ffefc90:  00000000 00000000 3ffeec78 40203cb0  
    3ffefca0:  00000000 00000000 3ffeec90 40100114  
    <<<stack<<<
    c_rSöfê0;255;3;0;9;Starting gateway (RNNGE-, 2.0.0-beta)
    0;255;3;0;9;Radio init successful.
    scandone
    state: 0 -> 2 (b0)
    state: 2 -> 3 (0)
    state: 3 -> 5 (10)
    add 0
    aid 5
    pm open phy_2,type:2 0 0
    cnt 
    
    connected with Skoda, channel 6
    dhcp client start...
    .ip:192.168.1.5,mask:255.255.255.0,gw:192.168.1.1
    .IP: 192.168.1.5
    0;255;3;0;9;Init complete, id=0, parent=0, distance=0
    

    After the restart it seams to be ok with accepting radiomesages

    connected with Skoda, channel 6
    dhcp client start...
    .ip:192.168.1.5,mask:255.255.255.0,gw:192.168.1.1
    .IP: 192.168.1.5
    0;255;3;0;9;Init complete, id=0, parent=0, distance=0
    0;255;3;0;9;read: 1-1-0 s=1,c=1,t=0,pt=7,l=5,sg=0:26.4
    0;255;3;0;9;read: 1-1-0 s=0,c=1,t=1,pt=7,l=5,sg=0:48.8
    0;255;3;0;9;read: 1-1-0 s=0,c=1,t=1,pt=7,l=5,sg=0:44.8
    0;255;3;0;9;read: 1-1-0 s=1,c=1,t=0,pt=7,l=5,sg=0:26.6
    0;255;3;0;9;read: 1-1-0 s=0,c=1,t=1,pt=7,l=5,sg=0:44.7
    0;255;3;0;9;read: 1-1-0 s=1,c=1,t=0,pt=7,l=5,sg=0:26.5
    0;255;3;0;9;read: 1-1-0 s=0,c=1,t=1,pt=7,l=5,sg=0:44.6
    0;255;3;0;9;read: 1-1-0 s=1,c=1,t=0,pt=7,l=5,sg=0:26.6
    0;255;3;0;9;read: 1-1-0 s=1,c=1,t=0,pt=7,l=5,sg=0:26.7
    

    It also good when I reloaded Vera. I got values into vera aswell.
    But as soon as I power in a new sensor it restarts. is that normal? And sometimes when I restart Vera the ESP restarts aswell, so it's the same now. Works sometimes, sometimes not (mostly not)

    I notice that when the client connects to it fine, untill it sends "0;255;3;0;9;Client 0: 2;1;1;0;24"
    Then there is a soft WDT reset

    0;255;3;0;9;Client 0 connected
    0;255;3;0;9;Client 0: 0;0;3;0;2;Get Version
    0;255;3;0;9;Client 0: 
    0;255;3;0;9;read: 2-2-0 s=1,c=2,t=24,pt=0,l=0,sg=0:
    0;255;3;0;9;Client 0: 2;1;1;0;24;
    

    So the problem seams to be when a sensor starts up or when a client connects.
    Tested to telnet it and it works ok. No restart


  • Mod

    @Kosika said:

    as soon as I power in a new sensor

    Do you mean you connect it to the power supply?
    Could very well be that you're overloading the ESP power regulator. Try with a separate supply.



  • All sensors are connected to pro mini's thats powered by 2x AA batteries.
    I've now installed separate 5v->3v regulator for the GW radio.
    It looks like it starts up right, can reload vera etc but now it don't recieve any radiomessages at all. Something special when having separate regulator? It has the the GND, just VCC that's separated.

    0;255;3;0;9;Starting gateway (RNNGE-, 2.0.0-beta)
    0;255;3;0;9;Radio init successful.
    scandone
    state: 0 -> 2 (b0)
    state: 2 -> 3 (0)
    state: 3 -> 5 (10)
    add 0
    aid 4
    pm open phy_2,type:2 0 0
    cnt 
    
    connected with Skoda, channel 6
    dhcp client start...
    .ip:192.168.1.5,mask:255.255.255.0,gw:192.168.1.1
    .IP: 192.168.1.5
    0;255;3;0;9;Init complete, id=0, parent=0, distance=0
    

    One step forward, and two steps back.



  • Okay, found the radio problem. I microscopit strand of copper wire had shorted the CS pin to the ESP 3.3v line. So now it recieves radio messages again.

    But when powering on a sensor it restarts like before. And sometimes when reloading vera. But once it didn't restart on reload:

    0;255;3;0;9;Client 0 connected
    0;255;3;0;9;Client 0: 0;0;3;0;2;Get Version
    0;255;3;0;9;Client 0: 
    0;255;3;0;9;read: 1-1-0 s=0,c=1,t=1,pt=7,l=5,sg=0:35.1
    0;255;3;0;9;read: 1-1-0 s=1,c=1,t=0,pt=7,l=5,sg=0:26.9
    0;255;3;0;9;read: 1-1-0 s=0,c=1,t=1,pt=7,l=5,sg=0:35.3
    0;255;3;0;9;read: 2-2-00;255;3;0;9;Client 0: 2;1;1;0;24;
    

    Notice the lack of

    0;255;3;0;9;Client 0: 2;1;1;0;24;
    

    That and

    0;255;3;0;9;Client 0: 2;1;1;0;24;
    

    Seams to make the GW restart



  • Have had the GW running for a day now, as long as the client (Vera Edge) don't sent

    0;255;3;0;9;Client 0: 2;1;1;0;24;
    

    Or I start up an new sensor it's stable and works well.
    Problem now to figure out is how to connect a new sensor, as it restarts as soon as it's powered on.
    Any ideas?

    Note. Noticed that it only restarts upon new sensor startup if the client is connected.

    connected with Skoda, channel 6
    dhcp client start...
    .ip:192.168.1.5,mask:255.255.255.0,gw:192.168.1.1
    .IP: 192.168.1.5
    0;255;3;0;9;Init complete, id=0, parent=0, distance=0
    0;255;3;0;9;read: 1-1-0 s=0,c=1,t=1,pt=7,l=5,sg=0:39.8
    0;255;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0,sg=0:
    0;255;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0,sg=0:
    0;255;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0,sg=0:
    

    NO restart as the client is not connected

    0;255;3;0;9;Client 0 connected
    0;255;3;0;9;Client 0: 0;0;3;0;2;Get Version
    0;255;3;0;9;Client 0: 
    0;255;3;0;9;Client 0: 0;0;3;0;5;1
    0;255;3;0;9;Client 0: 
    0;255;3;0;9;read: 1-1-0 s=1,c=1,t=0,pt=7,l=5,sg=0:24.2
    0;255;3;0;9;read: 1-1-0 s=0,c=1,t=1,pt=7,l=5,sg=0:39.7
    0;255;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0,sg=0:
    0;255;3;0;9;Client 0: 255;255;3;0;4;3
    
    Soft WDT reset
    

    Here is restarted, inclusion mode or not does not matter



  • For one possible solution - refer to: [https://forum.mysensors.org/topic/3894/esp8266-unexpected-crash-or-reset](link url)


  • Mod

    @AffordableTech WDT resets are caused by a hang or too long loop in the software. Your topic describes a null pointer dereference, which is a different issue.



  • Had gotten my hopes up on this solution, but as it don't apply to 2.0 dev branch it was not the answer.
    I'm no programmer so I can't really do any real bug searching. I only noticed that two types of messages makes it restart. What they mean or what they do it beyond my knowledge.
    I'll just sit tight and hope some smart person comes up with a suggestion, meanwhile I'll continue to google the web 🙂



  • I THINK I'm having the same problem.. I'm building my first WiFi gateway.. I used a Sparkfun Thing Dev board because it was handy and accessible. Only oddities were that since the Sparkfun board has an LED on GPIO 5, I set the LED pin to 5 instead of 7, and the inclusion pin to 2..

    I haven't tried the dev branch (will do, and report back) but with 1.5, I get a connection to my wifi, then a reboot:

    ets Jan 8 2013,rst cause:4, boot mode:(3,6)

    wdt reset
    load 0x4010f000, len 1264, room 16
    tail 0
    chksum 0x0f
    csum 0x0f
    ~ld

    Over and over again.. Vera says it's connected, but then says it cant communicate. As mentioned, this type of problem is usually a tight loop not giving time for the WDT on the 8266 but I'm not familiar enough with this code to track it down.. Any ideas?

    -Steve


  • Mod

    @172pilot please try with 2.0.0 development. 1.5 does not contain all fixes for ESP that 2.0.0 has.



  • Hi @172pilot

    PLEASE NOTE: I gather there are three different problems which have similar results:

    • A power supply with insufficient current to drive the ESP causes it to crash / reboot.
    • A NULL message (somewhere in the process) can cause ESP to restart.
    • Something called a 'WDT Reset' , which I have never encountered (?possibly only applies when using a Vera controller?).

    Because all three produce similar looking results, I posted my fix here, even though I had not seen a 'WDT Reset' message (??possibly because I wasn't running a Vera controller??).

    My Symptoms
    My system appeared to have been running 'fine' for a solid week (as a test), using MYScontroller, I didn't notice anything abnormal. I also had a telnet (Potty) connection to the ESP. It wasn't until I started testing OpenHAB that OpenHab would report that it 'could not communicate'. At the same time my telnet connection and MYScontroller just stopped, no error message etc.

    Then, OpenHab log reported that it was 'creating new connection', and resumed communicating, BUT both the telnet link and MYScontroller never resumed communications. I would have to disconnect / reconnect both, then they would continue for a few minutes until OpenHab reported the error again, when they would 'stall' again - this kept repeating.

    If I stopped OpenHab, then the Telnet and MYScontroller worked flawlessly. At first I assumed that the OpenHab binding was the problem. Lots of testing, inserting debug 'print' statements into the drivers etc etc... Eventually I discovered that the 'MySensors ESP driver' was receiving a NULL pointer, when it was expecting a char pointer to a message, this was causing the ESP to reset.

    I've since been told this problem was fixed in the MySensors 2.0 (beta) drivers and only applies to the 1.5 version (current ver at this point in time).

    I hope this helps others clarify which of the three 'causes' apply to their issue. For example, my ESP was resetting, I didn't have a clue if it was a "WDT" reset, it could have been an "ABC" or "XYZ" reset as far as I knew. I still don't know what a WDT reset is?

    Cheers... Paul

    p.s. The first thing to check with any radio device (ESP, nRf2401 or GSM etc) is that you MUST have a good power source. When these devices transmit their current requirements go up significantly, which can cause all sorts of weird and wonderful thing to happen. Whenever I have a problem with a radio device, I will (temporarily) power the (3.3v) RF device direct from a Lipo battery (3.7v) with a 1N4001 (or similar) diode in series, this drops the voltage to 3.1v. Even though the voltage is a tad low, the Lipo (or NiCad) can deliver tremendous 'grunt' (amps) thus its a 'clean' and stable power source!


  • Admin

    The esp (and AVR) has something called a watchdog timer. It's actually there to help if something goes wrong, resetting the MCU. The watchdog timer can be disabled and reconfigured to allow longer interval. On ESP it's enabled by default and on AVR you have to enable it yourself (requires a special bootloader).

    Its works by using a timer which gets "reset" by calling yield() or delay(). Normally you don't have to worry about it as yield() is called automatically in the main loop().

    If yield() isn't called each second (which is the default timeout on ESP) the MCU will reset.

    If you have some long blocking tasks you can disable the wdt temporariily like this:

     wdt_disable();
     <some blocking task>
     wdt_enable();
    

    https://github.com/esp8266/Arduino/blob/master/cores/esp8266/Esp.h#L29-L46


  • Mod

    @hek are you sure disabling the WDT does actually work for ESP? The fact that the function exists, doesn't automatically mean it works 😏
    In the past there were numerous issues of users who tried to disable it but kept getting WDT resets. But again, maybe that's been fixed in 2.x



  • @Yveaux
    Thanks for the response.. I actually did get the 1.5 to at least come up, by putting some WDT resets around in various places that may take a while in a loop, for example, BUT, based on yours, and several other recommendations, I decided to try the 2.0 dev branch.. I deleted everything in my librarys\MySensors directory, and downloaded the DEV branch, and re-extracted the code, and now I can't compile.. I'm getting this:

    Arduino: 1.6.9 (Windows 10), Board: "SparkFun ESP8266 Thing Dev, 80 MHz, 115200"
    
    Build options changed, rebuilding all
    In file included from C:\Users\sjones\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.2.0\libraries\ESP8266WiFi\src/ESP8266WiFi.h:39:0,
    
                     from C:\Users\sjones\Documents\Arduino\MyDevelopment-2-0-GatewayESP8266\MyDevelopment-2-0-GatewayESP8266.ino:70:
    
    C:\Users\sjones\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.2.0\libraries\ESP8266WiFi\src/WiFiClient.h: In instantiation of 'size_t WiFiClient::write(T&, size_t) [with T = char*; size_t = unsigned int]':
    
    C:\Users\sjones\Documents\Arduino\libraries\MySensors/core/MyGatewayTransportEthernet.cpp:163:66:   required from here
    
    C:\Users\sjones\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.2.0\libraries\ESP8266WiFi\src/WiFiClient.h:123:36: error: request for member 'available' in 'source', which is of non-class type 'char*'
    
         size_t left = source.available();
    
                                        ^
    
    C:\Users\sjones\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.2.0\libraries\ESP8266WiFi\src/WiFiClient.h:127:5: error: request for member 'read' in 'source', which is of non-class type 'char*'
    
         source.read(buffer.get(), will_send);
    
         ^
    
    exit status 1
    Error compiling for board SparkFun ESP8266 Thing Dev.
    
    

    I found some recommendations to put the "#include <ESP8266WiFi.h>" close to the top, and it fixed it for other users, but I'm having no success with that..

    Any idea what this may be?

    Thanks in advance..
    -Steve


  • Mod

    @172pilot I'm not behind a PC right now, so it's hard to replay the situation.
    I'd say you either didn't clean everything out completely (use e.g. a completely separate Arduino folder for sketches and libraries), or it's the ESP Arduino port you're using (which version did you install through board manager?)



  • @Yveaux Thanks.. Good to know what I'm doing SHOULD work.. 🙂

    I have been storing everything in what I think is the default directory, which under my \users\sjones\Documents\Arduino\libraries. This is what the Arduino IDE is pointing to.

    Under that directory, I removed the MySensors directory and extracted the new 2.0 one.. BUT, I do see that there are more modules than just those under MySensors, so even though I think those are supposed to NOT conflict with the default ones, I missed one?

    Also, I dont understand why, but I see SOME arduino extension stuff under \program Files (x86)\arduino although I didn't see any MySensors information..

    And, the only other thing I saw which I didn't know how it got there was the one referred to in the error: "C:\Users\sjones\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.2.0\libraries\ESP8266WiFi" Since that specifically was referred to in the error, I thought maybe I had an old version there, so I renamed the ESP8266Wifi directory to "old", figuring that whatever put it there in the first place would replace it with the current version if needed, but it didn't happen - it just failed to compile, complaining that it was missing, so I put it back..

    I'm not near my home computer now, but maybe when I get home I'll try with a completely new windows profile (create a new user) and reinstall Arduino from scratch

    Thanks for your help and patience!
    -Steve



  • Hi @172pilot

    I'm fairly certain from what you have described that you have NOT done this, but just in case I will mention it. Remember, simply renaming a folder within libraries (eg. 'MySensors' to 'MySensorsOLD') can cause grief as the old and new will both be compiled / seen by the linker.

    I think your 'new user' idea will work.

    FWIW: Some time ago I had a similar issue with a different library, I can't remember the details, but I found/fixed it by doing a global search of "C:" for various keywords (e.g. "ESP8" and "MySen" in your case). I ended up finding files I didn't realise were there.

    Good luck!

    Paul



  • @AffordableTech @Yveaux
    Thanks!

    I uninstalled Arduino completely, deleted everything I could find, and reinstalled from scratch, and after a bit of patience and rebooting the vera, I now have a functioning Wifi gateway using a Sparkfun 8266 Thing Dev board, and an NRF radio.. Then I was able to build a quick "Arduino switch" with an Uno and an NRF just to test, and it works great!!

    Now it's time to get creative and build some stuff!

    Thanks again!!

    -Steve



  • @Kosika said:

    Problem now to figure out is how to connect a new sensor, as it restarts as soon as it's powered on.
    Any ideas?

    I have the same problem. I'm using the Esp8266Gateway sketch in the Lib v1.5 and have a NRF24 radio as described in the instructions.
    Every time that I connect a new sensor, the MCU is restarting as you described. This is only happening when the Gateway is connected to a controller (Homeassistant or MYSController). If the gateway is not connected to any controller then it receive the data without any problem.

    @Kosika, How did you solved the problem?



  • @afeno
    I have not solved this problem. But I have put this project on ice the last 2 months, but I will soon continue by doing a complete reinstall of all libraries etc.


  • Mod

    @afeno @Kosika please switch to the new 2.0.0 library, for your gateway, repeaters and sensors.
    Esp support has been improved in there, and developer support will be faster.



  • @Yveaux said:

    @Kosika please switch to the new 2.0.0 library

    Ok. I will switch to 2.0.0 and let you know.
    Thank you.



  • @Yveaux said:

    please switch to the new 2.0.0 library, for your gateway, repeaters and sensors.
    Esp support has been improved in there, and developer support will be faster.

    Hello,
    I switched to the new 2.0.0 and I still have the same problem:

    connected with AFENO_DD, channel 6
    dhcp client start...
    0;255;3;0;9;TSM:READY
    f r-40, scandone
    .....ip:192.168.1.82,mask:255.255.255.0,gw:192.168.1.1
    .IP: 192.168.1.82
    0;255;3;0;9;No registration required
    0;255;3;0;9;Init complete, id=0, parent=0, distance=0, registration=1
    0;255;3;0;9;TSP:MSG:READ 6-6-255 s=255,c=3,t=7,pt=0,l=0,sg=0:
    0;255;3;0;9;TSP:MSG:BC
    0;255;3;0;9;TSP:MSG:FPAR REQ (sender=6)
    0;255;3;0;9;TSP:CHKUPL:OK (FLDCTRL)
    0;255;3;0;9;TSP:MSG:GWL OK
    pm open,type:2 0
    
    Soft WDT reset
    
    ctx: cont 
    sp: 3ffef6b0 end: 3ffefa30 offset: 01b0
    
    >>>stack>>>
    3ffef860:  00000000 3ffefd08 3ffefd08 402048bb  
    3ffef870:  40107050 00000000 3ffefd08 402048bb  
    3ffef880:  00000000 3ffefd08 00000000 4020230f  
    3ffef890:  001e8480 3ffe0001 3ffefa8f 40202376  
    3ffef8a0:  00000000 0000000e 00000000 00000006  
    3ffef8b0:  00000000 00000000 00000006 00000006  
    ...
    

    What could be the reason for the reset?
    Is it OK to power the NodeMCU from the microUSB?

    Thank you!


  • Mod

    @afeno what esp arduino core are you using? Try updating to the latest version.
    I have an esp gateway running (2.0.0, fixed ip, mqtt client, powered through micro USB) without any issues. Power could be insufficiently stable though, so you could also try switching the power supply.



  • @Yveaux said:

    last arduino core version and different power supply.

    Hi, I'm using the version 2.3.0. I tried with different power supplies and all the same.
    I will try the mqtt client just to see if it is working.

    Thanks.



  • @Yveaux ,
    I tried with the esp mqtt client and I have similar issues. The node is reseting when receiving the radio signal.

    This is the log:

    ž¡9C~0;255;3;0;9;Starting gateway (RNNGE-, 2.0.0)
    0;255;3;0;9;TSM:INIT
    0;255;3;0;9;TSM:RADIO:OK
    0;255;3;0;9;TSM:GW MODE
    scandone
    state: 0 -> 2 (b0)
    state: 2 -> 3 (0)
    state: 3 -> 5 (10)
    add 0
    aid 4
    cnt 
    chg_B1:-40
    0;255;3;0;9;TSM:READY
    f r-40, scandone
    .
    connected with AFENO_DD, channel 6
    dhcp client start...
    ..ip:192.168.1.82,mask:255.255.255.0,gw:192.168.1.1
    .IP: 192.168.1.82
    0;255;3;0;9;No registration required
    0;255;3;0;9;Init complete, id=0, parent=0, distance=0, registration=1
    IP: 192.168.1.82
    0;255;3;0;9;Attempting MQTT connection...
    0;255;3;0;9;MQTT connected
    0;255;3;0;9;TSP:MSG:READ 6-6-255 s=255,c=3,t=7,pt=0,l=0,sg=0:
    0;255;3;0;9;TSP:MSG:BC
    0;255;3;0;9;TSP:MSG:FPAR REQ (sender=6)
    0;255;3;0;9;TSP:CHKUPL:OK (FLDCTRL)
    0;255;3;0;9;TSP:MSG:GWL OK
    
    Soft WDT reset
    
    ctx: cont 
    sp: 3ffef6d0 end: 3ffefa50 offset: 01b0
    
    >>>stack>>>
    3ffef880:  00000000 3ffefc24 3ffefc24 40204d27  
    3ffef890:  40107050 00000000 3ffefc24 40204d27  
    3ffef8a0:  00000000 3ffefc24 00000000 40202336  
    3ffef8b0:  001e8480 3ffe0001 3ffefaaf 40202336  
    3ffef8c0:  00000000 0000000e 00000001 00000006  
    3ffef8d0:  00000000 00000000 00000006 00000006  
    3ffef8e0:  00000030 0000000e 00001928 402023d1  
    3ffef8f0:  00000001 3ffefaa8 00000006 402024ce  
    3ffef900:  00000008 00000006 3fff129c 00000027  
    3ffef910:  00000001 00000006 3ffefaa8 402035bc  
    3ffef920:  40107050 3ffef981 3ffefc24 00000061  
    3ffef930:  3ffef980 3ffefc24 3ffef980 40202336  
    3ffef940:  401054b2 000e937d 3ffefc24 3ffefc68  
    3ffef950:  4010556e 3ffee428 000e937d 00000000  
    3ffef960:  40105740 000e937d 3ffefc68 00000006  
    3ffef970:  000000ff 3ffefaa8 00000006 402026dd  
    3ffef980:  3ffefa06 00000006 40203bc8 00000006  
    3ffef990:  000000ff 3ffefaa8 00000006 402036fd  
    ...
    

    😞



  • I didn't give up (yet...) I tried today to power the NRF from an external power supply. Same result. The esp8266 is rebooting after receiving some data as shown above. My conclusion is that the problem is on the esp8266 itself or in the power supply that I am using.
    My last try will be to power the esp8266 from something different than the microUSB.
    Just in case, this is the setup. Maybe I'm missing something very basic:
    0_1469136320102_esp.png

    Regaards,
    Alfredo.


  • Mod

    @afeno hard to tell from the picture, but it looks like CE is connected to D1, instead of D2.
    Please refer to the connection diagram here: https://www.mysensors.org/build/esp8266_gateway



  • @Yveaux , did you know that you are awesome?
    There is an error on Pin labels!!! The print on the pcb is wrong. You are right!
    I have two D2 and of course that I used the wrong one
    0_1469171376781_pinD2.png

    Thank you so much!!!!


  • Mod

    @afeno said:

    did you know that you are awesome?

    Yup 😏


Log in to reply
 

Suggested Topics

  • 3
  • 1
  • 2
  • 8
  • 5

0
Online

11.4k
Users

11.1k
Topics

112.7k
Posts