jeelabs / esp-link

esp8266 wifi-serial bridge, outbound TCP, and arduino/AVR/LPC/NXP programmer
Other
2.82k stars 720 forks source link

Flash ESP8266 Appears good however, time out at 192.168.4.1 #443

Open dachshund-digital opened 5 years ago

dachshund-digital commented 5 years ago

Flash ESP8266 Appears good however, time out at 192.168.4.1:

Serial output when ESP8266 reset... 140> 140> esp-link v3.0.14-g963ffbb 140> Flash config restore FAILED 140> CONN led=0 141> SER led=14 143> Wifi init, mode=AP 145> Wifi uses DHCP, hostname=esp-link 149> "ip": "0.0.0.0" 151> "netmask": "0.0.0.0" 153> "gateway": "0.0.0.0" 156> "hostname": "" 158> sleep enable,type: 2 161> Httpd init, conn=0x3fff3820 165> No user file system found! 167> Serbridge pins: reset=12 isp=13 swap=0 180> Reset cause: 6=external 181> exccause=0 epc1=0x0 epc2=0x0 epc3=0x0 excvaddr=0x0 depc=0x0 181> Flash map 4MB:512/512, manuf 0xEF chip 0x4016 185> esp-link v3.0.14-g963ffbb: ready, heap=21368 191> SNTP timesource set to us.pool.ntp.org with offset 0 196> initializing user application 199> Waiting for work to do... 202> mode : softAP([redacted]) 206> add if1 208> dhcp server start:(ip:192.168.4.1,mask:255.255.255.0,gw:192.168.4.1) 216> bcn 100 15161> Wifi check: mode=AP status=255

dachshund-digital commented 5 years ago

Bump.... Come on no one responding?

yesyesuk commented 5 years ago

Look like the configuration is missing. Which files did you flash and to which memory locations?

dachshund-digital commented 5 years ago

Ok... Used the following...

esp-link-v3.0.14-g963ffbb\boot_v1.6.bin 0x00000 blank.bin 0x3FE000 esp_init_data_default.bin 0x3FC000 user1.bin 0x01000

Using NodeMcu to do the flashing. But also just noticed one of the files was not 'selected' for flashing, which would explain the incomplete function due to incomplete flash. The flashing seemed 'too' quick before, now it took quite a bit longer.

I see the ESP-Link device as a wireless device when I scan for APs, i.e. ESP_8FF5B6. MAC address for softAP is correct as well.

But I still get the timeout when I try to connect to 192.168.1.4 via browser. Nor is the AP pingable.

417> 417> esp-link v3.0.14-g963ffbb 418> Flash config restore FAILED 418> CONN led=0 418> SER led=14 420> Wifi init, mode=AP 422> Wifi uses DHCP, hostname=esp-link 426> "ip": "0.0.0.0" 428> "netmask": "0.0.0.0" 431> "gateway": "0.0.0.0" 433> "hostname": "" 436> sleep enable,type: 2 439> Httpd init, conn=0x3fff3820 442> No user file system found! 445> Serbridge pins: reset=12 isp=13 swap=0 458> Reset cause: 6=external 458> exccause=0 epc1=0x0 epc2=0x0 epc3=0x0 excvaddr=0x0 depc=0x0 458> Flash map 4MB:512/512, manuf 0xEF chip 0x4016 463> esp-link v3.0.14-g963ffbb: ready, heap=21368 468> SNTP timesource set to us.pool.ntp.org with offset 0 473> initializing user application 476> Waiting for work to do... 480> mode : softAP(86:0d:8e:8f:f5:b6) 483> add if1 485> dhcp server start:(ip:192.168.4.1,mask:255.255.255.0,gw:192.168.4.1) 493> bcn 100 15439> Wifi check: mode=AP status=255

Hardware I am trying to use...

20:42:30.671 -> ##################### 20:42:30.671 -> __ 20:42:30.671 -> 20:42:30.671 -> Firmware: 20:42:30.671 -> Chip Id: 008FF5B6 20:42:30.711 -> Core version: 2_5_0 20:42:30.711 -> SDK version: 3.0.0-dev(c0f7b44) 20:42:30.711 -> Boot version: 6 20:42:30.711 -> Boot mode: 1 20:42:30.711 -> __ 20:42:30.711 -> 20:42:30.711 -> Flash chip information: 20:42:30.711 -> Flash chip Id: 001640EF (for example: Id=001640E0 Manuf=E0, Device=4016 (swap bytes)) 20:42:30.711 -> Sketch thinks Flash RAM is size: 4.00 MB 20:42:30.711 -> Actual size based on chip Id: 4.00 MB ... given by (2^( "Device" - 1) / 8 / 1024 20:42:30.711 -> Flash frequency: 40.00 MHz 20:42:30.711 -> Flash write mode: QIO 20:42:30.711 -> __ 20:42:30.751 -> 20:42:30.751 -> File system (SPIFFS): 20:42:30.751 -> Total KB: 4176892.00 KB 20:42:30.751 -> Used KB: 4176892.00 KB 20:42:30.751 -> Block size: 0 20:42:30.751 -> Page size: 0 20:42:30.751 -> Maximum open files: 5 20:42:30.751 -> Maximum path length: 32 20:42:30.751 -> 20:42:30.751 -> SPIFFS directory {/} : 20:42:30.751 -> __ 20:42:30.751 -> 20:42:30.751 -> CPU frequency: 80 MHz 20:42:30.751 -> 20:42:30.751 -> #####################

dachshund-digital commented 5 years ago

I just tried 2.2.3 firmware for esp-link, and got it to load, and the web page responded once I forced a connection to esp-link soft AP, and was able to change the setup to DHCP and STA mode as I desired. So, the real issue remains that I can't seem to get 3.0.14.x firmware version quite right.

uzi18 commented 5 years ago

try update it now to 3.0.x or 3.2.x

dachshund-digital commented 5 years ago

Ah, good idea will try. Update... It took me a while to truly understand how to OTA update from 2.2.3. So many links via Google focused on updating the micro-controller firmware or image via ESP-Link, rather than actually updating ESP-Link its self.

As that may be, downloaded the 3.2.47 firmware bundle, expanded it, then copied to Linux server. To actually flash the ESP device its-self, used the following...

ESP_HOSTNAME=192.168.1.x ./wiflash -v 192.168.1.x ./user1.bin ./user2.bin

Where 192.168.1.x is ip of the ESP device of course. (Environment variable... I suspect is not needed given wiflash allows direct address/hostname).

When firmware expanded directory is as follows... -rw-r--r-- 1 root root 2653 Jun 19 2017 avrflash -rw-r--r-- 1 root root 4096 Jun 19 2017 blank.bin -rw-r--r-- 1 root root 4080 Jun 19 2017 boot_v1.7.bin -rw-r--r-- 1 root root 128 Jun 19 2017 esp_init_data_default.bin -rw-r--r-- 1 root root 2861 Jun 19 2017 megaflash -rw-r--r-- 1 root root 344708 Jun 19 2017 user1.bin -rw-r--r-- 1 root root 344708 Jun 19 2017 user2.bin -rwxr-xr-x 1 root root 3340 Jun 19 2017 wiflash

Oh, had to do chmod +x on wiflash script, likely because I initially explored the firmware bundle on Windows before I used WinSCP to copy the files the Linux system.

By the way, love that 3.2.47... has update firmware from within the web interface! Really should be a Windows OTA method for complete support scope, but given the web page based firmware feature now present? Understand why no Windows OTA exists as yet.

Never seemed to be able to get 3.0.14 or 3.2.x initial serial flash quite right. I was using 32mbit/4MB ESP8266 module.