0

first of all, I want to say that this was my first approach to ESP wifi modules. I was programing this module using the AT commands and everything was perfect until I changed the baud rate of my module using AT+UART=9600,8,1,0,0 fromhttps://bbs.espressif.com/viewtopic.php?t=6109. From there, I started searching for the reason why it was going wrong. Then, I thought that maybe the firmware got corrupted. Then, I found a tutorial to flash the firmware https://www.instructables.com/id/ESP-12F-Flashing-AT-Firmware/. I followed, and at first view, everything was okay. But then I saw that not all the commands were working good, so I went to the documentation of what I had installed to the module and I found this (its the fragment I used)

. Read me note(this is not in the tutorial but in the folder):

BOOT MODE

download: //I tried both versions

Flash size 32Mbit: 512KB+512KB

boot_v1.2+.bin 0x00000

user1.1024.new.2.bin 0x01000

esp_init_data_default.bin 0x3fc000 (optional)

blank.bin 0x7e000 & 0x3fe000

Flash size 32Mbit-C1: 1024KB+1024KB

boot_v1.2+.bin 0x00000

user1.2048.new.5.bin 0x01000

esp_init_data_default.bin 0x3fc000 (optional)

blank.bin 0xfe000 & 0x3fe000

.

Update steps

1.Make sure TE(terminal equipment) is in sta or sta+ap mode ex.

AT+CWMODE=3
    OK

2.Make sure TE got ip address ex.

AT+CWJAP="ssid","12345678"
    OK

AT+CIFSR
192.168.1.134
  1. Let's update ex.

AT+CIUPDATE

        +CIPUPDATE:1    //found server

        +CIPUPDATE:2    //connect server

        +CIPUPDATE:3    //got edition

        +CIPUPDATE:4    //start start
    
        OK

note. If there are mistakes in the updating, then break update and print ERROR. .

. END OF THE README NOTE .

What I put and what I received

AT+CWMODE=3
OK

.

AT+CWJAP="SSID","PASSWORD"
strange characters

I tried different times, and I got different answers such as WIFI DISCONNECTED, OK or WIFI CONNECTED GOT IP (Maybe its because the responses with 512KB+512KB and 1024KB+1024KB are different, I don't think so, but I don't know). .

AT+CIFSR
APIP,"192.168.4.1"
+CIFSR:APMAC,"f6:cf:a2:d1:3e:38

.

AT+CIUPDATE

With this last command, it happened to me three different things

Case 1

    +CIPUPDATE:1    

    +CIPUPDATE:2    

    +CIPUPDATE:3    

    +CIPUPDATE:3    

    +CIPUPDATE:4    //only sometimes
    
    ERROR //Sometimes after +CIPUPDATE:1, +CIPUPDATE:2, +CIPUPDATE:3 OR +CIPUPDATE:4 

Case 2 It does nothing or it sends +CIPUPDATE:n but with garbage characters

Case 3 After sending AT+CIUPDATE it sometimes sends

`

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

foad |:000800, vY⸮b⸮⸮⸮⸮⸮⸮⸮j tXM⸮j ,k⸮յ⸮⸮⸮⸮"5 load 0x3ffe8000, len ⸮b⸮⸮⸮⸮⸮⸮j tX]⸮⸮i ,kkյ⸮⸮⸮5 ho 0 talm 18 ta4 2 1I H a
2correct flash map Fatal exception (28):`

I send fatal error(28). I have looked for it https://www.espressif.com/sites/default/files/documentation/esp8266_reset_causes_and_common_fatal_exception_causes_en.pdf, but I don't know what I should do (Because I didn't use the user1.1024.new.2.bin that time)

I had spent more than 2 weeks with this, and I have 3 modules blocked like that, so it will be amazing if someone can help me.

Thanks

Miquel

19Miquel
  • 21
  • 5
  • download AT 1.7.4 here https://www.espressif.com/en/support/download/at?keys=&field_type_tid%5B%5D=14 and flash it with this command `esptool.py write_flash --flash_size 2MB-c1 0x0 boot_v1.7.bin 0x01000 at/1024+1024/user1.2048.new.5.bin 0x1fb000 blank.bin 0x1fc000 esp_init_data_default_v08.bin 0xfe000 blank.bin 0x1fe000 blank.bin` – Juraj Jul 25 '20 at 09:56
  • @Juraj thanks for replaying. I still have some doubts. First of all, where can I find this `esptool.py`? (I mean, my flashing tool does not have 2MB-c1, it only has 2MB). `boot_v1.7.bin 0x01000 `, `at/1024+1024/user1.2048.new.5.bin 0x1fb000`, `blank.bin 0x1fc000`, `esp_init_data_default_v08.bin 0xfe000`, `blank.bin 0x1fe000`. Like this? Thanks for helping. – 19Miquel Jul 25 '20 at 20:06
  • https://github.com/espressif/esptool/releases – Juraj Jul 26 '20 at 06:20
  • @Juraj I have done what you said, and the cmd ended the transmission with `Leaving... Hard resetting via RTS pin...`, its what it's supposed to say?. After this, I need to do AT+CIUPDATE, or its not necessary? Thanks – 19Miquel Jul 26 '20 at 10:35
  • the esptool sends a reset signal after upload, but it works only if auto reset is wired. there is a command line option to do a software reset. why would you update? you just uploaded a version you want to use – Juraj Jul 26 '20 at 12:01
  • @Juraj, it's working well, but I have some questions. First, how did you know which file use and his assigned direction? And secondly, when I send AT commands to my module, it gives to me lots of garbage characters, and It doesn't respond to me to some commands like `AT+CWJAP="SSID","password"` (but it connects to the network). Its that normal or there is something going wrong? Thanks – 19Miquel Jul 26 '20 at 15:24
  • the address in flash are with the AT firmware in README.md or in AT firmware reference pdf. garbage characters are from not matching or too high baud rate – Juraj Jul 26 '20 at 16:08
  • @Juraj, and whyuse the 2MB-c1 flash and not the other? – 19Miquel Jul 26 '20 at 17:56
  • because the bin is build with 2MB-c1 partitioning. the Flash Download Tool corrects it. esptool.py does not. – Juraj Jul 26 '20 at 18:01
  • @Juraj, sorry for asking that much, but I don't get it. I think that when I used the official tool, it said that my ESP8288 F-12 has 32MB. Why with 2MB did it work and with the other no? Many thanks – 19Miquel Jul 27 '20 at 11:08
  • by "official tool" you mean Flash Download Tool? this tool modifies the binary before flashing it. it sets the corresponding bytes in the binary so the code then knows it runs on 4 MB flash and has 26 MHz crystal and some of the other setting important at runtime. but the AT firmware code doesn't need the 4 MB.it runs good on 2 MB – Juraj Jul 27 '20 at 11:44
  • @Juraj, okay, that's clear. Many many thanks for your help. – 19Miquel Jul 27 '20 at 20:54
  • @Juraj, where did you found the 2MB-c1 flash? I can't found it at the readme. Thanks – 19Miquel Jul 27 '20 at 21:16
  • I don't remember where I saw it. It is possible it was about not being flashable to 1 MB flash. You can find many details about flashing here https://github.com/espressif/esptool and here https://github.com/espressif/esptool/wiki – Juraj Jul 28 '20 at 03:48
  • @Juraj, thanks for the links, I will have a look. Thanks a lot. Miquel – 19Miquel Jul 28 '20 at 18:30

0 Answers0