Resetting Wemos d1 mini, howto?

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
marmachine
New user
Posts: 5
Joined: 30 Dec 2019, 00:14

Resetting Wemos d1 mini, howto?

#1 Post by marmachine » 20 Feb 2022, 13:30

Hi Folks,

I'm kinda stuck after i've messed up my config.
My Wemos is unable to connect to wifi, so i am unable to get to the webconfig
Flashing a new image doesn't work since it seems to be in some loop, trying to connect, but failing over and over.
How can i fully reset and put a new image on the device?
Connecting RX+TX and then reboot doesn't work either.

User avatar
Ath
Normal user
Posts: 3519
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Resetting Wemos d1 mini, howto?

#2 Post by Ath » 20 Feb 2022, 13:40

Can you connect it to your USB port and start the Monitor command from the ESPEasy flasher? Then you can see the log that is enabled, unless you disabled that of course.
If you have another terminal program like Putty or Windows Terminal, then you can connect to that COM port at 115200 baud, and you can see the log, but also type commands as if you had the Tools tab available, except you can't use back-space to correct your typing, so better prepare in an editor, then send (copy/paste) these commands:

Code: Select all

wifissd,<your access-point name>
wifikey,<your access-point password>
wificonnect
(Each line should be followed by pressing Enter. Don't worry if the log output crashes through your input, the ESP doesn't read that output as input.)
After that you should be able to connect to the UI, the log should show the IP address for the unit during the connect-phase.

NB: If any of the access-point name or password contain spaces, you should add quotes around that name/password, like "AP name"
/Ton (PayPal.me)

marmachine
New user
Posts: 5
Joined: 30 Dec 2019, 00:14

Re: Resetting Wemos d1 mini, howto?

#3 Post by marmachine » 20 Feb 2022, 22:32

Would there be any other way to kill and clean the entire setup? (this is not working, keeps looping)

User avatar
Ath
Normal user
Posts: 3519
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Resetting Wemos d1 mini, howto?

#4 Post by Ath » 20 Feb 2022, 22:37

You can flash the blank_4MB.bin file via serial onto the device, after that you can flash the desired .bin file on it. That should fix it.

Just curious, do you have any log of the looping? I assume you've got the serial connected, so that should be easy to get.
/Ton (PayPal.me)

marmachine
New user
Posts: 5
Joined: 30 Dec 2019, 00:14

Re: Resetting Wemos d1 mini, howto?

#5 Post by marmachine » 20 Feb 2022, 22:56

Flashing isn't succesfull either... since it is busy looping i guess...
The issue is caused by setting the static IP address, since i did that the connection is failing and ESP keeps retrying

The serialmonitor shows this:

....
130089 : Info : WIFI : Connecting <ssidname> attempt #27
130090 : Info : IP : Static IP : 192.168.2.118 GW: (IP unset) SN: (IP unset) DNS: (IP unset)
131261 : Info : DHT : No Reading
134298 : Info : WIFI : Disconnected! Reason: '(2) Auth expire' Connected for 4073 ms
134415 : Info : WIFI : Connecting <ssidname> attempt #28
134415 : Info : IP : Static IP : 192.168.2.118 GW: (IP unset) SN: (IP unset) DNS: (IP unset)
138610 : Info : WIFI : Disconnected! Reason: '(2) Auth expire' Connected for 4072 ms
138726 : Info : WIFI : Connecting <ssidname> attempt #29
138727 : Info : IP : Static IP : 192.168.2.118 GW: (IP unset) SN: (IP unset) DNS: (IP unset)
142149 : Info : DHT : No Reading
142925 : Info : WIFI : Disconnected! Reason: '(2) Auth expire' Connected for 4072 ms
143041 : Info : WIFI : Connecting <ssidname> attempt #30
143042 : Info : IP : Static IP : 192.168.2.118 GW: (IP unset) SN: (IP unset) DNS: (IP unset)
...

marmachine
New user
Posts: 5
Joined: 30 Dec 2019, 00:14

Re: Resetting Wemos d1 mini, howto?

#6 Post by marmachine » 20 Feb 2022, 22:58

Update: the blank_4MB.bin seems to work (currently flashing)

User avatar
Ath
Normal user
Posts: 3519
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Resetting Wemos d1 mini, howto?

#7 Post by Ath » 20 Feb 2022, 23:15

marmachine wrote: 20 Feb 2022, 22:56 134415 : Info : WIFI : Connecting <ssidname> attempt #28
Hm, I was trying to suggest to put your actual SSID in, or did you replace it in this log?
marmachine wrote: 20 Feb 2022, 22:56 The issue is caused by setting the static IP address, since i did that the connection is failing and ESP keeps retrying
For a static IP address, it has to be accepted by your DHCP server as in-range, and the Gateway, Subnet and DNS settings have all to be set correctly (all my ESP's have a fixed IP, and that has worked fine for me for years). If these terms mean nothing to you, then better leave it at DHCP.
/Ton (PayPal.me)

marmachine
New user
Posts: 5
Joined: 30 Dec 2019, 00:14

Re: Resetting Wemos d1 mini, howto?

#8 Post by marmachine » 20 Feb 2022, 23:23

Yes i replaced it in the log that i just shared (not to expose the actual SSID)
It did work without a fixed IP, but that actually is the whole issue where it all started.
I have several Wemos devices running and i want to keep my DHCP devices organised, so in my network controller i've assigned them a fixed IP.
I was expecting that they would hop onto the assigned IP but actually none of them does that. They all seem to stick to their first (DHCP) assigned address.
Actually just wanted to see if forcing them this way would help... well, guess not.
It remains unknow what is happening, maybe my network switch or gateway should be provided or rebooted, sometimes Unifi is a mystery to me

User avatar
Ath
Normal user
Posts: 3519
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Resetting Wemos d1 mini, howto?

#9 Post by Ath » 21 Feb 2022, 07:52

marmachine wrote: 20 Feb 2022, 22:56 134415 : Info : IP : Static IP : 192.168.2.118 GW: (IP unset) SN: (IP unset) DNS: (IP unset)
Your log shows the empty settings for Gateway, Subnet mask and DNS.
This is how I have my devices set up, with different Static IP's of course
Screenshot - 21-02-2022 , 07_42_37.png
Screenshot - 21-02-2022 , 07_42_37.png (16.15 KiB) Viewed 16036 times
Usually, these values are the same as what you get from DHCP, so you can copy them from there.
Windows and Linux-like OS's will show these values when running ipconfig or ifconfig commands from a dos prompt or terminal.

The Gateway usually is assigned to the x.x.x.1 address
The Subnet mask for the 192.168.x.x IP ranges normally is 255.255.255.0
Very often, the DNS is provided by the router, so it is the same address as the Gateway, but it can be something totally different.
/Ton (PayPal.me)

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 109 guests