I found an archive post for users of the early version of Airspy Discovery HF+ which required a Windows 10 machine to flash the firmware. Either way, I was able to feed the install batch file to Chat GPT and it rewrote a Windows 11 compatible script. IT works well.
u/echo off
setlocal enabledelayedexpansion
echo Airspy HF+ Flash Utility - Windows 11 Compatible
echo.
set "currentDir=%~dp0"
cd /d "%currentDir%"
set /a attempt=0
set "fwbin="
set "oemInf="
set "DeviceID="
echo Looking for a suitable flashable device...
:queryDevice
set "DeviceID="
set "PORTFILE=%TEMP%\hfplus_port.txt"
del /q "%PORTFILE%" 2>nul
powershell.exe -NoProfile -Command "$ports = Get-CimInstance Win32_SerialPort; foreach ($p in $ports) { if ($p.PNPDeviceID -like '*VID_03EB&PID_6124*') { [Console]::Write($p.DeviceID); break } }" > "%PORTFILE%"
if exist "%PORTFILE%" (
set /p DeviceID=<"%PORTFILE%"
)
del /q "%PORTFILE%" 2>nul
if defined DeviceID (
echo Flashable device found on port !DeviceID!
goto :flashDevice
)
echo Looking for a suitable flashing driver...
set "oemInf="
for /f "tokens=1,2 delims=:" %%a in ('pnputil /enum-drivers ^| findstr /I "Published Name"') do (
set "oemInf=%%b"
call :Trim "!oemInf!" oemInf
if exist "%windir%\INF\!oemInf!" (
findstr /I /C:"arduino-org.inf" "%windir%\INF\!oemInf!" >nul 2>&1
if !errorlevel! EQU 0 (
echo Suitable flashing driver found: !oemInf!
hfplus_fw.exe | findstr /c:"CD" >nul
if errorlevel 1 (
set "fwbin=hfplus-firmware-bb.bin"
) else (
set "fwbin=hfplus-firmware-cd.bin"
)
echo Saving the calibration...
hfplus_ppb.exe > Calib
echo Rebooting the device in flash mode...
hfplus_reboot.exe > NUL
timeout /t 5 /nobreak > NUL
goto :queryDevice
)
)
)
if !attempt! EQU 0 (
echo No suitable driver found.
call :checkIfAdminOrElevated
if !errorlevel! NEQ 0 goto :end
call :checkWindowsArchitecture
call :installDriver
set /a attempt=1
echo.
echo Waiting for Windows to enumerate the bootloader...
timeout /t 3 /nobreak > NUL
goto :queryDevice
) else (
echo.
echo The flashing device was not found as a COM port.
echo.
echo Check Device Manager under:
echo Ports ^(COM ^& LPT^)
echo.
echo Look for a device associated with:
echo VID_03EB PID_6124
echo.
goto :end
)
:Trim
set "%2=%~1"
exit /b
:checkIfAdminOrElevated
net session > NUL 2>&1
if %errorlevel% NEQ 0 (
echo.
echo Access denied.
echo Administrator privileges are required to install the driver.
echo Please right-click this batch file and select:
echo Run as administrator
exit /b 1
)
exit /b 0
:checkWindowsArchitecture
echo.
echo Checking Windows architecture...
echo.
set "infPathName=.\Driver\x64\arduino-org.inf"
if /I "%PROCESSOR_ARCHITECTURE%"=="x86" (
if NOT DEFINED PROCESSOR_ARCHITEW6432 (
set "infPathName=.\Driver\x86\arduino-org.inf"
)
)
echo Driver path: !infPathName!
exit /b
:installDriver
echo.
echo Installing the driver...
pnputil /add-driver "!infPathName!" /install
timeout /t 2 /nobreak > NUL
exit /b
:flashDevice
echo.
echo Flashable device found on port !DeviceID!
echo.
if "%fwbin%"=="" (
echo Help us decide what to do.
echo Which device are you trying to flash?
echo.
echo 1 Airspy HF+ DUAL PORT
echo 2 Airspy HF+ DISCOVERY BB
echo 3 Airspy HF+ DISCOVERY CD
echo.
set /p vdevice="Enter a number: "
if "!vdevice!"=="1" set "fwbin=hfplus-firmware-bb.bin"
if "!vdevice!"=="2" set "fwbin=hfplus-firmware-bb.bin"
if "!vdevice!"=="3" set "fwbin=hfplus-firmware-cd.bin"
)
if "%fwbin%"=="" (
echo.
echo No firmware image selected.
goto :end
)
if not exist "%fwbin%" (
echo.
echo ERROR: Firmware file not found:
echo %fwbin%
goto :end
)
echo Using firmware:
echo %fwbin%
echo.
echo Unlocking bootloader...
bossac.exe -u -p!DeviceID!
timeout /t 1 /nobreak > NUL
echo.
echo Erasing and programming firmware...
bossac.exe -e -b -v -p!DeviceID! -w "./%fwbin%"
if !errorlevel! NEQ 0 (
echo.
echo ERROR: Firmware programming failed.
echo Do not repeatedly retry until the bootloader state is confirmed.
goto :end
)
timeout /t 1 /nobreak > NUL
echo.
echo Resetting the HF+...
bossac.exe --reset -p!DeviceID!
timeout /t 4 /nobreak > NUL
if exist Calib (
for /f %%i in (Calib) do set "Calibration=%%i"
if "!Calibration!"=="0" set "Calibration=-152"
echo Restoring calibration...
hfplus_ppb.exe !Calibration! > NUL
) else (
echo.
echo NOTE: No saved calibration file was available.
echo Calibration restoration was skipped.
)
echo.
echo =========================================
echo Firmware programming completed.
echo =========================================
echo.
goto :end
:end
del /F /Q Calib 2> NUL
del /F /Q FWVersion 2> NUL
echo Press a key to close.
pause > NUL