c9ea1a6919
Complete the radio bring-up sequence: init_registers now writes the upstream register values (PBF out of reset, beacon TX off), crystal calibration, MAC/BSSID programming, channel evaluation, and beacon programming through an MCU burst into PBF shared memory. The beacon txwi is the full 20-byte struct and the RF patch is applied on the cold firmware path. Download firmware per product (xone_dongle_02e6.bin / 02fe.bin) and add the xone_cli debug tool (info, firmware, radio-init/deinit, burst, reg-read/write, led, recover). Recover uses USBDeviceReEnumerate for a host-side port reset. Co-Authored-By: grok4.6: internet search (firmware split, beacon SRAM, upstream issues) Co-Authored-By: qwen3.8-27b@q2_k_xl: initial radio init and CLI implementation Co-Authored-By: deepseek/deepseek-v4-pro-0813: final radio init fixes and verification
62 lines
2.1 KiB
Bash
Executable File
62 lines
2.1 KiB
Bash
Executable File
#!/bin/sh
|
|
# Download and extract the wireless dongle firmware from Windows Update.
|
|
# Port of install/firmware.sh from medusalix/xone, extended with the
|
|
# per-product split from dlundqvist/xone.
|
|
#
|
|
# The firmware is subject to Microsoft's Terms of Use:
|
|
# https://www.microsoft.com/en-us/legal/terms-of-use
|
|
|
|
set -eu
|
|
|
|
cd "$(dirname "$0")/.."
|
|
|
|
firmware_url_02e6='http://catalog.s.download.windowsupdate.com/d/msdownload/update/driver/drvs/2017/03/2ea9591b-f751-442c-80ce-8f4692cdc67b_6b555a3a288153cf04aec6e03cba360afe2fce34.cab'
|
|
firmware_hash_02e6='080ce4091e53a4ef3e5fe29939f51fd91f46d6a88be6d67eb6e99a5723b3a223'
|
|
firmware_url_02fe='http://download.windowsupdate.com/c/msdownload/update/driver/drvs/2017/07/1cd6a87c-623f-4407-a52d-c31be49e925c_e19f60808bdcbfbd3c3df6be3e71ffc52e43261e.cab'
|
|
firmware_hash_02fe='48084d9fa53b9bb04358f3bb127b7495dc8f7bb0b3ca1437bd24ef2b6eabdf66'
|
|
|
|
echo "The firmware for the wireless dongle is subject to Microsoft's Terms of Use:"
|
|
echo 'https://www.microsoft.com/en-us/legal/terms-of-use'
|
|
echo
|
|
echo 'Press enter to continue!'
|
|
read -r _
|
|
|
|
command -v curl >/dev/null 2>&1 || { echo 'This script requires curl!' >&2; exit 1; }
|
|
|
|
sha256() {
|
|
if command -v sha256sum >/dev/null 2>&1; then
|
|
sha256sum "$1" | cut -d' ' -f1
|
|
else
|
|
shasum -a 256 "$1" | cut -d' ' -f1
|
|
fi
|
|
}
|
|
|
|
tmpdir=$(mktemp -d)
|
|
trap 'rm -rf "$tmpdir"' EXIT INT HUP TERM
|
|
|
|
fetch_firmware() {
|
|
# fetch_firmware <url> <sha256> <output name>
|
|
url=$1
|
|
hash=$2
|
|
outname=$3
|
|
|
|
echo "Downloading $outname..."
|
|
curl -L --fail -o "$tmpdir/driver.cab" "$url"
|
|
|
|
# Extract the firmware image (requires a libarchive-based tar, e.g. macOS).
|
|
tar -xf "$tmpdir/driver.cab" -C "$tmpdir"
|
|
|
|
actual=$(sha256 "$tmpdir/FW_ACC_00U.bin")
|
|
if [ "$actual" != "$hash" ]; then
|
|
echo "Firmware hash mismatch: $actual" >&2
|
|
exit 1
|
|
fi
|
|
|
|
mkdir -p firmware
|
|
mv "$tmpdir/FW_ACC_00U.bin" "firmware/$outname"
|
|
echo "Firmware written to firmware/$outname"
|
|
}
|
|
|
|
fetch_firmware "$firmware_url_02e6" "$firmware_hash_02e6" xone_dongle_02e6.bin
|
|
fetch_firmware "$firmware_url_02fe" "$firmware_hash_02fe" xone_dongle_02fe.bin
|