HOWTO: Flashing ESP8266

Discussion about various user interfaces such as web interface, displays and apps
User avatar
ZooKeeper
Posts: 507
Joined: Mon Mar 30, 2020 10:23 pm
Location: USA

Re: HOWTO: Flashing ESP8266

Post by ZooKeeper »

post deleted
Huebner VCU controlling a Gen2 Prius Inverter powering an MGR
"Talent is equally distributed but opportunity is not." - Leila Janah
davidwagstaff
Posts: 11
Joined: Sat Sep 28, 2019 8:00 am
Location: Devon, United Kingdom

Re: HOWTO: Flashing ESP8266

Post by davidwagstaff »

ZooKeeper wrote: Sat May 02, 2020 9:32 pm

UPDATE: After trying the available memory size options, I finally got everything to load!!!! Sill "FileNotFound" @ 192.168.4.1 however... UGH :(

Yet ANOTHER update..... SUCCESS!!!!!!!! :D
I have the same issue. Using Olimex Mod and Arduino IDE to flash. All seems to go ok but on the 192.168.4.1 page I get "file not found". What did you do to fix this?
MattsAwesomeStuff
Posts: 898
Joined: Fri Apr 26, 2019 5:40 pm
Has thanked: 291 times
Been thanked: 177 times

Re: HOWTO: Flashing ESP8266

Post by MattsAwesomeStuff »

I have a feeling this is one of those things where the instructions either aren't being followed, or, aren't correct for the very first time someone sets something up.

Else, a procedure should work exactly the same for everyone.

David - What procedure are you following? Link to it so we can know exactly what you did.

Getting File not Found when you go to the IP doesn't tell us much troubleshooting-wise other than that there's nothing at that IP. This could be because you did literally nothing, or that you got 99% of the way.

It could be something as simple as, you're connected to the wifi in your home rather than connecting to the ESP8266. You haven't given us anything to help you with.
davidwagstaff
Posts: 11
Joined: Sat Sep 28, 2019 8:00 am
Location: Devon, United Kingdom

Re: HOWTO: Flashing ESP8266

Post by davidwagstaff »

Thanks for your reply Matt.
I have a Olimex Mod board and been trying to program with the Arduino IDE . I've got the boards loaded in the IDE. I've connected the board to USP-TTL as per instructions on page 1, moved solder bridge to 0.
Created folders with ino and data. as per arbers instructions on page 3.

If I open the ino file and with the correct board and port selected I can program the Olimex, everything appears ok. It gets to resetting the board and just sits there.

Then I've tried either waiting a while and trying the ESP data upload tool or manually resetting the board by powering it down and then trying. Either way it appears to load the SPIFF and gives completed messages.
I'll try again and take some screen shots.
davidwagstaff
Posts: 11
Joined: Sat Sep 28, 2019 8:00 am
Location: Devon, United Kingdom

Re: HOWTO: Flashing ESP8266

Post by davidwagstaff »

FS Browser2.PNG
FS Browser.PNG
FS Browser.PNG (8.03 KiB) Viewed 6534 times
This is the output screen from Arduino IDE.

Sketch uses 356800 bytes (34%) of program storage space. Maximum is 1044464 bytes.
Global variables use 28496 bytes (34%) of dynamic memory, leaving 53424 bytes for local variables. Maximum is 81920 bytes.
esptool.py v2.6
2.6
esptool.py v2.6
Serial port COM11
Connecting....
Chip is ESP8266EX
Features: WiFi
MAC: 5c:cf:7f:8d:b8:d3
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 512000
Changed.
Configuring flash size...
Auto-detected Flash size: 2MB
Compressed 360960 bytes to 255263...

Writing at 0x00000000... (6 %)
Writing at 0x00004000... (12 %)
Writing at 0x00008000... (18 %)
Writing at 0x0000c000... (25 %)
Writing at 0x00010000... (31 %)
Writing at 0x00014000... (37 %)
Writing at 0x00018000... (43 %)
Writing at 0x0001c000... (50 %)
Writing at 0x00020000... (56 %)
Writing at 0x00024000... (62 %)
Writing at 0x00028000... (68 %)
Writing at 0x0002c000... (75 %)
Writing at 0x00030000... (81 %)
Writing at 0x00034000... (87 %)
Writing at 0x00038000... (93 %)
Writing at 0x0003c000... (100 %)
Wrote 360960 bytes (255263 compressed) at 0x00000000 in 5.4 seconds (effective 531.5 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
[SPIFFS] data : C:\FSB\FSBrowser\data
[SPIFFS] size : 1004
[SPIFFS] page : 256
[SPIFFS] block : 8192
/ajax-loader.gif

/chart.min.js.gz

/gauge.min.js.gz

/gauges.html

/gauges.js

/index.html

/index.js

/inverter.js

/log.html

/log.js

/README.md

/refresh.png

/style.css

/wifi-updated.html

/wifi.html

[SPIFFS] upload : C:\Users\David\AppData\Local\Temp\arduino_build_792348/FSBrowser.spiffs.bin
[SPIFFS] address : 0x100000
[SPIFFS] reset : ck
[SPIFFS] port : COM11
[SPIFFS] speed : 512000
[SPIFFS] python : python3.exe
[SPIFFS] uploader : C:\Users\David\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\tools\upload.py

Then on my phone I am changing to the ESP wifi and attempting to go to 192.168.1.4 and get "FileNotFound"
User avatar
dima
Posts: 157
Joined: Sun Dec 09, 2018 9:35 pm
Location: Canada

Re: HOWTO: Flashing ESP8266

Post by dima »

All debug looks good, steps followed correctly. Maybe there is a bug with URL "/"?

Perhaps try full URL? -> http://192.168.4.1/index.html
MattsAwesomeStuff
Posts: 898
Joined: Fri Apr 26, 2019 5:40 pm
Has thanked: 291 times
Been thanked: 177 times

Re: HOWTO: Flashing ESP8266

Post by MattsAwesomeStuff »

And I'll just reitterate... on whatever device you're using to access the 8266, you're connecting to its wifi, not your home wifi, right? Could be a firewall issue too on your side.

What are you using to connect? Desktop, laptop, tablet, phone?
davidwagstaff
Posts: 11
Joined: Sat Sep 28, 2019 8:00 am
Location: Devon, United Kingdom

Re: HOWTO: Flashing ESP8266

Post by davidwagstaff »

Yes Matt, I'm Connecting to the ESP wifi Via my iphone.

If I just try going to 192.168.4.1 without changing wifi I get site cannot be reached errors so definitely on the ESP.

Are there any files I've missed in the SPIFFS load?
davidwagstaff
Posts: 11
Joined: Sat Sep 28, 2019 8:00 am
Location: Devon, United Kingdom

Re: HOWTO: Flashing ESP8266

Post by davidwagstaff »

Ok tried it on a Wemos Node Mcu Lolin and it is the same. must be something i'm missing.

Had a play with the ino code to see if I can debug. Changed the 2 "file not found" messages to "filenotfound1" and "filenotfound2"
Now i'm getting a file not found 1 message when I try to access webpage.
Attachments
File not found.PNG
User avatar
dima
Posts: 157
Joined: Sun Dec 09, 2018 9:35 pm
Location: Canada

Re: HOWTO: Flashing ESP8266

Post by dima »

Did you set maximum SPIFFS size?
arduino-esp-spiffs-max.png
arduino-esp-spiffs-max.png (9.64 KiB) Viewed 6443 times
Why not try command line?

Need these tools: Build

Code: Select all

mkspiffs.exe -c C:\FSB\FSBrowser\Data\ -b 8192 -p 256 -s 600000 flash-spiffs.bin
Flash

Code: Select all

python esptool.py --port COM1 --baud 115200 write_flash 0x100000 flash-spiffs.bin
User avatar
ZooKeeper
Posts: 507
Joined: Mon Mar 30, 2020 10:23 pm
Location: USA

Re: HOWTO: Flashing ESP8266

Post by ZooKeeper »

post deleted
Huebner VCU controlling a Gen2 Prius Inverter powering an MGR
"Talent is equally distributed but opportunity is not." - Leila Janah
davidwagstaff
Posts: 11
Joined: Sat Sep 28, 2019 8:00 am
Location: Devon, United Kingdom

Re: HOWTO: Flashing ESP8266

Post by davidwagstaff »

Well i'm not getting anywhere with this. It seems the Arduino IDE is not loading the spiffs. Has anyone sucessfully done this with a recent build of the Arduino IDE? I found some info about spiffs no longer being supported by the ESP8266 core
https://arduino-esp8266.readthedocs.io/ ... ystem.html

I am not familiar with using Python and have no idea how to follow the instructions that have been given previously to use this method. Any help would be greatfully received
davidwagstaff
Posts: 11
Joined: Sat Sep 28, 2019 8:00 am
Location: Devon, United Kingdom

Re: HOWTO: Flashing ESP8266

Post by davidwagstaff »

Ok finally have success.

This seems to be a Arduino build compatibility issue. Loaded Arduino 1.8.0 on a different laptop and used ESP board core 2.6.2 and have successfully loaded sketch and spiffs to both NodeMCU and Olimex mod board.
User avatar
ZooKeeper
Posts: 507
Joined: Mon Mar 30, 2020 10:23 pm
Location: USA

Re: HOWTO: Flashing ESP8266

Post by ZooKeeper »

post deleted
Huebner VCU controlling a Gen2 Prius Inverter powering an MGR
"Talent is equally distributed but opportunity is not." - Leila Janah
MattsAwesomeStuff
Posts: 898
Joined: Fri Apr 26, 2019 5:40 pm
Has thanked: 291 times
Been thanked: 177 times

Re: HOWTO: Flashing ESP8266

Post by MattsAwesomeStuff »

davidwagstaff wrote: Sun May 24, 2020 7:21 pmThis seems to be a Arduino build compatibility issue. Loaded Arduino 1.8.0 on a different laptop and used ESP board core 2.6.2 and have successfully loaded sketch and spiffs to both NodeMCU and Olimex mod board.
This is what I fuckin' hate about open source. The complete an utter user unfriendliness of it, and the impossibility of an amateur to wade through it. You have to guess the correct thing it might be, that you maybe didn't even know was a thing that could even be correct or incorrect, and hope it works.

Good sleuthing to guess that maybe that was it and to try it out, needle in a haystack.
User avatar
dima
Posts: 157
Joined: Sun Dec 09, 2018 9:35 pm
Location: Canada

Re: HOWTO: Flashing ESP8266

Post by dima »

This just happened a week ago :o

Code: Select all

LittleFS is indeed a drop-in / transparent replacement for SPIFFS.
Just replace all occurrence of SPIFFS by LittleFS in your code.
Source: https://github.com/esp8266/Arduino/pull/7263

Will need new Arduino Plugin https://github.com/earlephilhower/ardui ... efs-plugin
User avatar
ZooKeeper
Posts: 507
Joined: Mon Mar 30, 2020 10:23 pm
Location: USA

Re: HOWTO: Flashing ESP8266

Post by ZooKeeper »

post deleted
Huebner VCU controlling a Gen2 Prius Inverter powering an MGR
"Talent is equally distributed but opportunity is not." - Leila Janah
User avatar
celeron55
Posts: 776
Joined: Thu Jul 04, 2019 3:04 pm
Location: Finland
Has thanked: 28 times
Been thanked: 110 times
Contact:

Re: HOWTO: Flashing ESP8266

Post by celeron55 »

MattsAwesomeStuff wrote: Sun May 24, 2020 9:38 pm This is what I fuckin' hate about open source. The complete an utter user unfriendliness of it, and the impossibility of an amateur to wade through it. You have to guess the correct thing it might be, that you maybe didn't even know was a thing that could even be correct or incorrect, and hope it works.

Good sleuthing to guess that maybe that was it and to try it out, needle in a haystack.
Polishing software to a degree where a non software engineer can use it is really tedious and not fun, so it comes down to the price one pays for it. Software gets expensive when you pay someone to do the non fun stuff. If you would like to do so, you can choose between buying a ready made closed source solution or paying someone to do the non fun stuff to an open source solution.
User avatar
dima
Posts: 157
Joined: Sun Dec 09, 2018 9:35 pm
Location: Canada

Re: HOWTO: Flashing ESP8266

Post by dima »

Thank you! @celeron55 I was starting to feel discouraged ...again. :cry: Need one of them Johannes torque gloves.

Patreon.png
Patreon.png (9.47 KiB) Viewed 7241 times
MattsAwesomeStuff
Posts: 898
Joined: Fri Apr 26, 2019 5:40 pm
Has thanked: 291 times
Been thanked: 177 times

Re: HOWTO: Flashing ESP8266

Post by MattsAwesomeStuff »

celeron55 wrote: Tue May 26, 2020 5:22 amIf you would like to do so, you can choose between buying a ready made closed source solution or paying someone to do the non fun stuff to an open source solution.
Yeah, not complaining, just lamenting. Open source is best around a group of programming peers. Basically "I could write this, but someone else already did, neat". Outside of that, to someone who couldn't write it from scratch if they had the time, its limits rear their heads.

By virtue of being open source, no one is responsible for anyone else. So for example, one project making a change that borks another project that they probably didn't even know existed. It's certainly not the first project's responsibility to ensure all the projects that use it remain compatible. And, after someone creates a following project, they should not be bound for life in constant support of that project to maintain it and make sure it can keep working. So the nature of Open Source seems to be incomplete documentation, stagnant projects, and time-rotted code.

Option 3 for me is, if you can't write the code, contribute in other ways to the project to help more people be able to use it. Bridge that usability gap.
BMW2002
Posts: 7
Joined: Sat Feb 22, 2020 4:31 pm
Location: UK , Newcastle

Re: HOWTO: Flashing ESP8266

Post by BMW2002 »

Most forums are the same its usually the same dozen people talking in code which is hard for the outsider to get in.

Always reminds me of IKEA , you know what you want, you cant really find it, you just hope you'll bump into a store rep that day to guide you ;)
User avatar
jason_arnold
Posts: 21
Joined: Wed Sep 11, 2019 4:42 pm
Location: Canada
Has thanked: 1 time
Been thanked: 2 times

Re: HOWTO: Flashing ESP8266

Post by jason_arnold »

Dima, I'd like to have a go at running your latest variant of the web interface, but the mklittlefs tool your PS script calls is no longer available, so I'm unable to compile my own .bin for the file system - any chance you have one ready to share?
kaleb
Posts: 15
Joined: Wed Oct 30, 2019 8:10 am

Re: HOWTO: Flashing ESP8266

Post by kaleb »

@dima I flashed your most recent update, have a solid green light afterwards and no inverter SSID, something I did wrong?
kaleb
Posts: 15
Joined: Wed Oct 30, 2019 8:10 am

Re: HOWTO: Flashing ESP8266

Post by kaleb »

kaleb wrote: Tue Sep 29, 2020 4:29 am @dima I flashed your most recent update, have a solid green light afterwards and no inverter SSID, something I did wrong?
Disregard. :) Using precompiled .bin didn't work as anticipated, but building with Arduino from the sketch worked.
kaleb
Posts: 15
Joined: Wed Oct 30, 2019 8:10 am

Re: HOWTO: Flashing ESP8266

Post by kaleb »

Maybe I spoke too soon. It worked, but now I get a "not compressed" message. I've tried running the script again and selecting "compress javascript -y" when prompted. Anyone have this happen as well?
Attachments
Screen Shot 2020-09-29 at 7.39.42 PM.png
Post Reply