Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openevse_wifi_tft_v1.bin problem #881

Open
ToniRos opened this issue Jul 12, 2024 · 32 comments
Open

openevse_wifi_tft_v1.bin problem #881

ToniRos opened this issue Jul 12, 2024 · 32 comments
Labels
bug Something isn't working highpriority

Comments

@ToniRos
Copy link

ToniRos commented Jul 12, 2024

openevse_wifi_tft_v1.bin binary fails when installing it in the module https://store.openevse.com/collections/all-products/products/openevse-color-lcd-wifi

openevse_wifi_v1.bin has been tested in a standard module and works perfectly

Compiling the sources produces a binary that doesn't work either.

Any idea what to try?

Greetings.

@ClassicGOD
Copy link

Same here. In debug console it goes to 99% and stops. Web interface remains accessible even after restarting so at least it does not brick the EVSE.

My TFT module is currently on "v5.1.0_modified" - it was shipped to me with this firmware about a month ago.

Debug console extract attached.
OpenEVSE WiFI debug.txt

@jeremypoulter jeremypoulter added bug Something isn't working highpriority labels Jul 12, 2024
@FrancoisBourdon
Copy link

FrancoisBourdon commented Jul 12, 2024

Hello all,
I am also getting the same problem.

Trying to update the installed v5.1.0_modified openevse_wifi_tft_v1.bin file on my OpenEVSE Color LCD / WiFi board using either the UI or the Web Interface and I get the following results:

  • updating to v5.1.1 fails (UI stuck at ~99% progress or Web Interface returns "Error: 4")
  • updating to July 11th dev build fails (UI stuck at ~99% progress or Web Interface returns "Error: 4")
  • "updating" to v5.1.0_modified succeeds (UI progress completes or Web Interface returns "OK")

For the Web Interface update I use the following command and return.

/tmp/5.1.1$ curl -F 'file=@openevse_wifi_tft_v1.bin'  http://10.165.122.130/update && echo
Error: 4

According to the following define, it appears to be related to a lack of space
#define UPDATE_ERROR_SPACE (4)

As mentionned before, if I update to the already installed and working v5.1.0_modified with the following command, it returns OK.

/tmp/5.1.0$ curl -F 'file=@openevse_wifi_tft_v1.bin'  http://10.165.122.130/update && echo
OK

I dont have the specific LC231X USB debug adapter, nor there is a DEBUG connector mounted on the display PCB, so I could not try to delete everything as suggested here:
https://github.com/OpenEVSE/openevse_esp32_firmware/blob/master/docs/user-guide.md#via-usb-serial-programmer

In all cases, the OpenEVSE Color LCD / WiFi board is still running (it is not bricked) with v5.1.0_modified

Hope this data helps in the investigation.

Best regards,
François

@jeremypoulter
Copy link
Collaborator

This worked for me ok, however I do have a theory, @chris1howell can you confirm the command used to flash the device in the factory? Can you also let me know if you use the same partitions.bin as the non-LCD board?

Also if anyone else is able can you try flashing the latest dev build using Platform IO?

@jeremypoulter
Copy link
Collaborator

Note you don't need the debug connector to flash using Platform IO, the EVSE connector is used for programming for exactly this reason. Connect to a USB to UART adapter, hold down the boot button and press the reset button should put it into programming mode.

@ToniRos
Copy link
Author

ToniRos commented Jul 14, 2024

I tested with Patform IO and firmware loads OK:

git checkout master
...
pio run -e openevse_wifi_tft_v1 -t upload
...
Writing at 0x001e75c3... (98 %)
Writing at 0x001ec9c1... (100 %)
Wrote 1972112 bytes (1340651 compressed) at 0x00010000 in 19.6 seconds (effective 805.5 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...

image

Now I try with esptool:
esptool.py --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size detect 0x10000 openevse_wifi_tft_v1.bin

And seems that works:

image

In the console apperars:

ets Jul 29 2019 12:21:46

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1344
load:0x40078000,len:13964
load:0x40080400,len:3600
entry 0x400805f0
E (412) psram: PSRAM ID read error: 0xffffffff
[    55][E][vfs_api.cpp:105] open(): /littlefs/schedule.json does not exist, no permits for creation
$GV^35

@jeremypoulter
Copy link
Collaborator

Thanks, I suspect the boards have been flashed with the wrong partitions file. @chris1howell

@FrancoisBourdon
Copy link

FrancoisBourdon commented Jul 14, 2024

Note you don't need the debug connector to flash using Platform IO, the EVSE connector is used for programming for exactly this reason. Connect to a USB to UART adapter, hold down the boot button and press the reset button should put it into programming mode.

Oh! Thank you Jeremy! In that case I actually have what is needed to use the primary serial port to perform the format with the proper partitions as you are suggesting in another post. Thanks again for following up

@FrancoisBourdon
Copy link

FrancoisBourdon commented Jul 17, 2024

Hello all,
I was able to fix my problem by installing esptool & PlatformIO and recompiling the latest version of the firmware.
Then I was able to download the firmware (including the proper partitions) to my device using a USB to serial comm adapter connected to serial port of the display board where the OpenEVSE board usually connects.
To put the display board in bootload mode, I had to press Boot button, then Reset button.

git clone https://github.com/OpenEVSE/ESP32_WiFi_V4.x.git
pio run -e openevse_wifi_tft_v1 -t upload

Also, after an initial success, I had to completly erase the device flash due to a crash that left me with a device stuck with a blank screen.

esptool.py erase_flash
esptool.py write_flash 0x000000 blank_1MB.bin 0x100000 blank_1MB.bin 0x200000 blank_1MB.bin 0x300000 blank_1MB.bin
pio run -e openevse_wifi_tft_v1 -t upload

Thanks for the help.
François

@rbray89
Copy link
Contributor

rbray89 commented Jul 19, 2024

I'm assuming this is a size issue? I was able to "sidegrade" to the non-tft version. If we can update the partition info in the non tft version, people should be able to migrate to that as an intermediate step to update to current tft bins.

@andy-81
Copy link

andy-81 commented Jul 19, 2024

I am having the same issue as this having just received my unit. Happy to follow the details above to resolve the issue but keen not to have the same problem when updating again, is the plan to resolve the issue with a new release of firmware or should I follow the steps to fix this one knowing that I will not have the issue again when the next firmware is released?

Any advice on how best to solve the issue would be appreciated 😄

@jeremypoulter
Copy link
Collaborator

Yeah if you do the above that will fix the device going forward

@ClassicGOD
Copy link

ClassicGOD commented Jul 20, 2024

Yeah if you do the above that will fix the device going forward

Is there any official fix or guide coming? I'm asking because I'm lazy as hell and I will wait if that means I don't have to remove the display from my evse, drag it back to my PC, dig out UART adapter that I have not used for so long that I'm pretty sure is lost to time and flash it that way.

Is there an action plan for people that don't have a necessary hardware or know how to flash the boards themselves? Because it sounds like all boards in at least the latest production run are affected.

@jeremypoulter
Copy link
Collaborator

Possibly, we need to see if we can reduce the firmware size so it fits in the existing partition size, then we need to see if you can rewrite the partition table from the firmware

@ausil
Copy link

ausil commented Jul 20, 2024

I just opened up and flashed two units that were impacted. Ideally, an OTA update will fix it, I suspect many will not have the necessary tools or connectors. I had to use some dupont wires to get things wired up right to do the update.

@jeremypoulter
Copy link
Collaborator

python3 ~/.platformio/packages/framework-arduinoespressif32/tools/gen_esp32part.py min_spiffs.csv partitions_4mb.bin
python3 ~/.platformio/packages/framework-arduinoespressif32/tools/gen_esp32part.py openevse_16mb.csv partitions_16mb.bin

@jeremypoulter
Copy link
Collaborator

@blaxer
Copy link

blaxer commented Jul 24, 2024

I think I might be experiencing the same issue but I am very new to this so I apologize in advance for my ignorance.

But, I was able to get the charger up and running, everything seemed to be fine but it said there was a firmware update to v5.1.1 from v5.1.0_modified so I went ahead and did that. Now everything seems to be working, charging is good, web interface is fine, MQTT working, except the TFT display is completely blank / dead / off (no backlight)...

UPDATE:

For anyone who finds this thread because their LCD is blank these steps worked for me:

esptool.py erase_flash
esptool.py write_flash 0x000000 blank_1MB.bin 0x100000 blank_1MB.bin 0x200000 blank_1MB.bin 0x300000 blank_1MB.bin
pio run -e openevse_wifi_tft_v1 -t upload

Thank you @FrancoisBourdon you are a life saver!

@UKenGB
Copy link

UKenGB commented Aug 5, 2024

I've recently received 2 large LCDs, one with a new lid to upgrade an existing EVSE I already have and the other part of a full kit. The first new LCD I've tried has this problem. Current firmware is v5.1.0 modified. It tells me the latest is v5.1.1. So I press the Update button and choose 'direct from GitHub' and as per usual says it's starting the download, but it gets no further. Never gets to the update progress bar. In fact it seems stuck and I have to refresh the page.

Looking here, the actual file for this display seems to have been removed which might explain the problem?

It is currently running on v5.1.0 modified, but what's the actual solution to this. Is there a new correct v5.1.1 (or later) being prepared? When might we see that?

@andy-81
Copy link

andy-81 commented Aug 15, 2024

Any update on this?

I have an FT232 serial board which I tried to update as per the above details however I was unable to connect to the display board. It must have been the wiring as the error was that it could not connect to the USBtty0 board.

I wired the VCC to the 5-12v pin, GND to the GND, RX to TX, TX to RX. I even tried switching the TX/RX pins around just incase but still no connection. The display turned on so it should have been powering the esp board.

This is the command I was using:
esptool.py --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size detect 0x10000 openevse_wifi_tft_v1.bin

and the FT232 board is an older version of this one with only 3.3v or 5v as the options (obviously I have it set to 5v at present:
Board

I also notice the download is no longer available for the TFT board for 5.1.1 firmware, is this because it is being worked on at present? I downloaded the original file while it was available so have been trying with this firmware.

@jamarju
Copy link

jamarju commented Aug 24, 2024

@andy-81 check that your board is in bootloader mode: press boot, then reset, then release reset and finally release boot. The screen should go black meaning you entered the bootloader, then you can flash. I just upgraded from 5.1.0_modified to 5.1.2 using your exact command line:

esptool.py --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size detect 0x10000 openevse_wifi_tft_v1.bin

The ESP32 will stay in the bootloader so press reset again to get out of it after it's done.

Wiring:

  • VCC - 5-12
  • GND - GND
  • RX - TX
  • TX - RX

My FT232 is also in 5v mode. Also doublecheck the connections if you are using the provided harness as pins RX/TX and 5-12V/no label are crossed.

I also flashed from source before that using pio run -e openevse_wifi_tft_v1 -t upload before flashing the released 5.1.2 bin file but I'm not sure that actually mattered.

@andy-81
Copy link

andy-81 commented Aug 29, 2024

@andy-81 check that your board is in bootloader mode: press boot, then reset, then release reset and finally release boot. The screen should go black meaning you entered the bootloader, then you can flash. I just upgraded from 5.1.0_modified to 5.1.2 using your exact command line:


esptool.py --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size detect 0x10000 openevse_wifi_tft_v1.bin

The ESP32 will stay in the bootloader so press reset again to get out of it after it's done.

Wiring:

  • VCC - 5-12

  • GND - GND

  • RX - TX

  • TX - RX

My FT232 is also in 5v mode. Also doublecheck the connections if you are using the provided harness as pins RX/TX and 5-12V/no label are crossed.

I also flashed from source before that using pio run -e openevse_wifi_tft_v1 -t upload before flashing the released 5.1.2 bin file but I'm not sure that actually mattered.

Thanks for that, I managed to flash but now my screen wont turn on and the esp board isnt booting. When I open the serial port and look at the output I am getting an

rst:0x10 (RTCWDT_RCT_RESET), boot:0x13

with a load of invalid header signals which just keeps repeating. any ideas?

@jamarju
Copy link

jamarju commented Aug 29, 2024

Try this:

"
The current repartition process for the TFT LCD in the short term requires a USB => Serial adapter and esptools (requires Python and pyserial).

Download the 5.1.2 - openevse_wifi_tft_v1.bin, bootloader_16mb.bin and partitions_16mb.bin from
https://github.com/OpenEVSE/openevse_esp32_firmware/releases/tag/v5.1.2

Connect the module to the USB => Serial adapter, then put the module in bootloader mode by holding BOOT and then pressing RESET then release BOOT

Run the command:

esptool --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_size=detect 0x1000 bootloader_16mb.bin 0x8000 partitions_16mb.bin 0x10000 openevse_wifi_tft_v1.bin
"

(as suggested by the OpenEVSE folks)

@andy-81
Copy link

andy-81 commented Aug 29, 2024

Try this:

" The current repartition process for the TFT LCD in the short term requires a USB => Serial adapter and esptools (requires Python and pyserial).

Download the 5.1.2 - openevse_wifi_tft_v1.bin, bootloader_16mb.bin and partitions_16mb.bin from https://github.com/OpenEVSE/openevse_esp32_firmware/releases/tag/v5.1.2

Connect the module to the USB => Serial adapter, then put the module in bootloader mode by holding BOOT and then pressing RESET then release BOOT

Run the command:

esptool --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_size=detect 0x1000 bootloader_16mb.bin 0x8000 partitions_16mb.bin 0x10000 openevse_wifi_tft_v1.bin "

(as suggested by the OpenEVSE folks)

Thank you, I was worried I would be stuck for a lot longer. This solved it for me, so it obviously needed the partition table with it to resolve.

All updated now so hopefully future updates should be straight forward from now on.

@gtrhayrug
Copy link

Hi,
I've received a car charger in 5.1.0_modified and i can't update to 5.1.2. Stuck at 0% or 99%.
I've this kind of USB to serial adapter originally bought for the OpenEVSE board.
image

I don't find any connector on the bottom face of the LCDscreen. Right ?

I need to buy a new one :
image

Could you confirm me I need to solder wire directly on the bottom face (red curve)
image

@olivervhansen
Copy link

Hi, I've received a car charger in 5.1.0_modified and i can't update to 5.1.2. Stuck at 0% or 99%. I've this kind of USB to serial adapter originally bought for the OpenEVSE board.

I've got some similar questions as @gtrhayrug. After following this thread I purchased the Programmer cable but now that I go to connect it to the WiFi board where the rest of the system usually connects none of the connectors fit. They are all two rows of pins while the WiFi TFT LCD board is 6 pins inline.

In this thread there is a lot of talk about how to flash the new firmware using software but no instructions for what hardware is needed and how to connect it. I've had mine less than a year and it appears maybe the part I ordered is for an older board but there is no way for me to know what I need. Is anyone able to provide specific instructions? I don't want to be stuck on this firmware forever.

@gtrhayrug
Copy link

The problem for me is to pay taxes again. I've already twice especially due to the support reship for a new screen plus board because on the first parcel, components missing on the board.
If I need to buy again something, i need to pay again taxes. And I don't like is to pay for something even if the firmware uploaded in the factory is buggy...
I've the car charger since March of this year and i can't used it !

@gtrhayrug
Copy link

gtrhayrug commented Oct 28, 2024

Hi, I've received a car charger in 5.1.0_modified and i can't update to 5.1.2. Stuck at 0% or 99%. I've this kind of USB to serial adapter originally bought for the OpenEVSE board.

I've got some similar questions as @gtrhayrug. After following this thread I purchased the Programmer cable but now that I go to connect it to the WiFi board where the rest of the system usually connects none of the connectors fit. They are all two rows of pins while the WiFi TFT LCD board is 6 pins inline.

In this thread there is a lot of talk about how to flash the new firmware using software but no instructions for what hardware is needed and how to connect it. I've had mine less than a year and it appears maybe the part I ordered is for an older board but there is no way for me to know what I need. Is anyone able to provide specific instructions? I don't want to be stuck on this firmware forever.

For me, your programmer cable is for OpenEVSE, not for the TFT (ESP32).
if i well understand this one is required :
https://store.openevse.com/collections/all-products/products/usb-to-serial-comm

@olivervhansen
Copy link

Thank for the input @gtrhayrug. I saw that cable but it specifically states "Serial is not supported for firmware upload on OpenEVSE controller". Now, maybe there is a distinction between updating firmware on the OpenEVSE controller and firmware on the TFT but as I purchased it together as a package in my mind they are the same.

I'm still left with the question: which firmware am I upgrading when I attempt to upgrade to 5.1.2? And how do I physically connect to do this?

I'm also a bit frustrated as I paid extra for faster shipping so I could get this project done while I was not working for a week so now I have the wrong cable and need another and don't have the time.

@chris1howell @jeremypoulter will there be any guidance for those who purchased these devices in a state that they cannot be updated? Clearly the owners of these devices have varying skillsets and I believe it would be helpful to have clear guidance to avoid heading down the wrong path as I seem to have done.

@chris1howell
Copy link
Member

@olivervhansen The OpenEVSE controller is the module inside the station enclosure and controls all the communication/safety with the vehicle. It uses the AVR (Atmega) Programmer (2 rows of 3 pins). The port is top middle of the OpenEVSE Safety Module.

The WiFI module and WiFi/Display Module uses a USB/Serial Adapter. It has 6 pins all in a row. THe adapter from the OpenEVSE store comes with 2 harnesses one for older modules included in our kits like the Adafruit Huzzah and one for the latest modules.

The modules can be updated, unfortunately just not the easiest way wireless over the air. If you do not have the correct USB/Serial Module or can not update for whatever reason, you can ship the module to OpenEVSE and we will update and return free of charge.

@olivervhansen
Copy link

Thank you for the clear explanation @chris1howell. I received the proper cable today and will try to find some time to update the Wi-Fi display module.

@tonyfinn78
Copy link

@chris1howell @jeremypoulter Following on from @olivervhansen's comment a guide would be very useful for those with less experience in updating the relevant module(s). Additionally, a kind gesture would be to offer free shipping/reduction code on the USB to serial cable to customers who've ordered a product that effectively cannot be updated out-of-the-box. I, for one, cannot afford downtime to ship the module back to you at my cost.

@zanderz
Copy link

zanderz commented Jan 6, 2025

@chris1howell I have emailed and opened a ticket about this with no response to either for months, and only chanced on your comment after much internet scouring. I might try updating myself but the instructions seem incomplete, contradictory and confusing. How can I initiate the process of sending in my charger for firmware update? do I just stick it in the box with a note? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working highpriority
Projects
None yet
Development

No branches or pull requests