Page 8 of 8

Re: HOWTO: Flashing ESP8266

Posted: Tue Aug 02, 2022 3:14 am
by irsjohnk
okashira wrote: Mon Jun 28, 2021 12:59 am Same problem. I followed instruction to a T. Flashing goes fine in arduino IDE. After I solder back the GPIO0, the only wifi network to show up is ESP-XXXXX.
I'm getting sick of soldering this jumper over and over.
I put wires on power ground and on the non ground side of the button ant removed the solder jumper then i just connect wires back and forth.
Image
https://drive.google.com/file/d/1uriMSv ... sp=sharing

Re: HOWTO: Flashing ESP8266

Posted: Tue Sep 13, 2022 3:48 pm
by nilsvr
Hello,
I bought a built gen 2 charger board (V5aB3) but the wifi is not working at all (no signal found). I am trying to flash the needed file onto the wifi mod esp8266 using the arduino ide.
I am not sure which file to flash though. I tried with johu's esp8266-web-interface.ino and from Damien's charger github the chgV5Web.ino.

The first I am able to flash (at least the ide says 100% and then soft resetting) but with no change in behaviour.
The second one gives an error during compiling for not finding ESPAsyncTCP.h (not sure where to get that from).

Am I even using the right files?
Are they interchangable?

My steps are as per documentation:

Solder -> flash -> resolder -> plug in to the charger board to test

Re: HOWTO: Flashing ESP8266

Posted: Thu Sep 29, 2022 7:41 am
by Jonr
pilt wrote: Thu Jul 08, 2021 9:54 pm
I am also trying to flash Olimex MOD-WIFI-ESP8266, but have the same problem as you.

I changed some of the code and now I can connect to the module. My change to be able to connect was to change line 420 from WiFi.begin(); to WiFi.softAP("inverter","inverter123"); and line 416 to WiFi.mode(WIFI_AP)

It also seems the file system does not always load when you use the sketch data upload in the arduino software. I had to try about 4 times to get the SPIFFS data on the ESP. It always shows transfer is ok, but no files exisit on the device!

Also handy hint for everyone, you do not need to solder the jumpers on the Olimex board! If you hold the button when you connect the USB of the FTDI chip it to the PC you can flash it with no soldering:)
You saved the day for me.
Yesterday, I spent about 6 hours trying to use a nodeMCU in place of the Olimex. After finding this post and chaging the two lines of code you mention above, it all burst into life - Thank you for sharing.

Re: HOWTO: Flashing ESP8266

Posted: Tue Nov 01, 2022 10:44 pm
by sigdigits
nilsvr wrote: Tue Sep 13, 2022 3:48 pm Hello,
I bought a built gen 2 charger board (V5aB3) but the wifi is not working at all (no signal found). I am trying to flash the needed file onto the wifi mod esp8266 using the arduino ide.
I am not sure which file to flash though. I tried with johu's esp8266-web-interface.ino and from Damien's charger github the chgV5Web.ino.

The first I am able to flash (at least the ide says 100% and then soft resetting) but with no change in behaviour.
The second one gives an error during compiling for not finding ESPAsyncTCP.h (not sure where to get that from).

Am I even using the right files?
Are they interchangable?

My steps are as per documentation:

Solder -> flash -> resolder -> plug in to the charger board to test
The files are "right", and the esp8266 is the supported one. I personally haven't been able to connect to the wifi with damien's code, and I haven't loaded the other because you need a pin purchased from patreon after 5 minutes of charging.

That error apparently happens when you have the "wrong board" selected, but I think it also may have to do with the many variations of these boards, etc.... I'm in the same boat and had to do some searching on git to get all the libraries sorted. Here's a link https://github.com/me-no-dev/ESPAsyncTCP

There is most of the necessary info on the wiki, but if you are making your own boards, or your code gets completely wiped it's a bit more involved

Re: HOWTO: Flashing ESP8266

Posted: Wed Nov 02, 2022 7:30 pm
by nilsvr
After investing some time without progress I chose to go the „work your job for the time and buy it route“ and just ordered a programmed olimex board from Johu. That worked flawlessly. So depending on how high you value your own work hour and how much fun you have with poking around in code written by someone else, it might be easier/better/cheaper to just buy a new wifi module… just as a reminder if someone is struggling and never thought of that option.

Re: HOWTO: Flashing ESP8266

Posted: Sun Nov 13, 2022 2:34 pm
by Jonr
This turned into another pain. I replaced the original Olimax device with a NodeMCU which initially worked well but then connection kept dropping. The web page would display but the setting would not populate. So, to keep in line with standard, I went the ESP8266 D1 mini route, which also worked OK then kept dropping the connection. Same issue as NodeMCU.

Not to give up, I put a serial breakout box between the WiFi device and the Zombieverter. This captured the problem. When starting from power up, the serial communication requests "fastuart" and changes the baud rate to 921600. The Olimex device see the request and changes speed. The NodeMCU and D1 mini see the request but do not change speed and hence lose connection.

So, at the beginning of esp-8266-web-interfaec.ino, change the line to "bool fastuartavailable = false" - it's about line 14 of the code (not comment)

This removes the baud rate change request and the D1 mini and NodeMCU now work reliably ... for now!

Re: HOWTO: Flashing ESP8266

Posted: Thu Nov 24, 2022 3:19 pm
by AdrianB
Very many thanks to jonr, Peakon28 and janosch for their very helpful posts. I have, after several days of trying, managed to flash my new Weimos D1 mini ESP8266 board and I can now see the web interface. It is faster and much more stable than my old Olimex module which died completely the other week.

I did encounter a few issues with the softwear versions which others may be interested in knowing how to avoid. The main problem seems to be that the SPIFFS filesystem is now (Nov 2022) depricated.
  • I couldn't find a CH340 driver for my old Mac (OSX 10.8.5). One is listed and it installs but the port never appeared in the Arduino IDE. I used a PC running Windows 10 instead.
  • I couldn't get the latest version of Arduino IDE (2.0.2) to work so I used version 1.8.13 - as recommended by Damien
  • After a bit of trial-and-error I used version 0.5.0 of the ESP8266 Filesystem Uploader
  • The Arduino IDE complained if the name of the .ino file and the name of its enclosing folder weren't the same. I renamed the folder to match the name of the .ino file in Johannes Web interface code
  • Johannes latest (Aug 2022) Web interface code has the file/folder structure required for the Arduino IDE so there's no need to make a new 'data' folder or move files about.
Once I sorted those things out the board updated and I could see the web interfece.

I'll update the Wiki page https://openinverter.org/wiki/Olimex_MOD-WIFI-ESP8266.

Re: HOWTO: Flashing ESP8266

Posted: Wed Dec 04, 2024 9:14 pm
by Alibro
For anybody else out there struggling to setup an Olimex ESP8266 I finally managed to get somewhere today.
It turns out this is a two stage process. First upload the sketch to your ESP8266, then upload the sketch data.

After an embarrassing number of hours I have the default gauges displaying in my car with a new Olimex ESP8266 and have documented it here partly as a reminder to me as well as a help for anyone struggling like I was.
As you might suspect everything you need is in the Wiki but it's a little hard to follow and my requirements were very specific, so while the default instructions worked they didn't give me what I needed. Anyway hopefully this might help.
Some of this is copied and pasted from Johannes page linked below.

I am using a FTDI board to connect to the Olimex RevB, you can see how it is connected here.
IMG_20241204_202516787.jpg
IMG_20241204_202312120.jpg
I have a couple of versions of FTDI board and they both worked but double check you have set them to 3.3V. While trying to figure this out I had them set to 5V a couple of times and didn't appear to kill the Olimex boards but they did get a little hot. Also the PDF I used to check the Olimex pin positions showed a picture of the socket not the plug so at one stage I had the connections mirrored and everything got a little hot!!!

Steps to follow
1. Go to the Wiki here https://openinverter.org/wiki/Olimex_MOD-WIFI-ESP8266
2. Inside Arduino IDE open the Preferences window - enter 'https://arduino.esp8266.com/stable/pack ... index.json' into the Additional Board Manager URLs. Note I was using Arduino IDE 1.8.19
3. Reboot the Arduino IDE and open Boards Manager from Tools > Board menu and install esp8266 platform.
4. Select your version of ESP8266 from 'Tools - Boards - ESP8266 - Olimex-MOD-WIFI-ESP8266' and the correct port.
5. Download https://github.com/esp8266/arduino-esp8 ... n/releases python support files - extract file to Arduino IDE tools folder like you see here https://randomnerdtutorials.com/install ... duino-ide/ - restart Arduino for changes to come into effect
You will probably need to create the tools folder as I didn't have one. For me the path was <home_dir>/Arduino/tools/ESP8266FS/tool/esp8266fs.jar
6. Download Johannes default Arduino code from https://github.com/jsphuebner/esp8266-web-interface and extract to the Arduino folder. You might need to rename the folder by removing "-master". (In my case I skipped this as I was using Damiens code for a Nissen Leaf VCU)
7. Open the code in the Ardunio IDE by double clicking the 'esp8266-web-interface.ino' file.
The following edit may be needed:- at about line 14 of the code (not the comments) there’s a line that should read "bool fastuartavailable = false;" if the value is set to true change it to false
8. Add the following libraries, ESPAsyncWEBServer and ESPAsyncTCP (a quick Google search should find them or use Johannes link https://github.com/damienmaguire/Lexus- ... /Libraries
9. Ensure you have set the FTDI board to 3.3V
10. Connect it as shown above then select Olimex MOD-WIFI-ESP8266(DEV) from the Tools/Boards menu and select the correct port.
11. Ensure the settings are as shown below - the Flash memory seems to be most important.
IMG_20241204_195411571_HDR.jpg
12. Use the Upload option to install the firmware in the Olimex and wait for the board to reset.
Note with the RevB board you need to hold the button down as you power it up to put it into programming mode.
if you used a new board you have to select "erase flash: sketch + wifi settings" from the Tools menu so the board will erase its password
13. Repower it with the button held down and select Tools - "ESP8266 sketch data upload" and wait for the board to reset.
14. Reboot the Olimex and connect to the wifi as usual. Open a browser and enter 192.168.4.1. This will give you Johannes ESP8266 WiFi page when you connect to the Olimex WIFI.
Note for this step I used the Nissan Leaf WiFi.ino from Damiens Github to give me the gauges when I used the IP above. A file seems to be missing from the leaf_wifi\data folder in Damiens Github which I found in his Lexus-GS450H guthub. It is solid-gauge.js. Please correct me if I'm wrong about this.


I Used a laptop with a fresh install of Linux Mint and installed Arduino from the Mint App installer which seems to default to Arduino 1.8.19. I can't comment on any other version.

Reasons it might fail.
It looks like you need an older IDE like Arduino 1.8.19. I tried using the current version and didn't get the option to "ESP8266 Sketch Data Upload" under 'Tools'. Linux Mint installs version 1.8.19 if you use the Software Manager and this works fine.
You need to set the Flash memory correctly for your ESP8266 under Tools.
You need to reboot the ESP8266 with the button held down each time you want to upload or do a Sketch data upload as it will reset itself to normal mode after every update.
In my case I was downloading files from Damiens Github and some of the folders needed renamed, like the data folder that holds the html stuff needs to be named in lower case, the Leaf wifi data folder was called Data so the Arduino IDE didn't see any files. This may not be an issue in Windows. Also a file was missing which I found in the Lexus GS450 github. The VCU I have was only sold for a short time before Damien designed the Zombieverter so is not widely used.

EDIT 1:
This process will give a web page but I'm struggling to get it to connect to the VCU.
I wanted to test it before plugging into my car VCU so have connected it to a Due (with Leaf_Gen1_5.ino installed) via the Serial2 connections. I see the activity light flashing but no changes to the display. I'll continue with this but if anyone has any suggestions please help.

Edit2:
OK so I'm a numpty.
I was uploading the ESP8266 sketch, then 'sketch data uploading' the Leaf WiFi web page. What I should have done for my Gen1 Nissan Leaf VCU was upload the Nissan Leaf WiFi sketch from Damiens Github (with the "solid-gauge.js" file copied from his Lexus GS450 repository to the data folder), then do the 'Sketch Data Upload' to send the web page to the board. This was relevant to me but may not be for you. I still don't have the correct SSID but it works so I don't care.
When the Olimex is powered up the web page is available on 192.168.4.1 and the gauges all show full scale. When plugged into the Gen1 Nissan Leaf VCU in my car it displayed the correct voltage etc.
As a test I connected it to an Arduino Due with the Nissan Leaf VCU sketch uploaded and the gauges immediately dropped to 0 where they normally they show full scale. I'm hoping they dropped to 0 as the Due is not receiving CAN from the Inverter, tomorrow I'll try sending a CAN log from a short drive to see what happens but I'm pretty certain it should work. As mentioned above I tried it plugged into my Freelander VCU and it showed the correct voltage and current just the same as the original Olimex supplied by Damien.
The main purpose of all this is to be able to have a test bed in my office where I can play with the settings of my VCU and test them without having to repeatedly send new sketches to the VCU in my car. I still have not worked out why the display will show data from the ISA shunt OR the Inverter but not both so if I have voltage, current and power from the ISA shunt I lose Inverter & motor temps and RPM. As a halfway house I use the DUE that controls charging to send RPM to the dash over CAN and the VCU sends info from the VCU to the display over WiFi. This way Iall I'm losing is temps which at this time of year are slightly less important.

Edit3:
I went back to this with a clean laptop and had some issues. I was able to install the software but every time I went into the admin page to change the display it corrupted with garbage showing where the title should be. After a while trying different things I eventually downloaded the libraries Johannes linked to and suddenly all was OK so the issue must have been an incompatible library.