Enova Gyrfalcon S4000Pro/S8000 firmware upgrade: Linux users need suffer no more! :-)

Per my post in the main Gyrfalcon charger thread:

So here it is: Updatetool_GYRFALCON_S8000-1.0-x86_64.AppImage - Google Drive (v1.0)
New and improved v1.1: Updatetool_GYRFALCON_S8000-1.1-x86_64.AppImage - Google Drive

This is a straight port to Linux of Enova’s Firmware Upgrade Tool originally written for Windows, so if you are wary of doing it using a VM (which can be unreliable as the charger disconnects and reconnects from the USB port during the upgrade – ask me how I know :wink: ), and/or tired of rebooting your PC to Windows and then back to Linux just for that (as I certainly was, having gone through quite a few firmware releases as Enova kindly implemented my suggestions and asked me to test them), SUFFER NO MORE: SALVATION IS AT HAND and now you can upgrade your firmware directly from straight honest-to-Dog Linux! Yay! :smiley:

It’s a single-file binary, and does not need any installation: just put the downloaded file somewhere convenient (eg your desktop or wherever you keep your Gyrfalcon stuff), give it execute permission (chmod +x or the equivalent on your GUI/File Manager), and execute it. Listo, Presto & Pronto, away it goes!

It’s been packaged using the AppImage standard so it should run in basically any Linux distro, version and kernel, from AntiX and Arch all the way down the list to ZipSlack and Zorin, as long as it’s recent enough to support plug-and-playing of USB ports and has a driver for the CH34x chip the Gyrfalcon chargers use; I’ve already tested it on Devuan Daedalus (systemd-free fork of Debian Bookworm) which is their most recent stable version, Ubuntu 18.04 (launched in 2018 and EOL’ed since 2023) and even Fedora 21 (from way back in 2014!) and it worked on all of them.

This is a call for testers, so please go ahead and test it to your heart’s content! And please let me know what distro you tested it on, and what the results were, be they positive or negative.

Also please be aware that there’s always some risk in running any piece of software; I am sure the above is free from viruses or any kind of malware as I compiled it (and use it) myself, and I don’t think your charger is at any risk of being bricked or whatever as Enova’s firmware upgrade protocol is pretty reliable and resilient, but as ever there are no guarantees.

That said, I really want this tested by more people, and thanks everyone in advance for your help with that!

TIA!

EDIT: new version available: v1.1, edited the link above.

4 Thanks

When I first had the S8000 in my hands a year ago, one of the first things was to check how the serial communications and firmware update works. So many memories from the past! YMODEM – and unfortunately incompatible with the Linux tools I had at hand. So I had to use Windows in a VM with Xshell and later their official update tool.

I did it countless times and never had a problem. I simply assigned the VID/PID to the VM.

Thanks for you work on porting it to Linux. I would already have done it if their code was open source. Do you know if Enova plans to release the source for their tool?

1 Thank

Thanks

1 Thank

Thanks for your response, Sammy!

Yeah, I’m from that time too. I vividly remember getting my grubby hands on my first 1200/75 baud modem back in the 80s – at work where I used it to download data files for a research project, but it was QUITE an upgrade over the 300/300 baud modem it replaced. It was amazing to see files zipping by at 4x the previous speed. The amazement vanished pretty fast once I had to upload the resulting files back at exactly 1/4 of the previous speed, tho :expressionless:

Anyway, when I got the 1200/75 modem I started researching on a better protocol than the XModem we used for that, as the latencies due to the ACKs every 128(?) bytes really sucked – and even back at that time, there were quite a few different implementations of YModem, all of them incompatible with each other :frowning: So it seems this situation perdures to this day.

So I had to use Windows in a VM with Xshell and later their official update tool.

I feel your pain :frowning: or rather felt, now that I have ported their utility to Linux. :partying_face:

Did the same here, but the delay when the charger disconnected and reconnected, at least here on my environment, was enough to make things fail. Glad to hear you have no such problems. Virtualbox or QEMU/KVM?

Thanks for you work on porting it to Linux.

You are welcome! And thank you for your great reviews and contributions, including on other projects like Anduril – I have learned, and continue to learn, a lot from you.

I would already have done it if their code was open source. Do you know if Enova plans to release the source for their tool?

My understanding is that they plan to keep their source code proprietary (@enova18650.com, please correct me if i’ m wrong).

I also prefer opensource and by a large factor at that, but I can understand their reticence – nowadays any and all products get cloned at the speed of light by someone willing to sell it for half the price (due to not having to invest in R&D on getting it ready in the first place, and oftentimes also by using inferior components, no QC, etc) and IMO releasing the source code in a product like these chargers would mean empowering these bad guys even more.

Oh, I wasn’t talking about the firmware, but only about the update tool. That little Qt program with not much more than a bit of serial communication.

I’m not that old, but startet early with computers and have worked with older technology back then.

Virtualbox.

1 Thank

I think they’re using the same policy for firmware and all other software (notable exception is their definitions for TestController – not that it could be compiled, but it could very well have been obfuscated, and kudos to them for not doing that: their definitions file is very much readable and throws quite a bit of light into the charger’s workings and its interactions with TC).

I think I just betrayed my own age :wink: And yeah, I’m in the same boat, started in my early teens and dealt with a lot of older technologies (I still have a honest-to-Dog punchcard with my name punched on it).

Same here. But in my case I found the disconnects and reconnects being handed back and forth between the VM host and the guest introduced enough delay to derail the process. The problems became less frequent when I started using the “heavy duty” (120W!) cable that came with the S8000, so more than one factor could have been involved. Anyway, this is a thing of the past now that we a native version of the upgrade program for Linux.

A big THANK YOU to everyone who helped (you know who you are!) Version 1.1 now available: Updatetool_GYRFALCON_S8000-1.1-x86_64.AppImage - Google Drive

No critical changes, most are cosmetic but the first one was bothering me since the original Windows EXE from Enova:

  • Fixed progress bar update (which as a nice and intentional side effect, also fixes the total bytes sent being less than the file size in the message shown after the firmware file was successfully transmitted);

  • By default sets the starting directory on the file browser dialog to the user’s home directory, or to /tmp if a home directory is not defined (version 1.0 set the starting directory in the middle of the AppImage squash mount, not very useful and a bit confusing);

  • Added a custom message handler function, so we can use gdb to set breakpoints inside it to try and debug where warning messages are being generated; also, added special handling to filter out useless warning messages that were spamming the command-line terminal when the program was started from one, in some linux distros;

  • Fixed a gcc warning due to a unused function parameter;

  • Replaced some hard-coded loops with the equivalent (more efficient and better documented) Qt/stdlib library calls;

  • More and better code comments.

Please keep those testing reports coming! :+1:

Several weeks ago I finally managed to update the firmware with a Linux system, without using the official updater. Key was to use the ymodem Python package which uses a compatible YMODEM implementation (it took me a lot of debugging to find out what was wrong with lrzsz (the default YMODEM tool under Linux) and I’m not going to fix it).

I shared this information with Enova and wrote a short manual of how to update the firmware under Linux.


Firmware Update Guide (Linux CLI)

Preparation

Install dependencies

Following packages are required and must be installed before performing the update.

  • Python 3
  • python-pip
  • python-venv

For example in Ubuntu, run:

sudo apt update
sudo apt install python3 python3-pip python3-venv

Create workspace for update

This creates a virtual Python environment and downloads required modules.
Open a terminal and run:

mkdir gyrfalcon_update
cd gyrfalcon_update
python3 -m venv .
. bin/activate
python3 -m pip install ymodem

You can use the same environment for future firmware updates.

Perform the update

  1. Download and unpack the firmware archive.

  2. Open a terminal and activate the update workspace you created earlier (e.g. gyrfalcon_update):

    . gyrfalcon_update/bin/activate
    

    Adjust the path as necessary.

  3. Plug in the power supply to the charger, then connect the charger via USB to your computer.

  4. A new serial device should appear, most likely /dev/ttyUSB0.
    Use this device in all further commands.
    It might be necessary to give your user additional permissions:

    sudo chmod 666 /dev/ttyUSB0
    
  5. Set up the serial connection:

    stty -F /dev/ttyUSB0 115200 cs8 -cstopb -parenb
    
  6. Reboot the charger into the bootloader by executing:

    echo '*fwupdrst' > /dev/ttyUSB0
    
  7. Now you are ready to upload the firmware. Adjust the path as required:

    ymodem send -p /dev/ttyUSB0 /path/to/GYRFALCON_S8000_Firmware.bin
    
  8. After a successful update, the charger will reboot automatically.
    It is now safe to close the terminal and unplug the USB cable.

2 Thanks

Kudos to you for finding an open-source YModem implementation compatible with the one embedded in Enova’s firmware!

In contact with WFJ from @enova18650.com, and building upon your (@SammysHP’s) previous work, I produced a PDF with a detailed, parametrized step-by-step procedure that should work with any Linux distro (specifically tested and working with Debian/Devuan and Fedora) and which uses parametrized commands to take care of port number, version to upgrade to, checking of return codes, etc with the intention of making the whole process both more automatized, and more foolproof.

Here it is: Firmware_Update_Guide_-Linux-US-_DMenezes_Rewrite_20250413.pdf|attachment (73.9 KB)

I post it here in the hopes it will also be useful.

1 Thank

TimMc has also written a brief manual on how to update the firmware under macOS.


Firmware Update Guide (Mac-Terminal)

Preparation

Install dependencies

Following packages are required and must be installed before performing the update.

  • Python 3
  • python-pip
  • python-venv

For example in Mac:

  • Go to the official Python website.
  • Download the latest Python 3 installer for macOS.
  • Run the installer and follow the instructions to install the latest version of Python 3.

Create workspace for update

This creates a virtual Python environment and downloads required modules.
Open a terminal and run:

mkdir gyrfalcon_update
cd gyrfalcon_update
python3 -m venv .
. bin/activate
python3 -m pip install ymodem

You can use the same environment for future firmware updates.

Perform the update

  1. Download and unpack the firmware archive.

  2. Open a terminal and activate the update workspace you created earlier (e.g. gyrfalcon_update):

    . gyrfalcon_update/bin/activate
    

    Adjust the path as necessary.

  3. Plug in the power supply to the charger, then connect the charger via USB to your computer.

  4. A new serial device should appear, most likely /dev/tty.usbserial-1234.
    Use this device in all further commands.
    It might be necessary to give your user additional permissions:

    sudo chmod 666 /dev/tty.usbserial-1234
    
  5. Set up the serial connection and reboot the charger into the bootloader by executing:

    stty -f /dev/tty.usbserial-1234 -a | grep -qE "cs8.*-parenb.*-cstopb|cs8.*-cstopb.*-parenb|-parenb.*cs8.*-cstopb|-parenb.*-cstopb.*cs8|-cstopb.*cs8.*-parenb|-cstopb.*-parenb.*cs8" && echo '*fwupdrst' | sudo cu -l /dev/tty.usbserial-1234 -s 115200
    
  6. Now you are ready to upload the firmware. Adjust the path as required:

    ymodem send -p /dev/tty.usbserial-1234 /path/to/GYRFALCON_S8000_Firmware.bin
    
  7. After a successful update, the charger will reboot automatically.
    It is now safe to close the terminal and unplug the USB cable.


Created by TimMc.


Many thanks to @dmenezes, @TimMC, and @SammysHP for their contributions.

2 Thanks