HL7800 SFT error codes?

The manual firmware update method uses sft program. It sets error codes on exit but these error codes are not documented as far as I could find anyways.

I’m creating a single click (okay, single double click) update batch file for the production testing guys. I don’t have knowledge of just what combination of UART adaptors have been plugged in and out so I’m doing some simple errorcode logic to figure it out.

“COM port not found” appears to be -1
“Synchronization failed” returns 15
Successfully programmed firmware appears to return 0.

Anything else to watch out for?

Hi @OlliM,
I am attaching the guideline for Upgrading via Standalone ‘sft’ Tool (Windows / Linux). Please refer to it and try again. I was successful to upgrade HL7800 latest following these steps
Please share if you have any concerns and help us tick Solution if your problem is solved
If the issue still remains after you followed the document please make sure the folder includes fully files as below
image

The file should has:

@echo off
@rem
@rem download FW for HL7800 (xHL78xx.x.x.x)
@rem
@rem how to download this FW under windows
@rem edit this file
@rem modify COM port (COM2) in below command line ( use COM for console where you can see u-boot log on start-up)
@rem modify max serial speed (921600) if necessary, link with target is at 115200, download will be done at max speed
@rem power on your board, wait complete FW start-up
@rem run this script .bat
@rem

@rem sft.exe -p COM27 -b 115200 AppFW_flash.bin

sft.exe -p COM27 -b 115200 -s AppFW_flash.bin sysHeader_backup.bin.alt1250 sysHeader.bin.alt1250 sysHeader_modem.bin.alt1250 u-boot.bin ue_lte.fw partmap.bin ue_lte.fw2
@set /p DUMMY=Hit ENTER to continue…

Replace COM27 with your UART com port and appropriate baud rate
Thanks

1 Like

@Vianney There’s no problem with the upgrade, I was just sharing the error codes from the sft program. My upgrade script looks like this:

@echo off
@rem
@rem  download FW for HL7800 (xHL78xx.x.x.x)
@rem
@rem  how to download this FW under windows
@rem    edit this file
@rem    modify COM port (COM2) in below command line ( use COM for console where you can see u-boot log on start-up)
@rem    modify max serial speed (921600) if necessary, link with target is at 115200, download will be done at max speed
@rem    power on your board, wait complete FW start-up
@rem    run this script .bat
@rem

@rem sft.exe -p COM2 -b 921600 AppFW_flash.bin
:: Start time
setlocal EnableDelayedExpansion
set "startTime=%time: =0%"

sft.exe -p COM2 -b 921600 -s AppFW_flash.bin sysHeader_backup.bin.alt1250 sysHeader.bin.alt1250 sysHeader_modem.bin.alt1250 u-boot.bin ue_lte.fw partmap.bin ue_lte.fw2 

if %errorlevel% EQU -1 (
	sft.exe -p COM3 -b 921600 -s AppFW_flash.bin sysHeader_backup.bin.alt1250 sysHeader.bin.alt1250 sysHeader_modem.bin.alt1250 u-boot.bin ue_lte.fw partmap.bin ue_lte.fw2 
)
::echo Errorcode %errorlevel%

if %errorlevel% EQU -1 (
	sft.exe -p COM4 -b 921600 -s AppFW_flash.bin sysHeader_backup.bin.alt1250 sysHeader.bin.alt1250 sysHeader_modem.bin.alt1250 u-boot.bin ue_lte.fw partmap.bin ue_lte.fw2 
)
::echo Errorcode %errorlevel%
if %errorlevel% EQU -1 (
	sft.exe -p COM5 -b 921600 -s AppFW_flash.bin sysHeader_backup.bin.alt1250 sysHeader.bin.alt1250 sysHeader_modem.bin.alt1250 u-boot.bin ue_lte.fw partmap.bin ue_lte.fw2 
)
::echo Errorcode %errorlevel%
if %errorlevel% EQU -1 (
	sft.exe -p COM6 -b 921600 -s AppFW_flash.bin sysHeader_backup.bin.alt1250 sysHeader.bin.alt1250 sysHeader_modem.bin.alt1250 u-boot.bin ue_lte.fw partmap.bin ue_lte.fw2 
)
::echo Errorcode %errorlevel%
set Errorcode=%errorlevel%
set "endTime=%time: =0%"

rem Get elapsed time:
set "end=!endTime:%time:~8,1%=%%100)*100+1!"  &  set "start=!startTime:%time:~8,1%=%%100)*100+1!"
set /A "elap=((((10!end:%time:~2,1%=%%100)*60+1!%%100)-((((10!start:%time:~2,1%=%%100)*60+1!%%100), elap-=(elap>>31)*24*60*60*100"

echo:

rem Convert elapsed time to HH:MM:SS:CC format:
set /A "cc=elap%%100+100,elap/=100,ss=elap%%60+100,elap/=60,mm=elap%%60+100,hh=elap/60+100"
echo Elapsed time:  %hh:~1%%time:~2,1%%mm:~1%%time:~2,1%%ss:~1%

echo:

if %Errorcode% EQU 0 (
	Echo ************************************************
	Echo Updated to firmware HL7800.4.4.6.0 successfully!
	Echo ************************************************
) else (
	Echo There was an error, code %Errorcode%!
)

echo:

pause
::@set /p DUMMY=Hit ENTER to continue...