logo elektroda
logo elektroda
X
logo elektroda

ESP8266-01 - Reset every 30 seconds after AT+CWJAP=SSID,password command

waldemar.podgorski 6123 21
Best answers

Why does my ESP8266-01 reset about every 30 seconds after AT+CWJAP=SSID,password, and how can I stop the watchdog resets?

The resets were caused by a router IP address conflict, not by the ESP8266 module or its power supply. When the router was enabled, the counter reached about 30–32 and a WDT reset occurred, but with the router switched off the code ran normally [#14835674] The fix was to change the second router from 192.168.0.1 to 192.168.2.1 because both routers had the same 192.168.0.1 address [#14845830] After that change, the ESP8266 ran stably for thousands of seconds [#14845830]
Generated by the language model.
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 14791328
    waldemar.podgorski
    Level 9  
    Posts: 34
    Rate: 2
    Board Language: polish
    I have a problem with the ESP8266-01 modules. after issuing the command
    AT+CWJAP="SSID", "password" the chip resets itself every 30 seconds or so. Same thing when using Arduino ide for ESP. Maybe someone can help?
  • ADVERTISEMENT
  • #2 14791491
    piotrva
    VIP Meritorious for electroda.pl
    Posts: 6409
    Help: 625
    Rate: 734
    Board Language: polish
    Have you updated the module software?
    How do you power the circuit?
  • ADVERTISEMENT
  • #3 14791571
    waldemar.podgorski
    Level 9  
    Posts: 34
    Rate: 2
    Board Language: polish
    1. Yes Firmware: AT+GMR 0020000903 compiled @ Nov 29 2014 14:08:27

    2 I have tried different power supplies: via my own 3.3V regulator and also
    via the 3V3 and 5V contact board power module with a 9V pulse power supply connected and also a 12V power supply, as well as a12V power supply stabilised on transformers. And the same.

    The tests were made on three ESP8266-01 modules.
    I've been struggling like this for 3 days now and I'm looking, trying and nothing.
    These time intervals are very similar around 30 seconds.
  • #4 14791610
    piotrva
    VIP Meritorious for electroda.pl
    Posts: 6409
    Help: 625
    Rate: 734
    Board Language: polish
    The firmware is a bit old though.
    I had something similar on one that didn't even connect to the network, but on the latest ones from this site it worked ok http://bbs.espressif.com/viewforum.php?f=5
    I currently have a custom fw.
  • #5 14793664
    waldemar.podgorski
    Level 9  
    Posts: 34
    Rate: 2
    Board Language: polish
    Thank you very much for looking into the problem.
    I tried according to your suggestion but unfortunately it is the same.

    (esp_iot_sdk_v1.1.1_15_06_05) README.TXT:
    download:
    boot_v1.2+.bin 0x00000
    user1.1024.new.2.bin 0x01000
    blank.bin 0x7e000 & 0xfe000

    *NOTICE*: If you use Esp Flash Download Tool, please MAKE SURE to choose FLASH SIZE to 8Mbit.

    Implementation:
    ESP8266-01 - Reset every 30 seconds after AT+CWJAP=SSID,password command
    Code: Dos
    Log in, to see the code
  • #6 14793721
    piotrva
    VIP Meritorious for electroda.pl
    Posts: 6409
    Help: 625
    Rate: 734
    Board Language: polish
    And the power supply?
  • #7 14801036
    waldemar.podgorski
    Level 9  
    Posts: 34
    Rate: 2
    Board Language: polish
    Power supply: Power supply module for 3V3 and 5V contact plates (3.3V setting)with 9V switched-mode power supply connected.

    Added after 3 [hours] 9 [minutes]:

    Other power option- 2 AA batteries

    It's not the power supply's fault because on 2 AA batteries (as:http://www.instructables.com/id/Blink-for-ESP8266-native-like-arduino-using-Window/?ALLSTEPS) also WDT resets the ESP every 30s.
    Maybe it is this batch of ESP8266-01 that is faulty because I bought 3 pieces from Electropark? And the same effect on all of them.
  • #8 14801055
    piotrva
    VIP Meritorious for electroda.pl
    Posts: 6409
    Help: 625
    Rate: 734
    Board Language: polish
    I honestly didn't have such a problem.
    Certainly the first thing was that it was resetting as soon as I connected to WiFi, but for that a software change helped, and for the rest of the ills a better power supply.
    One request here - measure the voltage on the battery power supply (it may be too low)
    And on the other hand usually a switching power supply = a lot of interference....
  • ADVERTISEMENT
  • #9 14803130
    waldemar.podgorski
    Level 9  
    Posts: 34
    Rate: 2
    Board Language: polish
    Powering the ESP8266 with two AA batteries in series; no-load voltage V=3.23V. Under module load 3.15V. Reset now not after 30 seconds but usually around 50.
  • ADVERTISEMENT
  • #10 14803361
    ostrytomasz
    Level 25  
    Posts: 488
    Help: 82
    Rate: 211
    Board Language: polish
    And the simplest programme (blinky: PORT2 toggle attached) works stably?
    Attachments:
    • blinky.7z (180.99 KB) You must be logged in to download this attachment.
  • #11 14803751
    waldemar.podgorski
    Level 9  
    Posts: 34
    Rate: 2
    Board Language: polish
    1. Trial
    I uploaded in this layout.
    ESP8266-01 - Reset every 30 seconds after AT+CWJAP=SSID,password command

    GPIO connection 2---LED---R=1K---GND
    I don't know if this is correct?
    Effect: LED lights up constantly

    2. Trial
    In Arduino Ide
    Code: C / C++
    Log in, to see the code

    Effect: LED flashes but every 30 seconds or so WDT Reset :-(
  • #12 14803968
    ostrytomasz
    Level 25  
    Posts: 488
    Help: 82
    Rate: 211
    Board Language: polish
    Still eagle.irom0text.bin at address 0x40000.
    I don't know how it is in the arduino - since the watchdog is active isn't it required to refresh in this loop?
  • #14 14804245
    ostrytomasz
    Level 25  
    Posts: 488
    Help: 82
    Rate: 211
    Board Language: polish
    I would shoot that this rubbish is text though, just transmitted at a different speed.
    Since the time to reset on power supply and battery power is different then maybe the power supply after all?
    I wouldn't trust the contact board either. Add a 100u capacitor directly to the module power pins. These power supplies and stabiliser are at least 1A capacity?
  • #15 14805135
    waldemar.podgorski
    Level 9  
    Posts: 34
    Rate: 2
    Board Language: polish
    1. Probably maybe not rubbish either. :-) but I checked on baudrate from 300 to 250000. on 4800 there was nothing quiet on others rubbish.
    2. I have 2 circuits assembled: 1 on a contact board the other on a universal board.
    On the universal board it looks like this:
    ESP8266-01 - Reset every 30 seconds after AT+CWJAP=SSID,password command
    3. I was also hoping that these times were changing with the battery and the thing was clarifying, but in further experimentation everything was back to normal to those 30 seconds or so and on the two boards.
    4. My 3.3V power supply on the board with the ESP 8266 is 0.5A (may not be enough) and the contact board is AMS 1117 3.3 (1A).
    5. New approaches:
    (a) I gave power to the ESP on the universal board from the power module (photo : alternative power supply) 3.3V - WDT reset time every 30 seconds
    b) I gave power to the ESP on the universal board from 2 AA batteries (3.19V) - WDT reset time every 30 seconds or so
    6. It's a pity that I don't have a test (laboratory ) power supply so that I could find out if this is the power supply - you can see from this that I need to buy one in the future. But from these experiments it seems that probably not asilization?
    7. I still have an ESP8266 -03 module, but it's without goldpins and with a raster of 2mm, I'm afraid to solder such small ones - and I have a hm... transformer soldering iron, and when I have an IC I usually mount it on a socket, so as not to damage it.
  • #16 14805467
    piotrva
    VIP Meritorious for electroda.pl
    Posts: 6409
    Help: 625
    Rate: 734
    Board Language: polish
    1. Baudrate is outside the "canon" - 7 something there
  • #17 14805510
    ostrytomasz
    Level 25  
    Posts: 488
    Help: 82
    Rate: 211
    Board Language: polish
    waldemar.podgorski wrote:
    1. Probably maybe not rubbish. :-) but I checked on baudrates from 300 to 250000. on 4800 there was nothing quiet on others rubbish.


    An oscilloscope would be useful, even a grandfathered 2x500kSps ARM + USB (cost $4 for a mini-kit, schematic/software found).

    waldemar.podgorski wrote:

    4. My 3.3V power supply on the board with ESP 8266 is 0.5A (may not be enough) and on the contact board is AMS 1117 3.3 (1A).


    This stabiliser does not heat up too much (as SOT-223 with practically no heatsink)?

    Another question: is the CH_PD or RST not hanging around?

    Does the AT firmware only reset after the network connection (assuming blank.bin was uploaded beforehand, by the way I don't know if these addresses are correct: http://www.instructables.com/id/Blink-for-ESP...ing-Window/step2/Upload-latest-firmware-SDK/).

    On http://internetofhomethings.com/homethings/?p=396 there is a suggestion to blur the whole FLASH memory blank.bin.

    I don't think the AT-firmware you're trying to upload is designed for boards with 4Mbit memory, and that's what these ESP-01s are: http://bbs.espressif.com/viewtopic.php?f=16&t=400&start=10 (FOTA removal required, reset symptoms similar).
  • #18 14805615
    waldemar.podgorski
    Level 9  
    Posts: 34
    Rate: 2
    Board Language: polish
    I gave 100uF to the module input - doesn't help
    RST hangs
    CH_PD connected VCC
    AMS 1117 3.3 (1A) - temp 37-38 degrees (slightly warm)
    AT-firmware - various and also internal with nodemcu-flasher-master
    but also with Arduino ide examples with Webserver. on 192.168.1.103 I have:ESP8266 24 T=23.87 Time:20s
    With the Nodecom mcu firmware it is OK until I give the command AT+CWJAP="@HomeCA72",""
  • #19 14807724
    piotrva
    VIP Meritorious for electroda.pl
    Posts: 6409
    Help: 625
    Rate: 734
    Board Language: polish
    Well, be sure to pull up the reset :D
  • #20 14808223
    waldemar.podgorski
    Level 9  
    Posts: 34
    Rate: 2
    Board Language: polish
    1.
    RST to VCC via 10kOhm? - no change effect
    2.
    And also further
    GPIO0 to VCC via 10kOhm - no change effect
    GPIO2 to VCC via 10kOhm - no change effect

    No amian means WDT Reset every 30 seconds
    So that at least this "enchanted" time would change, but no - jammed :-)
  • #21 14835674
    waldemar.podgorski
    Level 9  
    Posts: 34
    Rate: 2
    Board Language: polish
    Progress on problem analysis with WDT reset every 30 seconds
    Test in Arduino.ide:

    Code: C / C++
    Log in, to see the code


    Two cases analysed:

    1. Router enabled: counter (Count) reaches 30 (sometimes
    31, 32) and WDT Reset occurs
    2. Router switched off: the counter (Count) counts without any problem. There is no WDT Reset.

    And what is the issue here?
  • #22 14845830
    waldemar.podgorski
    Level 9  
    Posts: 34
    Rate: 2
    Board Language: polish
    Resolved
    Link


    Quote:
    Problem solved

    There was conflict in the IP addresses in my routers.
    Both had 192.168.0.1. So far, it somehow didn't bother. I changed the IP of the second one to 192.168.2.1
    And is fine.
    Thank you all for your interest and help.
    I hope that in the future it will help us to look for solutions, not only in our device.
    Solving the problem took me over 3 weeks. I couldn't think of anything else. :)

    Now I have:
    on page 192.168.2.100 the following result ESP8266 46025 T=21.30 Time:4615s
    ESP modules I need for the development of the following page: http://silesia-eco.ue.wroc.pl/Home/EcoHCentralH

    Once again, thank you very much


    Moderated By dondu:

    I have added the text of the indicated post, because links after time are sometimes broken.

ADVERTISEMENT