logo elektroda
logo elektroda
X
logo elektroda

ESP8266 resets every 30 seconds after TCP software is loaded

piotr411 3423 5
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 15573145
    piotr411
    Level 22  
    Admittedly, the topic was already reference , unfortunately it is closed and the problem is still there.
    Changing the IP does not help

    Code: Lua
    Log in, to see the code


    Sleep mode does not help either
    Code: Lua
    Log in, to see the code


    Interestingly this was not the case before. I wrote a simple soft to communicate over TCP and after loading this problem appeared.

    I don't know too much where to look anymore, the symptoms are identical to the closed topic from the link. The problem occurs with the NodeMcu firmware and with AT, there is no problem with ESP Basic, so I conclude that it is a software problem. I've read the NodeMCU references many times and I really don't see anything that could affect the reset.
    Another thing is that with srv=net.createServer(net.TCP) without specifying an interval, the server should be active all the time. On the other hand, writing srv=net.createServer(net.TCP, 28800 ) should keep the server active for 8 hours, and it doesn't, the interval value is constant regardless of the value entered and is 32. Could this be a "Bug"? but why did it appear over time, despite using the same firmware version.
  • ADVERTISEMENT
  • #2 15584065
    lukaszrzepinski
    Level 10  
    NodeMCU is very capricious and debugging is unpleasant.
    First of all: make sure you have the new float firmware.
    Perform debugging by commenting out lines and find out which one triggers the reset. For example, you may not have a lua module embedded in the firmware.

    These are general comments.

    Now you say it happens after 30 seconds? Is a connection established? Or is it within the timer software? It is common for memory overruns to occur when the timer accumulates unsuccessful failed connections

    In general, you have given too little data.
  • ADVERTISEMENT
  • #3 15585004
    piotr411
    Level 22  
    It looks like this.
    I have a dozen or so modules and can confirm that, despite the fact that they are supplied from one manufacturer, they behave differently. The problem in them concerns the power supply. You need to provide a minimum of 1A/5V. i.e. when powered by AS1117, all modules work correctly. The power supply bypassing the AS plays tricks and my guess is that the cause is a missing capacitor at the input of the Esp8266, and it is from before the AS. Ok, that's a minor observation, but it's not the issue. The problem is with the modules I am running the program on. Before running it, the module works fine. Now what is wrong:
    There is nothing in the logs, the module performs a Reset without giving information to the logs. The reset occurs even if the init file is not present, just connect to the ESP8266 and after 30 seconds there is a reset. That is, there is no Timer set in the ESP from within the application, but..., when I check net.createServer what the interval is, the result is 32. Despite the declaration of 28800. In the pdf it is written to make NONE_SLEEP work it should on GPIO17 if I remember correctly be pulled up. This I also tried, still reset. Uploading fresh Firmware doesn't improve the situation, and this is already strange, because when it loads Basic ESP, it works without resets. I know that resets occur when there is an incorrect power supply or no condenser, but here I have everything done correctly.
  • ADVERTISEMENT
  • #4 15586481
    lukaszrzepinski
    Level 10  
    90% of the resets I experienced were related to software errors:
    - memory exhaustion
    - null in a variable (e.g. MQTT module not compiled into Lua)
    - other errors such as an already existing IP address

    Debug by commenting a section of the program and you will see after deleting which error will stop appearing.
  • ADVERTISEMENT
  • #5 15609491
    piotr411
    Level 22  
    Do you know how to install the Visual Micro ESP plugin into Atmel Studio 7? for the world's sake it won't plug in. It's probably a matter of modifying some file, but I can't figure out which one it sits in.
  • #6 16100355
    rafal2_3
    Level 12  
    I had the same reboots whenever I connected behind the router . The cause turned out to be in a MAC address conflict. That is, the same MAC address on the ESP8266 and the device on the network.
ADVERTISEMENT