loboris / ESP8266_AT_LoBo

New ESP8266 AT-Firmware with many added features
Other
39 stars 4 forks source link

First time boot error + no AT response (ESP only echoes it) #1

Closed Najsr closed 5 years ago

Najsr commented 5 years ago

Hello, after flashing your firmware and rebooting for the first time I get this:

LoBo ESP8266 Bootloader v1.2.0
==============================
   Flash map: 4, 4MB (512+512)
  Flash mode: QIO
Reset reason: WDT

No configured firmware found, check all...
  Address: 001000
    Wrong MD5, updating
    Default firmware set
    Config sector saved
    Selected as default
  Address: 081000
    No firmware
  Address: 101000
    No firmware
  Address: 181000
    No firmware
  Address: 201000
    No firmware
  Address: 281000
    No firmware
  Address: 301000
    No firmware
  Address: 381000
    No firmware
Starting firmware 0, map 4 from 001000...

Boot mmap: 0,0,0

ready

But that's not the main problem because I am unable to send it any messages. It seems like it is echoing every input I send to it. Could you please tell me how to fix it?

uzi18 commented 5 years ago

as you can see you need to flash LoBos AT firmware at 0x1000

Najsr commented 5 years ago

Could you please tell me where in the flash.sh script it is located? Thanks

Najsr commented 5 years ago

This is the flash log. Is it ok that ESPTool says 0x00001000? Because the shell script reports 0x001000

==========================
Flashing ESP8266 firmware:
--------------------------
  Flash type: 4MB
  Flash mode: qio
   Partition: 0
     Address: 0x001000
    Firmware: '../bin/upgrade/esp8266_AT_1_4.bin'
 Erase Flash: 'yes'
================================================

esptool.py v2.6
Serial port /dev/ttyUSB0
Connecting....
Detecting chip type... ESP8266
Chip is ESP8266EX
Features: WiFi
MAC: my_mac
Uploading stub...
Running stub...
Stub running...
Erasing flash (this may take a while)...
Chip erase completed successfully in 8.3s
Staying in bootloader.

esptool.py v2.6
Serial port /dev/ttyUSB0
Connecting....
Detecting chip type... ESP8266
Chip is ESP8266EX
Features: WiFi
MAC: my_mac
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Compressed 128 bytes to 75...
Wrote 128 bytes (75 compressed) at 0x000fc000 in 0.0 seconds (effective 170.5 kbit/s)...
Hash of data verified.
Flash params set to 0x0040
Compressed 4080 bytes to 2696...
Wrote 4080 bytes (2696 compressed) at 0x00000000 in 0.1 seconds (effective 523.2 kbit/s)...
Hash of data verified.
Compressed 1684 bytes to 1206...
Wrote 1684 bytes (1206 compressed) at 0x0007b000 in 0.0 seconds (effective 444.7 kbit/s)...
Hash of data verified.
Compressed 432660 bytes to 311614...
Wrote 432660 bytes (311614 compressed) at 0x00001000 in 7.4 seconds (effective 468.7 kbit/s)...
Hash of data verified.

Leaving...
Staying in bootloader.

Finished.
uzi18 commented 5 years ago

ok and now boots ok?

Najsr commented 5 years ago

Well it still the same after the first reboot. So I guess not :(

uzi18 commented 5 years ago

did you tried compiled version from repo or self compiled?

uzi18 commented 5 years ago

@loboris any hints?

Najsr commented 5 years ago

Self compiled. I can upload my code no problem and it works. It is just strange that the AT did not work.

loboris commented 5 years ago

I don't quite understand what is the problem. First, you flash the firmware using the flash.sh script:

boris@UbuntuMate:/home/LoBo2_Razno/MAIX/ESP8266_AT_LoBo/at_lobo$ ./flash.sh

==========================
Flashing ESP8266 firmware:
--------------------------
  Flash type: 4MB
  Flash mode: qio
   Partition: 0
     Address: 0x001000
    Firmware: '../bin/upgrade/esp8266_AT_1_4.bin'
 Erase Flash: 'yes'
================================================

esptool.py v2.6
Serial port /dev/ttyUSB0
Connecting....
Detecting chip type... ESP8266
Chip is ESP8266EX
Features: WiFi
MAC: 5c:cf:7f:0f:7b:96
Uploading stub...
Running stub...
Stub running...
Erasing flash (this may take a while)...
Chip erase completed successfully in 8.2s
Staying in bootloader.

esptool.py v2.6
Serial port /dev/ttyUSB0
Connecting....
Detecting chip type... ESP8266
Chip is ESP8266EX
Features: WiFi
MAC: 5c:cf:7f:0f:7b:96
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Compressed 128 bytes to 75...
Wrote 128 bytes (75 compressed) at 0x000fc000 in 0.0 seconds (effective 321.4 kbit/s)...
Hash of data verified.
Flash params set to 0x0040
Compressed 4080 bytes to 2696...
Wrote 4080 bytes (2696 compressed) at 0x00000000 in 0.1 seconds (effective 487.4 kbit/s)...
Hash of data verified.
Compressed 1684 bytes to 1206...
Wrote 1684 bytes (1206 compressed) at 0x0007b000 in 0.0 seconds (effective 441.3 kbit/s)...
Hash of data verified.
Compressed 432660 bytes to 311615...
Wrote 432660 bytes (311615 compressed) at 0x00001000 in 7.9 seconds (effective 435.6 kbit/s)...
Hash of data verified.

Leaving...
Staying in bootloader.

Finished.

After the flashing the ESP8266 will stay in the bootloader mode and has to be reset. Start some terminal emulator, the included PyTerm.py works well (--reset option can be used to rested the board). After the ready, the board is ready to accept AT commands, type some.

boris@UbuntuMate:/home/LoBo2_Razno/MAIX/ESP8266_AT_LoBo/at_lobo$ ./PyTerm.py --reset
Namespace(baudrate=115200, device='/dev/ttyUSB0', reset=True)

--[ ESP8266 terminal      ver. 1.2.0 ]-- 
--[ Press ESC twice for command mode ]-- 

[???]
[???]
[???]

==============================
LoBo ESP8266 Bootloader v1.2.0
==============================
   Flash map: 4, 4MB (512+512)
  Flash mode: QIO
Reset reason: WDT

No configured firmware found, check all...
  Address: 001000
    Wrong MD5, updating
    Default firmware set
    Config sector saved
    Selected as default
  Address: 081000
    No firmware
  Address: 101000
    No firmware
  Address: 181000
    No firmware
  Address: 201000
    No firmware
  Address: 281000
    No firmware
  Address: 301000
    No firmware
  Address: 381000
    No firmware
Starting firmware 0, map 4 from 001000...

Boot mmap: 0,0,0

ready
AT

OK
AT+GMR
AT version:1.7.0.0(Apr 16 2019 15:31:04)
SDK version:3.1.0-dev(3b41fcf)
Compile time: May  2 2019 13:00:33
ESP8266_AT_LoBo v1.2.4
OK
AT+SYSRAM?
+SYSRAM:52064

OK
AT+CWMODE_DEF=1

OK
AT+CWJAP_DEF="LoBoInternet","1xxxpassyyy"
WIFI CONNECTED
WIFI GOT IP

OK
AT+CIPSTART="TCP","loboris.eu",80
CONNECT

OK
AT+CIPSEND=90

OK
> 
Recv 90 bytes

SEND OK

+IPD,898:HTTP/1.1 200 OK
Date: Tue, 07 May 2019 18:37:49 GMT
Server: Apache/2.4.29 (Ubuntu)
Last-Modified: Thu, 02 May 2019 11:00:42 GMT
ETag: "23e-587e58b8baa80"
Accept-Ranges: bytes
Content-Length: 574
Vary: Accept-Encoding
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: text/plain; charset=UTF-8

ESP8266_AT_LoBo v1.2.4
esp8285_AT_1_2: A8F3872CBA2452F7C309C297FD091D78
esp8285_AT_2_2: ACB09A812A3D481F836FBFFDB2879FEC
esp8266_AT_1_0: 83AF9053F2826A5FA9B2C9AADA5FD7CC
esp8266_AT_1_2: 6BABAE1E5B81E9991E167FA0BBBE8E78
esp8266_AT_2_2: 79918AE57E4D8B53F4FB655628CF20E2
esp8266_AT_1_3: 6D24877DD6F098F889F060B957DB3ECA
esp8266_AT_2_3: 15197F09621F049EB60DC8059D03E3E3
esp8266_AT_1_4: 31810831B387E33A606E0B0E4FA6708B
esp8266_AT_2_4: 026A5D111BDE2388C035AD66E7041B48
esp8266_AT_1_5: 4EEBE7EABAC004266F44BF9375D8898B
esp8266_AT_1_6: 1B642C993CA23CE7F20D6574C67A2BC0
CLOSED

After the > prompth this was pasted:

GET /ESP8266/firmwares/version.txt HTTP/1.0
Host: loboris.eu
Connection: keep-alive
uzi18 commented 5 years ago

@loboris maybe it could be nice to add info like "ESP8266_AT_LoBo v1.2.4/selfcompiled" just before "ready" to have some info about version? I'm sure more users will come with problems =)

loboris commented 5 years ago

Users usually have the ESP8266 board connected to some microcontroller and the early boot messages do not mean much. For the version information you have the the AT command AT+GMR.

Najsr commented 5 years ago

Well maybe there is a problem with PuTTy. I tried sending AT+GMR then pressed enter and nothing happened. So maybe the problem is on my side

uzi18 commented 5 years ago

maybe it is problem with translation of CR+LF chars? check line ending conversation options in putty