Unable to flash 4M1M to D1 mini

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
HenrysCat
New user
Posts: 7
Joined: 15 Mar 2023, 12:40

Unable to flash 4M1M to D1 mini

#1 Post by HenrysCat » 15 Mar 2023, 12:47

Hi all, I tried to write ESP_Easy_mega_20230304_normal_ESP8266_4M1M and it never created a WiFi access point, tried many times on D1 and NodeMCU, but when I tried ESP_Easy_mega_20230304_normal_ESP8266_1M it worked first time.
I found the explanation for each on the github page and wondered if there is any disadvantage or missing functionality using 1M rather than 4M1M version?

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

Re: Unable to flash 4M1M to D1 mini

#2 Post by Ath » 15 Mar 2023, 14:04

Depending on what was previously installed on the unit, it may be needed to first flash the blank_4MB.bin file, as some WiFi-related data is stored near the end of the flash (By the Arduino library functions), that may need to be wiped before it will actually work as intended.
After flashing the blank_4MB.bin file you can again flash the 4M1M.bin file, and it should then present the WiFi AP as usual.

The disadvantage of the 1M.bin version is that you can't update the firmware via the OTA method (Over The Air), and some core features are disabled to have it fit in the smaller available space for code.
/Ton (PayPal.me)

HenrysCat
New user
Posts: 7
Joined: 15 Mar 2023, 12:40

Re: Unable to flash 4M1M to D1 mini

#3 Post by HenrysCat » 15 Mar 2023, 14:14

Good to know, I will try the blank_4MB.bin file
Thanks

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Unable to flash 4M1M to D1 mini

#4 Post by TD-er » 15 Mar 2023, 16:52

Can you also check on the sysinfo page what flash size is detected?

The main disadvantage of 1M builds is that you can't update them via the webinterface.
Apart from that those builds are made with "LIMIT_BUILD_SIZE" defined which strips out quite a lot of nice-to-have features.

HenrysCat
New user
Posts: 7
Joined: 15 Mar 2023, 12:40

Re: Unable to flash 4M1M to D1 mini

#5 Post by HenrysCat » 15 Mar 2023, 16:56

This part?
espeasy.JPG
espeasy.JPG (61.09 KiB) Viewed 1331 times

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Unable to flash 4M1M to D1 mini

#6 Post by TD-er » 15 Mar 2023, 17:05

Yep and exactly what I wanted to know :)
The flash brand isn't PUYA (unless they now use a different vendor ID) and it is indeed 4M flash.

The "PUYA patch" isn't present in 4M builds, as there have not yet been flash chips > 1M which act as strange as PUYA does.
So that could have been one of the reasons why a 4M build might not have worked, but an 1M build does.

So I totally agree with Ton's suggestion to wipe the flash completely using a "blank" image of 4M and then write a 4M build to it.

HenrysCat
New user
Posts: 7
Joined: 15 Mar 2023, 12:40

Re: Unable to flash 4M1M to D1 mini

#7 Post by HenrysCat » 15 Mar 2023, 19:04

Tried the blank image then the 4M no access point again, reflashed 1M all good, tried a NodeMCU I have also, exactly the same, blank 4M image > 4M, nothing > 1M all good.

NodeMCU below.
NodeMCU.JPG
NodeMCU.JPG (62.47 KiB) Viewed 1323 times

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Unable to flash 4M1M to D1 mini

#8 Post by TD-er » 15 Mar 2023, 19:09

Can you use some terminal program to look at the console via serial after flashing a 4M image to see what is stated in the logs?
Right now I have no clue where it may halt.

If it is not able to make a file system, then it might be something related to the PUYA like behavior, or maybe flash frequency.

Without any idea of what the logs may show, I have no clue.

HenrysCat
New user
Posts: 7
Joined: 15 Mar 2023, 12:40

Re: Unable to flash 4M1M to D1 mini

#9 Post by HenrysCat » 15 Mar 2023, 19:36

TD-er wrote: 15 Mar 2023, 19:09 Can you use some terminal program to look at the console via serial after flashing a 4M image to see what is stated in the logs?
How do I do that? I'll do it if it's helpful to you, otherwise I'll stick with 1M, my Senseair S8 works with ok it, just need to figure out how to get that data to influxdb now, but that's for another thread ;)

I am using ESP Easy Flasher 0.04.007, when I click 'Open serial monitor' at bottom it just says 'COM port not available for flashing as long as this conection is open' and thats it.

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Unable to flash 4M1M to D1 mini

#10 Post by TD-er » 15 Mar 2023, 22:04

Just unplug the ESP so you can be sure no program is still trying to use the serial port.
Then you can use just any terminal tool (for example Putty) to interface to the serial port.
Or just use the web flasher: https://td-er.nl/ESPEasy/
The latest version now also supports a console.

You need to use Edge or Chrome on Windows to use this web flasher.

HenrysCat
New user
Posts: 7
Joined: 15 Mar 2023, 12:40

Re: Unable to flash 4M1M to D1 mini

#11 Post by HenrysCat » 16 Mar 2023, 11:02

It seems to endlessly scroll but here is a sample.

Code: Select all

�U177 : Info   : WIFI : Set WiFi to AP+STA
4956 : Info   : WIFI : Set WiFi to OFF
5173 : Info   : INIT : Free RAM:26760
5175 : Info   : INIT : Manual Reboot #2 Last Action before Reboot: Intended Reboot: ResetFactory Last systime: 86 - Restart Reason: External System
5176 : Info   : FS   : Mounting...
5202 : Info   : FS   : Mount successful, used 75802 bytes of 957314
5221 : Info   : CRC  : Settings CRC           ...OK
5224 : Info   : CRC  : SecuritySettings CRC   ...OK 
5227 : Info   : INIT : I2C
5229 : Info   : INIT : SPI not enabled
5334 : Info   : WIFI : Set WiFi to STA
5438 : Info   : WiFi : Start network scan all channels
7623 : Info   : WiFi : Scan finished, found: 6
7625 : Info   : WiFi : Start network scan all channels
9809 : Info   : WiFi : Scan finished, found: 7
9912 : Info   : WIFI : Set WiFi to AP+STA
10904 : Info   : WIFI : AP Mode ssid will be ESP-Easy with address 192.168.4.1
10905 : Info   : WiFi : Start network scan all channels
13090 : Info   : WiFi : Scan finished, found: 7
13093 : Info   : WiFi : WifiDisconnect()
13194 : Info   : WIFI : Disconnected! Reason: '(1) Unspecified'
13195 : Info   : WIFI : Arduino wifi status: WL_IDLE_STATUS 0 ESPeasy internal wifi status: DISCONNECTED
13295 : Info   : Reset WiFi.
13297 : Info   : WiFi : Start network scan all channels
15481 : Info   : WiFi : Scan finished, found: 6
15584 : Info   : WIFI : Arduino wifi status: WL_IDLE_STATUS 0 ESPeasy internal wifi status: DISCONNECTED
15584 : Info   : WIFI : Set WiFi to OFF
15698 : Info   : INIT : Free RAM:24560
15773 : Info   : INFO : Plugins: 47 [Normal] (ESP82xx Core 2843a5ac, NONOS SDK 2.2.2-dev(38a443e), LWIP: 2.1.2 PUYA support)
15878 : Info   : WIFI : Set WiFi to STA
15981 : Info   : WiFi : Start network scan all channels
18166 : Info   : WiFi : Scan finished, found: 7
18269 : Info   : WIFI : Set WiFi to AP+STA
18377 : Info   : WIFI : AP Mode ssid will be ESP-Easy with address 192.168.4.1
18378 : Error  : WIFI : No valid wifi settings
18379 : Info   : WiFi : Start network scan all channels
20563 : Info   : WiFi : Scan finished, found: 7
20566 : Info   : WiFi : Start network scan all channelsrl l�r$�n�l�b|���rb�b�nnlnnbbp�$blrlp�n�l�bn�n�lb��nn'l�l`�nnl`nr���nbl`r��nbl`�b�l�lr�`��nb�U178 : Info   : WIFI : Set WiFi to AP+STA
4957 : Info   : WIFI : Set WiFi to OFF
5174 : Info   : INIT : Free RAM:26760
5176 : Info   : INIT : Manual Reboot #3 Last Action before Reboot: Intended Reboot: ResetFactory Last systime: 86 - Restart Reason: External System
5177 : Info   : FS   : Mounting...
5203 : Info   : FS   : Mount successful, used 75802 bytes of 957314
5222 : Info   : CRC  : Settings CRC           ...OK
5225 : Info   : CRC  : SecuritySettings CRC   ...OK 
5229 : Info   : INIT : I2C
5230 : Info   : INIT : SPI not enabled
5335 : Info   : WIFI : Set WiFi to STA
5439 : Info   : WiFi : Start network scan all channels
7624 : Info   : WiFi : Scan finished, found: 7
7626 : Info   : WiFi : Start network scan all channels
9810 : Info   : WiFi : Scan finished, found: 6
9913 : Info   : WIFI : Set WiFi to AP+STA
10905 : Info   : WIFI : AP Mode ssid will be ESP-Easy with address 192.168.4.1
10906 : Info   : WiFi : Start network scan all channels
13090 : Info   : WiFi : Scan finished, found: 5
13093 : Info   : WiFi : WifiDisconnect()
13194 : Info   : WIFI : Disconnected! Reason: '(1) Unspecified'
13194 : Info   : WIFI : Arduino wifi status: WL_IDLE_STATUS 0 ESPeasy internal wifi status: DISCONNECTED
13295 : Info   : Reset WiFi.
13297 : Info   : WiFi : Start network scan all channels
15481 : Info   : WiFi : Scan finished, found: 6
15583 : Info   : WIFI : Arduino wifi status: WL_IDLE_STATUS 0 ESPeasy internal wifi status: DISCONNECTED
15584 : Info   : WIFI : Set WiFi to OFF
15698 : Info   : INIT : Free RAM:24560
15776 : Info   : INFO : Plugins: 47 [Normal] (ESP82xx Core 2843a5ac, NONOS SDK 2.2.2-dev(38a443e), LWIP: 2.1.2 PUYA support)
15881 : Info   : WIFI : Set WiFi to STA
15984 : Info   : WiFi : Start network scan all channels
18169 : Info   : WiFi : Scan finished, found: 7
18272 : Info   : WIFI : Set WiFi to AP+STA
18380 : Info   : WIFI : AP Mode ssid will be ESP-Easy with address 192.168.4.1
18382 : Error  : WIFI : No valid wifi settings
18382 : Info   : WiFi : Start network scan all channels
20568 : Info   : WiFi : Scan finished, found: 6
20570 : Info   : WiFi : Start network scan all channels
22754 : Info   : WiFi : Scan finished, found: 6
22757 : Info   : WIFI : Arduino wifi status: WL_IDLE_STATUS 0 ESPeasy internal wifi status: DISCONNECTED
22760 : Info   : Webserver: start
24103 : Info   : WD   : Uptime 0 ConnectFailures 0 FreeMem 18632 WiFiStatus WL_IDLE_STATUS 0 ESPeasy internal wifi status: DISCONNECTED
rl l�r$�n�l�b|���rb�b�nnlnn2bbp�$blrlp�n��l�bn�n�lb��nn'l�l`�nnl`nr���nbl`r��nbl`�b�l�lr�`��nb�U177 : Info   : WIFI : Set WiFi to AP+STA
4955 : Info   : WIFI : Set WiFi to OFF
5172 : Info   : INIT : Free RAM:26824
5174 : Info   : INIT : Manual Reboot #4 Last Action before Reboot: Const Interval: TIMER_100MSEC Last systime: 48 - Restart Reason: External System
5175 : Info   : FS   : Mounting...
5200 : Info   : FS   : Mount successful, used 75802 bytes of 957314
5220 : Info   : CRC  : Settings CRC           ...OK
5223 : Info   : CRC  : SecuritySettings CRC   ...OK 
5226 : Info   : INIT : I2C
5228 : Info   : INIT : SPI not enabled
5333 : Info   : WIFI : Set WiFi to STA
5437 : Info   : WiFi : Start network scan all channels
7621 : Info   : WiFi : Scan finished, found: 7
7624 : Info   : WiFi : Start network scan all channels
9808 : Info   : WiFi : Scan finished, found: 6
9911 : Info   : WIFI : Set WiFi to AP+STA
10903 : Info   : WIFI : AP Mode ssid will be ESP-Easy with address 192.168.4.1
10905 : Info   : WiFi : Start network scan all channels
13089 : Info   : WiFi : Scan finished, found: 6
13091 : Info   : WiFi : WifiDisconnect()
13192 : Info   : WIFI : Disconnected! Reason: '(1) Unspecified'
13193 : Info   : WIFI : Arduino wifi status: WL_IDLE_STATUS 0 ESPeasy internal wifi status: DISCONNECTED
13294 : Info   : Reset WiFi.
13295 : Info   : WiFi : Start network scan all channels
15480 : Info   : WiFi : Scan finished, found: 8
15583 : Info   : WIFI : Arduino wifi status: WL_IDLE_STATUS 0 ESPeasy internal wifi status: DISCONNECTED
15583 : Info   : WIFI : Set WiFi to OFF
15697 : Info   : INIT : Free RAM:24560
15773 : Info   : INFO : Plugins: 47 [Normal] (ESP82xx Core 2843a5ac, NONOS SDK 2.2.2-dev(38a443e), LWIP: 2.1.2 PUYA support)
15878 : Info   : WIFI : Set WiFi to STA
15981 : Info   : WiFi : Start network scan all channels
18167 : Info   : WiFi : Scan finished, found: 6
18270 : Info   : WIFI : Set WiFi to AP+STA
18378 : Info   : WIFI : AP Mode ssid will be ESP-Easy with address 192.168.4.1
18380 : Error  : WIFI : No valid wifi settings
18380 : Info   : WiFi : Start network scan all channels
20565 : Info   : WiFi : Scan finished, found: 7
20567 : Info   : WiFi : Start network scan all channels
22752 : Info   : WiFi : Scan finished, found: 8
22755 : Info   : WIFI : Arduino wifi status: WL_IDLE_STATUS 0 ESPeasy internal wifi status: DISCONNECTED
22757 : Info   : Webserver: start
24101 : Info   : WD   : Uptime 0 ConnectFailures 0 FreeMem 18568 WiFiStatus WL_IDLE_STATUS 0 ESPeasy internal wifi status: DISCONNECTED
54100 : Info   : WD   : Uptime 1 ConnectFailures 0 FreeMem 18568 WiFiStatus WL_IDLE_STATUS 0 ESPeasy internal wifi status: DISCONNECTED

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Unable to flash 4M1M to D1 mini

#12 Post by TD-er » 16 Mar 2023, 12:36

Looks like a power supply issue, given the 1M build does work on these.
Can you test with another USB cable?
And preferrably on a (better) powered USB port, like a powered USB hub or USB3 port (those can deliver upto 900 mA)

Some units sold as "Wemos D1 mini" have really poor quality voltage regulators, which may just not be able to handle the current draw required by the WiFi.
On 1M builds there is some extra delay before starting WiFi, because quite a lot 1M nodes like Sonoff Basic have really poor power supply designs.

HenrysCat
New user
Posts: 7
Joined: 15 Mar 2023, 12:40

Re: Unable to flash 4M1M to D1 mini

#13 Post by HenrysCat » 16 Mar 2023, 18:58

Yes that works, I plugged it in to my Anker 60W PowerPort and it showed the access point with 4M flash, once it's conected to home WiFi I can then plug back in to the PC USB port and it works fine, guess it just needs the extra power to create an access point.

Thanks fo your help :)

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Unable to flash 4M1M to D1 mini

#14 Post by TD-er » 16 Mar 2023, 20:37

You can enable the "ECO" mode on the tools->Advanced page to reduce the load on the voltage regulator.

Post Reply

Who is online

Users browsing this forum: No registered users and 23 guests