HOWTO: Flashing ESP8266

Discussion about various user interfaces such as web interface, displays and apps
kiwifiat
Posts: 99
Joined: Sat Dec 22, 2018 9:39 pm
Location: Vancouver, Canada
Been thanked: 10 times

Re: HOWTO: Flashing ESP8266

Post by kiwifiat »

I have tested the bluepill with both sine and FOC firmware and there is no problem running either a serial console using Realterm or Dima's Windows based interface. I have a few Wemos D1 Mini's on the way and will report back once they arrive.
User avatar
james@N52E01
Posts: 144
Joined: Wed Sep 18, 2019 7:02 am
Has thanked: 2 times
Been thanked: 3 times

Re: HOWTO: Flashing ESP8266

Post by james@N52E01 »

Hi, I’ll try to keep this specific. I’m trying to use an FTDI breakout board to flash an Olimex MOD-WIFI-ESP8266 Board with the WiFi Interface using Arduino IDE v1.8.10. When I try to upload the sketch I keep getting the error “the selected serial port _ does not exist or is not connected”. Seems like an obvious error on my part, here are the steps I have been through to check.

1. Followed Dima’s instructions for connecting FTDI to Olimex. Verified pin outs match for both boards. FTDI Voltage jumper set to 3.3v. Verified Olimex jumpers are soldered correctly for flash mode.

2. Downloaded web server sketch and added sub files to data folder (following arber333’s instructions).

3. Added ESP8266 to boards manager. Added esp8266 Filesystem Uploader to Arduino tools directory. Restarted Arduino IDE. Selected Olimex board. Tried to upload sketch, keep receiving the error messages attached (not sure of Olimex SPIFFS Flash Size so tried all of them, no luck).

I have tried a different USB ports, usb cables and verified the FTDI board works. When I try to upload the sketch file, the FTDI is clearly attempting to make a connection as the green data led’s are flashing on both boards simultaneously.
Attachments
36B88FA5-D442-409B-9E2F-6745D53BB84B.jpeg
CC96FC62-72EC-4811-BD05-C009A8EF8F7B.png
arber333
Posts: 3241
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 74 times
Been thanked: 223 times
Contact:

Re: HOWTO: Flashing ESP8266

Post by arber333 »

1. Can you see the FTDI inside your "device manager"? Which COM port it is assigned to it?
2. Did you verify you connected TX RX lines correctly? You only need to connect 4 lines. Vcc (3V3), Gnd, Tx and Rx. Maybe a redundant line is keeping ESP in reset? Try to connect only required lines.

Maybe you can also change to AVR ISP loader?
User avatar
james@N52E01
Posts: 144
Joined: Wed Sep 18, 2019 7:02 am
Has thanked: 2 times
Been thanked: 3 times

Re: HOWTO: Flashing ESP8266

Post by james@N52E01 »

arber333 wrote: Sun Feb 16, 2020 11:35 am 1. Can you see the FTDI inside your "device manager"? Which COM port it is assigned to it?
2. Did you verify you connected TX RX lines correctly? You only need to connect 4 lines. Vcc (3V3), Gnd, Tx and Rx. Maybe a redundant line is keeping ESP in reset? Try to connect only required lines.

Maybe you can also change to AVR ISP loader?
1. Yes. It appears in DM as USB Serial Port (COM3) see attached

2. Yes. The wiring appears to be correct according to the schematics and board labelling (Tx—>Rx and Rx—>Tx). This seems to be confirmed by the blinking LED’s when I go to upload. I tried reversing them and the Olimex Led does not blink. The same error occurs. There are only the 4 cables attached as you describe.

Thanks for looking into this btw.
Attachments
F85880BE-1C26-4677-A496-7E7F1FB47989.jpeg
F85880BE-1C26-4677-A496-7E7F1FB47989.jpeg (33.45 KiB) Viewed 4709 times
User avatar
james@N52E01
Posts: 144
Joined: Wed Sep 18, 2019 7:02 am
Has thanked: 2 times
Been thanked: 3 times

Re: HOWTO: Flashing ESP8266

Post by james@N52E01 »

I’ll give the AVR ISP loader a go, they seem hard wired to all 10 pins. Would you use a ribbon extender and just chop all but the 4 needed?
arber333
Posts: 3241
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 74 times
Been thanked: 223 times
Contact:

Re: HOWTO: Flashing ESP8266

Post by arber333 »

james@N52E01 wrote: Sun Feb 16, 2020 12:08 pm I’ll give the AVR ISP loader a go, they seem hard wired to all 10 pins. Would you use a ribbon extender and just chop all but the 4 needed?
No, i ment nside Arduino code try changing from AVR ISP II to AVR ISP loader. Maybe there is something holding it back...

I always make my own cables from FTDI to other devices and keep them in my aid kit that goes with the car...
User avatar
james@N52E01
Posts: 144
Joined: Wed Sep 18, 2019 7:02 am
Has thanked: 2 times
Been thanked: 3 times

Re: HOWTO: Flashing ESP8266

Post by james@N52E01 »

Ah sorry yes that makes sense. Just tried changing to AVR ISP and no joy unfortunately.
User avatar
dima
Posts: 157
Joined: Sun Dec 09, 2018 9:35 pm
Location: Canada

Re: HOWTO: Flashing ESP8266

Post by dima »

This has been repeated but for Olimex did you solder GPIO0 to 0 (zero) Not just left it open but actually made a solder bridge to 0?

Always select highest SPIFFS (1MB) and you can leave Erase Flash: Only Sketch
esp8266_olimex_spiffs.png
EDIT: Also I recommend updating "esp8266" boards library to version 2.6.3 (it has important fix for web update)
esp8266_arduino_version.png
User avatar
james@N52E01
Posts: 144
Joined: Wed Sep 18, 2019 7:02 am
Has thanked: 2 times
Been thanked: 3 times

Re: HOWTO: Flashing ESP8266

Post by james@N52E01 »

Hi Dima thanks for picking this up. Yes I did solder the jumpers exactly as you described (with none left open).

I will recheck when I get home tomorrow that SPIFFS are set to 1MB and change back to Erase Flash.

I will also switch back to V2.6.3. I have tried with all versions from 2.5.1 up as this fixed some issues i have seen for others.
User avatar
SciroccoEV
Posts: 369
Joined: Thu Oct 10, 2019 1:50 pm
Location: Luton UK
Been thanked: 15 times

Re: HOWTO: Flashing ESP8266

Post by SciroccoEV »

With the information posted here, I've got a D1 mini connected to a Blue Pill (more less just a BP on breadboard). I did have a problem connecting to the WiFi because it was initially secured. Selecting erase flash & wifi settings fixed that.

I can see messages (inverter start, stop, etc), but not full parameter listing. I might have left debugging enabled, so I'll try fixing that.

EDIT;

Web interface now fully working; Debugging turned off.
User avatar
james@N52E01
Posts: 144
Joined: Wed Sep 18, 2019 7:02 am
Has thanked: 2 times
Been thanked: 3 times

Re: HOWTO: Flashing ESP8266

Post by james@N52E01 »

Dima and Arber I tried as you both suggested but still no luck unfortunately. Just to confirm, I am not using the -DEV board, it is the MOD-WIFI-ESP8266 with the UEXT header like your picture on the original post.
MOD-WIFI-ESP8266.png
MOD-WIFI-ESP8266.png (33.59 KiB) Viewed 4872 times

With these settings you posted above and an FTDI board connected as you originally posted, have you or Arber successfully managed to flash one of these boards with the latest Arduino IDE and esptool.py v2.6?
User avatar
dima
Posts: 157
Joined: Sun Dec 09, 2018 9:35 pm
Location: Canada

Re: HOWTO: Flashing ESP8266

Post by dima »

james@N52E01 wrote: Sat Mar 07, 2020 5:06 pm With these settings you posted above and an FTDI board connected as you originally posted, have you or Arber successfully managed to flash one of these boards with the latest Arduino IDE and esptool.py v2.6?
Yes all the time. Only difference not using expensive FTDI (You will need USB to TTL not RS232 Serial) Prolific2303 or CH340 work. (-DEV) is in brackets IDE builds for both.
olimex-ide-dev.png
User avatar
jnsaff
Posts: 176
Joined: Fri Oct 18, 2019 7:42 am
Location: Tallinn, Estonia
Has thanked: 2 times
Been thanked: 8 times

Re: HOWTO: Flashing ESP8266

Post by jnsaff »

I'm having a similar problem as well. I got the ESP8266 from Johannes so it should be fine. Then programmed the bootloader and stm32_sine.hex red led is on and green is blinking on the blue pill.

No parameters are showing but when I try to Display Error Memory I get:

Code: Select all

Unknown command sequence
e��K�
Unknown command sequence
Custom command 'json' gets

Code: Select all

Unknown command sequence
j��)
So it seems that they are communicating as from the forum search this error is something that the stm32_sine sends back. But TX may be messed up somehow? I believe my Blue Pills may be quite dodgy .. so would want to put the black pill on there instead but the pin labels are not exactly the same. Any ideas? Much appreciated!
User avatar
jnsaff
Posts: 176
Joined: Fri Oct 18, 2019 7:42 am
Location: Tallinn, Estonia
Has thanked: 2 times
Been thanked: 8 times

Re: HOWTO: Flashing ESP8266

Post by jnsaff »

I flashed another esp8266 with Dima's interface and no luck on either Blue Pill nor fully tested GS450h-VCU. On both I get the error: ' SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data:'.
User avatar
dima
Posts: 157
Joined: Sun Dec 09, 2018 9:35 pm
Location: Canada

Re: HOWTO: Flashing ESP8266

Post by dima »

jnsaff wrote: Tue Mar 17, 2020 10:13 pm I flashed another esp8266 with Dima's interface and no luck on either Blue Pill nor fully tested GS450h-VCU. On both I get the error: ' SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data:'.
GS450h-VCU will not work with Johannes or my web-interface. You will need to flash this https://github.com/jamiejones85/ESP8266-WiFi-Interface. Blue-Pill was not tested by me.
jnsaff wrote: Mon Mar 16, 2020 9:20 pm No parameters are showing but when I try to Display Error Memory I get:

Code: Select all

Unknown command sequence
e��K�
Unknown command sequence
Custom command 'json' gets

Code: Select all

Unknown command sequence
j��)
This means wrong serial speed! 15200 is what you want.
slow67
Posts: 151
Joined: Thu Jan 30, 2020 6:52 pm
Location: Texas
Been thanked: 1 time

Re: HOWTO: Flashing ESP8266

Post by slow67 »

FYI if the sketch and the SPIFFS will all fit on a 1MB chip (like Damien's interface for the GS450h) I was able to use the super cheap ESP-01. You don't have to solder pins, just connect 2 extra pins while flashing. It made it easy practice (especially when you are modding code like me) before having to move the solder around.
pm_dawn
Posts: 36
Joined: Mon Jan 07, 2019 7:19 am
Location: Östersund/Sweden
Contact:

Re: HOWTO: Flashing ESP8266

Post by pm_dawn »

slow67 wrote: Wed Mar 25, 2020 5:37 am FYI if the sketch and the SPIFFS will all fit on a 1MB chip (like Damien's interface for the GS450h) I was able to use the super cheap ESP-01. You don't have to solder pins, just connect 2 extra pins while flashing. It made it easy practice (especially when you are modding code like me) before having to move the solder around.
How did you get the sketch and the spiffs to fit on the esp-01.
What did you change to get it to work ?

I have a esp-01 here that I try to use.

Regards
/Per
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
pm_dawn
Posts: 36
Joined: Mon Jan 07, 2019 7:19 am
Location: Östersund/Sweden
Contact:

Re: HOWTO: Flashing ESP8266

Post by pm_dawn »

I followed this post:
viewtopic.php?p=5048#p5048

But for step 6 I choose the "Generic ESP8266 module"

That worked for me.

I used FTDI Cable with RTS connected. That worked perfect.

But you need to keep the enable pin high all the time.
And when flashing pull the GPIO0 low

Regards
/Per
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
pm_dawn
Posts: 36
Joined: Mon Jan 07, 2019 7:19 am
Location: Östersund/Sweden
Contact:

Re: HOWTO: Flashing ESP8266

Post by pm_dawn »

Hi ZK!

I'm using win10. It worked fine.

I created a FSBrower dierctory.

extracted Johannes FSBrowser project

In the FSBrowser dir I created a Data directory.

Moved all files except the FSBrowser.ino file into

Then opened the the .ino file.

First uploaded the sketch.

Waited for the a couple of seconds after reset of ESP

Then uploaded the Spiffs.

Then removed the flash pulldown.

That worked for me.
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
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
dima
Posts: 157
Joined: Sun Dec 09, 2018 9:35 pm
Location: Canada

Re: HOWTO: Flashing ESP8266

Post by dima »

It sounds like your "Data" folder is empty, Johannes web interface folder structure does not reflect what is needed for Arduino IDE - ESP8266 SPIFFS Uploader.

make C:/FSB <-copy only FSBrowser.ino
make C:/FSB/Data <- Copy all files except FSBrowser.ino
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
Post Reply