logo elektroda
logo elektroda
X
logo elektroda

ESP8266 stops responding to AT commands after 20h of operation - how to stabilize?

ghost2000 1278 4
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 17074615
    ghost2000
    Level 18  
    I communicate with ESP via AT commands. Configuration:
    AT+CWMODE=1
    AT+CIPMUX=1
    AT+CIPSERVER=1,80

    Periodically, it queries NTP:
    AT+CIPSTART=4,\"UDP\",\"193.67.79.202\",123,1112,0
    AT+CIPSEND=4,48
    AT+CIPCLOSE=4

    This works without a problem. HTTP support too, but after about 20 hours the query on port 80 does not come (no +IPD message). A software reset, re-enabling listening (AT+CIPSERVER=1,80) solves the problem.
    I checked what happens when the module "hangs up". Listening is enabled, because AT+CIPSERVER=1,80 gives an error (unfortunately I don't remember which one, next time I try I'll make a note and write it down). Trying to close port 80 with AT+CIPCLOSE=1 gives an UNLINK message.

    Due to the fact that the error occurs after about 20 hours of operation, the research is going quite slowly. Has anyone encountered a similar problem?
  • ADVERTISEMENT
  • #2 17074678
    JacekCz
    Level 42  
    Such a number i.e. 20h has already appeared here.
    In a badly written program, the timers overflow (supposedly) precisely after this time.
    I am writing from memory.
  • ADVERTISEMENT
  • #3 17074775
    ghost2000
    Level 18  
    JacekCz wrote:
    This number i.e. 20h has already appeared here.
    In a badly written program the timers overflow (supposedly) just after this time.
    I am writing from memory.
    .
    Except that I don't have a timer. I count the timeouts on virtual timers counting down to zero. But maybe there is something messed up in ESP?

    I know that the problem can be fixed by resetting the ESP every 3 hours, for example. It starts quickly, in 10 seconds the HTTP is already running. I can try just closing and opening listening on port 80, maybe that is enough. However, I would like to find out where the problem lies. I have a PenDrive on the device so I can do logging. The question is what should I be saving? Probably everything that comes in from the ESP. Maybe I can find some sort of message about problems with port 80.

    EDIT .
    Today, it died after about 10 hours.

    EDIT .
    Now the problem again after about 10 hours. I am beginning to suspect a power supply problem. After 20 hours, the pad occurred when I powered from the 230V-USB power supply. After 10 hours when I power from the USB of the computer. Fortunately, I have the possibility to power from 7..12V and the stabiliser is in the device. I will see what the effects will be after changing the power supply.
    I don't want to make logs but they would help me a lot. If the ESP does a reboot I would have that in the log.
  • ADVERTISEMENT
  • #4 17115155
    Hubert9801
    Level 6  
    The ESP8266 itself needs a stable power supply, and secondly it needs to be woken up periodically by loops, otherwise it likes to go into "kime"
  • #5 17115552
    ghost2000
    Level 18  
    Hubert9801 wrote:
    The ESP8266 itself needs a stable power supply, and secondly it needs to be woken up periodically by loops, otherwise it likes to go "kime"
    .
    Box.
    Quote:
    .
    Every once in a while, it queries NTP:

    The polling is done every minute and it works. If the ESP was asleep or there were power problems I would not get a response from NTP and it would not work just listening.
ADVERTISEMENT