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

Atomic Roland
Posts: 4
Joined: Tue Oct 15, 2024 8:07 pm

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

Postby Atomic Roland » Tue Oct 15, 2024 8:25 pm

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

AcmeUK
Posts: 23
Joined: Wed Dec 06, 2023 5:14 pm

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

Postby AcmeUK » Thu Oct 17, 2024 7:19 pm

it only outputs garbage on every baud rate I tried.
Have you tried 74880?
Why? See Here

Atomic Roland
Posts: 4
Joined: Tue Oct 15, 2024 8:07 pm

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

Postby Atomic Roland » Fri Oct 18, 2024 6:31 pm

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?

rin67630
Posts: 141
Joined: Sun Mar 11, 2018 5:13 pm

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

Postby rin67630 » Sun Oct 27, 2024 5:55 pm

Why did you read from 0x100000 but write to 0x000000?

Atomic Roland
Posts: 4
Joined: Tue Oct 15, 2024 8:07 pm

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

Postby Atomic Roland » Mon Oct 28, 2024 11:28 am

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.

AcmeUK
Posts: 23
Joined: Wed Dec 06, 2023 5:14 pm

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

Postby AcmeUK » Wed Oct 30, 2024 5:51 pm

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.

Atomic Roland
Posts: 4
Joined: Tue Oct 15, 2024 8:07 pm

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

Postby Atomic Roland » Sun Nov 17, 2024 1:07 pm

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.

Who is online

Users browsing this forum: No registered users and 7 guests