Sevenstax / FreeV2G

Python based Host MPU Application for the use with 8DEVICES WHITE-BEET Embedded ISO15118 Module modules to realize IEC/ISO15118 and DIN70121 conform charging communication between electric vehicles (PEV) and elevtric vehicle supply equipment (EVSE). FreeV2G can e.g. been used with a Raspberry Pi.
Other
57 stars 26 forks source link

Question: Steps to Update the firmware of WhiteBeet Module #302

Closed varshilgandhi closed 4 months ago

varshilgandhi commented 7 months ago

Question Where to get the STxFwUpdater.exe file.

I followed the Chapter 7:2 for update the latest firmware of the WhiteBeet Module from the User-Manual of White Beet.

image

As mention in the above image that first I have to fulfill the requirements for using the firmware upload tool 'StxFwUpdater'. and for that I go to Chapter 22.1

image

I Installed all above libraries in my linux setup.

Now as per there documentation now I have to execute below command:

STxFwUpdater.exe -f mac_address.fwu -t 00:01:01:63:77:33 -i eth0

But now I am stuck that where to find this STxFwUpdater.exe file? Also they created this mac_address.fwu file. So I want to know that how to get this files?

nststx commented 7 months ago

Hi @varshilgandhi,

thanks for submitting your question. You can find the firmware update tool in the CODICO download area. If you're using a linux setup you don't want to use the .exe file as this is a windows only executable and won't run on linux. If you've already installed the required python packages there's no need to use the executable anyways as it only contains the python program prepackaged with the required packages. The mac_address.fwu file is only a sample file. It's not what you want to use to update the firmware of your board. To update your board please follow these steps:

  1. Download the FWU tool from the CODICO download area
  2. Download the FWU file for the firmware version that you want to update to
  3. Install libpcap. For Ubuntu or Debian distributions you can do this by running sudo apt update && sudo apt install libpcap-dev in your terminal. Note that libpcap is required for the tool to work
  4. Install all the required python packages (which reading from your post, you already did). Otherwise please install them by running pip install -r requirements.txt in the FWUTool folder in your terminal.
  5. Run the tool with the following command: python3 FWUTool.py -f <path_to_the_fwu_file> -t <mac_address_of_your_board> -i <interface_name_where_wb_is_connected> eth

I hope I could help you with your issue. If you have any further questions or are running into trouble while updating your board, please let me know!

Best regards, Niklas Stoffers

varshilgandhi commented 7 months ago

Hey Niklas,

Thanks for replying.

I followed your steps and tried to download the FWU tool from the CODICO download area, as you mentioned in the first step.

However, when I click on the file QCA7005_FW_3.3_lite.zip (which I believe is the FWU tool based on the image), it prompts me to contact a CODICO representative. Should I send an email to CODICO to obtain the tool?

image

Thanks and Regards, @varshilgandhi

lho-stx commented 7 months ago

Hey,

yes, please contact Codico.

Thank you, lho

varshilgandhi commented 7 months ago

Hey @nststx,

Thanks for the steps to update the WhiteBeet firmware on Linux. However, I encountered some difficulties creating the FWU file while following the user manual for Windows.

Since creating the FWU file seems easier on Windows, I'm currently using that approach.

I follow below steps:

First I created one python file and name of that python file is fwuconfig_macaddress.py Here I attach that file: fwu_config__example.zip

I am using this command to generate the FWU file: .\StxFwGen.exe -k .\SigningCert.key -c .\fwu_config__example.py -o mac_address.fwu

I got below logs when I generate the FWU file:

PS C:\Users\varsh\Downloads\Sevenstax_WHITEBEET_tools2023_05_10 (1)\Sevenstax_WHITEBEET_tools2023_05_10\Windows\StxFwGen> .\StxFwGen.exe -k .\SigningCert.key -c .\fwu_config__example.py -o mac_address.fwu SEVENSTAX Firmware Update Generator

After this I follow the steps of the Uploading the firmware via StxFwUpdater:

I am using this below command:

STxFwUpdater.exe -f mac_address.fwu -t 00:01:01:63:77:33 -i Ethernet

PS C:\Users\varsh\Downloads\Sevenstax_WHITEBEET_tools2023_05_10 (1)\Sevenstax_WHITEBEET_tools2023_05_10\Windows\StxFwUpdater_FWUtool> .\FWUtool.exe -f ..\StxFwGen\mac_address.fwu -t c4:93:00:48:AC:45 -i Ethernet Welcome to the SEVENSTAX FWU Tool 2.6

Initiating framing interface Set time on the target to 2024-04-18T06:46:57Z Starting update process Firmware update at 0 percent; Sent: 833 Bytes Done.

Can you please check above steps and please tell me that is it the correct steps or not.

Thanks for your continued support!

Best regards, @varshilgandhi

varshilgandhi commented 7 months ago

Update:

Then I take the FWU file from the CODICO PLC documentation area.

I took this file WHITEBEET_ISO15118_EVSE_V01_01_07.fwu. I didn't change any thing in this fwu file.

I change the code in the fwu_config_example.py file. In below image you can see my updated code:

image

Then I start to perform again the same steps:

PS C:\Users\varsh\Downloads\Sevenstax_WHITEBEET_tools2023_05_10 (1)\Sevenstax_WHITEBEET_tools2023_05_10\Windows\StxFwGen> .\StxFwGen.exe -k .\SigningCert.key -c .\fwu_config__example.py -o .\WHITEBEET_ISO15118_EVSE_V01_01_07.fwu SEVENSTAX Firmware Update Generator

Mode LastWriteTime Length Name


d----- 18-04-2024 06:31 Dir2StxFs d----- 18-04-2024 06:31 StxCfgGen d----- 18-04-2024 06:59 StxFwGen d----- 18-04-2024 06:31 StxFwUpdater_FWUtool

PS C:\Users\varsh\Downloads\Sevenstax_WHITEBEET_tools2023_05_10 (1)\Sevenstax_WHITEBEET_tools2023_05_10\Windows> cd .\StxFwUpdater_FWUtool\ PS C:\Users\varsh\Downloads\Sevenstax_WHITEBEET_tools2023_05_10 (1)\Sevenstax_WHITEBEET_tools2023_05_10\Windows\StxFwUpdater_FWUtool> ls

Directory: C:\Users\varsh\Downloads\Sevenstax_WHITEBEET_tools__2023_05_10 (1)\Sevenstax_WHITEBEET_tools__2023_05_10\Windows\StxFwUpdater_FWUtool

Mode LastWriteTime Length Name


-a---- 18-04-2024 06:31 8539951 FWUtool.exe

PS C:\Users\varsh\Downloads\Sevenstax_WHITEBEET_tools2023_05_10 (1)\Sevenstax_WHITEBEET_tools2023_05_10\Windows\StxFwUpdater_FWUtool> .\FWUtool.exe -f ..\StxFwGen\WHITEBEET_ISO15118_EVSE_V01_01_07.fwu -t c4:93:00:48:AC:45 -i Ethernet Welcome to the SEVENSTAX FWU Tool 2.6

Initiating framing interface Set time on the target to 2024-04-18T07:02:17Z Starting update process Firmware update at 0 percent; Sent: 833 Bytes Firmware update at 7 percent; Sent: 45815 Bytes Firmware update at 25 percent; Sent: 119952 Bytes Firmware update at 43 percent; Sent: 202419 Bytes Firmware update at 61 percent; Sent: 288218 Bytes Firmware update at 79 percent; Sent: 375683 Bytes Firmware update at 99 percent; Sent: 463981 Bytes Done.

Now I have the question that How I can know that My Firmware is successfully updated with the latest version or not?

Thanks and regards, @varshilgandhi

varshilgandhi commented 7 months ago

Hey @lho-stx and @nststx ,

Can you please give an update on it?

Because What happens is When I did the above changes now again when I start the charging then every time SLAC matching is failed.

Thanks, @varshilgandhi

varshilgandhi commented 7 months ago

Hey @nststx and @lho-stx , Can you please give me update on above issue.

Thanks and regards, @varshilgandhi

lho-stx commented 7 months ago

Hey @varshilgandhi,

I think there is some confusion here:

There are two different types of firmware, the Whitebeet firmware and the QCA firmware (uploaded from the microcontroller in the Whitebeet to the QCA7005). To update the Whitebeet firmware you need to follow the instructions given by @nststx . What you now did was to overwrite the QCA firmware file in the file system of the Whitebeet with a copy of the Whitebeet firmware.

To recover you need to replace the QCA firmware with the original one and then update the Whitebeet firmware with the correct one from the Codico website, following the guide from @nststx. The fwu name should have "EVSE" and "02_01_00" in it.

When done correctly you can see if the firmware version is indeed 2.1.0 by observing the "Get firmware version" command. It then should tell you the correct firmware version. FreeV2G handles this for you.

I hope this resolves your issue.

Best regards, lho

varshilgandhi commented 7 months ago

Hey @lho-stx , As you told me to replace the QCA Firmware with the original one but how can I find the original QCA firmware. Can you please give me steps to do it.

Thanks and regards, @varshilgandhi

nststx commented 7 months ago

Hey @varshilgandhi,

As @lho-stx has already told you you replaced the firmware of the QCA chip with our Whitebeet EVSE firmware. Thus the QCA does not work as expected and SLAC matching is failing. To fix this you'll need to replace the wrong QCA firmware with the original one. I'll talk to a colleague on whether and how we can provide a firmware file for you to do this. After you've replaced the QCA firmware please make sure that everything is working again as expected. After that you can update the firmware of the Whitebeet itself by following the steps that I mentioned in a previous post.

Please give me some time to clarify on whether we can provide you the QCA firmware file. I need to talk to a colleague about this as there may be license issues involved. I'll come back to you once I know how we'll proceed.

Best regards, Niklas Stoffers

varshilgandhi commented 7 months ago

Hey @nststx ,

Thanks for replying and clarifying the issue. I apologize for the mistake of replacing the QCA chip firmware with the Whitebeet EVSE firmware.

I'm definitely waiting for your update on the availability of the original QCA firmware file.

I also have a question: Once I receive the original QCA firmware, on which board should I replace it? Is it the EVSE board or the EV board, or do I need to replace it on both boards?

Thanks and regards, Varshil

varshilgandhi commented 6 months ago

Hey @nststx,

I want to give you one more update that when I down FW VER switch in the both the EVSE and EV board like below, image

And then I start the charging again and it works completely fine SLAC matching also done and charging completed 100%.

Can you please explain me how this can happens?

Best regards, Varshil

varshilgandhi commented 6 months ago

Hey @nststx ,

Is there update on above things?

Best regards, @varshilgandhi

nststx commented 6 months ago

Hi @varshilgandhi,

thanks for reaching out to us again. For now you can use the FW VER switch as a workaround. We have two versions of the QCA firmware inside our internal file system. By using this switch you change from using QCA firmware version v3.0 to firmware version v1.1.0. They both have their own separate file paths and since you've only overriden the v3.0 firmware you are still able to use the v1.1.0 firmware.

Of course we only consider this a temporary solution and will reach out to you again once we've got confirmation on our license issues.

Best regards and thanks for your patience, Niklas Stoffers

varshilgandhi commented 6 months ago

Hi @nststx ,

Thanks for the prompt reply and the temporary solution. I appreciate you clarifying the next steps and will wait for your update on the availability of the original firmware.

Thanks and regards, Varshil

lho-stx commented 4 months ago

Hey @varshilgandhi,

I send you an e-Mail.

Best regards, lho