Page 1 of 1

I can't copy the firmware of ESP-01 module

Posted: Tue Oct 15, 2024 8:25 pm
by Atomic Roland
Hi,

I am using the ESP-01 modules for a WiFi board on my Acorn Electron, Atom, BBC Micro and System series. Up until recently, all the modules I bought worked fine but the last batch I bought has a different firmware. They report AT Version 0.21.0.0 and they often crash because of a software watchdog issue. I still have a very few working modules with firmware AT Version 1.2.0.0 so I tried to copy this firmware into the broken modules.

I used esptool.py to read the flash memory with the command

Code: Select all

esptool.py -p /dev/ttyUSB0 -b 115200 read_flash 0 0x100000 v1.2.0.0_AT_Firmware.bin
And I got a binary file of 1Mb. Then I flashed this file into a broken device with:

Code: Select all

esptool.py -p /dev/ttyUSB0 -b 115200 write_flash 0x000000 v1.2.0.0_AT_Firmware.bin
Programming runs without errors and when I read back the newly programmed device I get exactly the same firmware, I checked this with a MD5 hash. However, the newly programmed device is not working. When I connect with minicom it only outputs garbage on every baud rate I tried. Both modules have a T25S80 EEPROM.

Does somebody know what I am doing wrong?

Thanks in advance,
Roland

Re: I can't copy the firmware of ESP-01 module

Posted: Thu Oct 17, 2024 7:19 pm
by AcmeUK
it only outputs garbage on every baud rate I tried.
Have you tried 74880?
Why? See Here

Re: I can't copy the firmware of ESP-01 module

Posted: Fri Oct 18, 2024 6:31 pm
by Atomic Roland
Thank you for this hint. I am now able to see what the module is telling me:

Code: Select all

 ets Jan  8 2013,rst cause:2, boot mode:(3,6)

load 0x40100000, len 1856, room 16 
tail 0
chksum 0x63
load 0x3ffe8000, len 776, room 8 
tail 0
chksum 0x02
load 0x3ffe8310, len 552, room 8 
tail 0
chksum 0x79
csum 0x79

2nd boot version : 1.5                                                          
  SPI Speed      : 40MHz                                                        
  SPI Mode       : DOUT                                                         
  SPI Flash Size & Map: 8Mbit(512KB+512KB)                                      
jump to run user1 @ 1000                                                        
                                                                                
rf cal sector: 249                                                              
rf[112] : 00                                                                    
rf[113] : 00                                                                    
rf[114] : 01                                                                    
                                                                                
SDK ver: 1.5.4.1(39cb9a32) compiled @ Jul  1 2016 20:04:35                      
phy ver: 972, pp ver: 10.1                                                      
                                                                                
mode : sta(c8:2b:96:00:a1:8e)                                                   
add if0                                                                         
scandone                                                                        
state: 0 -> 2 (b0)                                                              
state: 2 -> 3 (0)                                                               
state: 3 -> 5 (10)                                                              
add 0                                                                           
aid 2                                                                           
cnt                                                                             
                                                                                
connected with <My SSID>, channel 1                                      
dhcp client start...                                                            
ip:192.168.2.149,mask:255.255.255.0,gw:192.168.2.254                            
pm open,type:2 0                                                                
But then it hangs. I cannot give any AT commands. Any further clues?

Re: I can't copy the firmware of ESP-01 module

Posted: Sun Oct 27, 2024 5:55 pm
by rin67630
Why did you read from 0x100000 but write to 0x000000?

Re: I can't copy the firmware of ESP-01 module

Posted: Mon Oct 28, 2024 11:28 am
by Atomic Roland
AFAIK I am reading from 0x000000,

Code: Select all

esptool.py -p /dev/ttyUSB0 -b 115200 read_flash 0 0x100000 v1.2.0.0_AT_Firmware.bin
Please note there is a 0 between the read_flash and 0x100000 and that is the address, 0x100000 is the length of the data to read.

Re: I can't copy the firmware of ESP-01 module

Posted: Wed Oct 30, 2024 5:51 pm
by AcmeUK
Have you tried loading an up to date version of the AT firmware?
If that does not solve your issue, try installing one of older firmware versions.

Re: I can't copy the firmware of ESP-01 module

Posted: Sun Nov 17, 2024 1:07 pm
by Atomic Roland
I have found an image (build v1.3.0.2 AT version 0.40.0) which I can program and runs fine in my WiFi board for the Electron. So the main problem is solved but still I don't understand why it not just a matter of reading the contents of a known working module and copy it to another module while the specs of both modules are equal.

Thanks for all your replies and time.