-
• #2
hi @hungryforcodes,
check http://www.espruino.com/binaries/ for file espruino_1v92_esp8266_combined_512.bin
-
• #3
tested this images on a ESP8266 12 board
var wifi = require("Wifi"); wifi.connect("xxx", {password:"xxx"}, function(ap){ console.log("connected"); wifi.save() });
result after reset
>rll|là|lìb|ìrbbònnlnnâìbplrlrlpònàlbnâ|bònnîll`nnl`nrnl`pònàrâàbnâ|ìbònnîl`nnl`nrnlpònàrâàìlbnâ|bònnîl`nnl`nrnl`rnl`rlnònnârnnnlblìlìlll~rlìlllnâllllìlnànìn~llàbìllpbbrìl`nlpìl`bl`lnnânl|bll`rlâìnìròn|ìll`ârlþ _____ _ | __|___ ___ ___ _ _|_|___ ___ | __|_ -| . | _| | | | | . | |_____|___| _|_| |___|_|_|_|___| |_| http://espruino.com 1v92 Copyright 2016 G.Williams Espruino is Open Source. Our work is supported only by sales of official boards and donations: http://espruino.com/Donate Flash map 4MB:512/512, manuf 0xe0 chip 0x4016 >require("Wifi").getIP(); ={ "ip": "192.168.194.121", "netmask": "255.255.255.0", "gw": "192.168.194.1", "mac": "5c:cf:7f:c1:12:0b" } >
so it works
-
• #4
Hi @hungryforcodes, I have the same issue.
I will test the suggest of @MaBe today, if it works will post it here the results.I am testing with ESP8266-01 doesn't work and with node MCU, works fine.
Regards,
Fabiano -
• #5
Good to know that in previous versions it works, if the issue persist I have alternatives.
-
• #7
@MaBe @Fabiano-Gomes So just to report it did work on my ESP-01. I was able to flash it using the espruino_1v92_esp8266_combined_512.bin file. And after wifi.save() worked correctly.
Interestingly though both v92 and v91 combined files put my ESP-201 into a constant restart mode where the blue light on it flashed continuously. I downgraded to v86 and it works fine, so I'll use that for these remaining boards. Espytool said it autodetected 8m of flash, which would suggest that the ESP-201 is not a 512KB board as the spec suggests, but rather a 1MB board.
Either way, maybe we should include the espruino_1v92_esp8266_combined_512.bin file by default in the v92 distribution?
Just curious why this way preserves the wifi.save() functionality, and the more complex way does not?
Anyways thanks guys! :)
-
• #8
Great, thanks for your feedback.
you could erase flash before flashing new files
esptool.py --port /dev/ttyUSB0 --baud 115200 erase_flash
This is exactly what is achieved when using a combined file :)
-
• #9
Yes those were in the instructions and I followed them :) I will try again with the ESP-01 (I have a few coming in anyways), as I did that with the ESP-201 and had a negative result.
-
• #10
@MaBe So a quick update -- the ESP-201 is supposed to come with only 4mbit flash, and this is even supported by many photos online (at least I guess of early chips), but mine for whatever reason have 8mbit parts (maybe they ran out at the factory of the 4mbit flash? Who knows). This is what caused the problem. So I guess you can never assume anything in the ESP world :P
So I did erase the flash and use the following as per the README (adjusted for 8mbit flash):
esptool.py --port [/dev/ttyUSB0|COM1] --baud 115200 write_flash \ --flash_freq 40m --flash_mode qio --flash_size 8m \ 0x0000 "boot_v1.6.bin" 0x1000 espruino_esp8266_user1.bin 0xFC000 esp_init_data_default.bin 0xFE000 blank.bin
and now it works, and thus no need for the combined file. Anyways so if anyone else has an ESP-201 board and is having problems flashing, please check the part size for the flash.
-hfc
-
• #11
Good to know - thanks
-
• #12
Is this still an issue with latest firmware? If so, what are the instructions for avoiding? I believe I am having same issue with the esp8266 in the sonoff
-
• #13
let esptool.py figure out your flash size
esptool.py --port "$COMPORT" --baud 460800 flash_id Manufacturer: e0 Device: 4016 Detected flash size: 4MB
W25Q40BV ( 4 Mega Bits / 512K Byte ) = ID 4013h
W25Q80BV ( 8 Mega Bits / 1 Mega Byte ) = ID 4014h
W25Q16BV ( 16 Mega Bits / 2 Mega Bytes ) = ID 4015h
W25Q32BV ( 32 Mega Bits / 4 Mega Bytes ) = ID 4016h
W25Q64CV ( 64 Mega bits / 8 Mega Bytes ) = ID 4017h -
• #14
Thank you @MaBe
This worked for me (leaving off the flash size, and using bin locations for larger chip:
python "MYPATH\esptool.py" --port COM4 --baud 115200 write_flash --flash_freq 40m --flash_mode qio 0x0000 "boot_v1.6.bin" 0x1000 espruino_esp8266_user1.bin 0xFC000 esp_init_data_default.bin 0xFE000 blank.bin
Hi Guys,
Just curious if anyone can reproduce this problem. I noticed that when I flashed my 512K boards (specifically an ESP-01, and several ESP-201s), that they did not execute wifi.save(), and thus when restarted did not automatically connect to the network. The network parameters were blank/null.
I went BACK and tried v86 -- my kind of "standard" -- that always works, and after v91. Both work fine. However, I was using the following method:
After I was able to use wifi.save() normally, and the boards reconnected normally on startup. However after some experimentation I discovered that if I use for example:
on v91 then it does NOT save any wifi configuration when I do wifi.save().
As v92 does not have the "espruino_1v92_esp8266_combined_512.bin" file, its impossible to test between the two methods.
I'm curious if anyone else can confirm this, or if perhaps its a problem with my setup. I have not tested if this problem exists on my 4MB flash boards at this point.
Thanks :)
-hfc.