Skip to content

Instantly share code, notes, and snippets.

@jmfernandez
Last active March 13, 2024 12:50
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jmfernandez/0b0febb7bbbfe79e3179f0c774e25fe6 to your computer and use it in GitHub Desktop.
Save jmfernandez/0b0febb7bbbfe79e3179f0c774e25fe6 to your computer and use it in GitHub Desktop.
Adding wireless / bluetooth co-existence to ath10k firmware

Although ath10k Linux kernel driver supports wireless / bluetooth co-existence on dual devices (wireless and bluetooth), firmware currently available at linux-firmware and https://github.com/kvalo/ath10k-firmware does not enable it, so wireless connectivity is interrupted when a paired bluetooth device, like a headphone, is in active use (for instance, listening to music).

These instructions are useful to download and generate a firmware usable by ath10k Linux driver, enabling the btcoex-param flag.

#!/bin/bash
mkdir /tmp/newfirm
cd /tmp/newfirm
# First, fetch windows firmware for the card
# the link is obtained from
# https://support.killernetworking.com/knowledge-base/installing-drivers-using-device-manager/
wget http://download.windowsupdate.com/c/msdownload/update/driver/drvs/2020/06/b151fded-423a-4695-acfa-6d679c5aa07a_67a233f32b9790568f0d3f41a73624edcd82b8ff.cab
mkdir win_firmare
cd win_firmware
cabextract ../b151fded-423a-4695-acfa-6d679c5aa07a_67a233f32b9790568f0d3f41a73624edcd82b8ff.cab
cd ..
# Second, clone the qca swiss army tools
git clone https://github.com/qca/qca-swiss-army-knife.git
# Third, clone the dissect tool
git clone https://gist.github.com/kazikcz/8e5845ad84ca251aa295 dissect_tool
# Fourth, the firmware for Killer 1535 is qca61x4_2_2.bin
# at win_firmware
# The board.bin file is also there being either
# eeprom_ar6320_3p0_NFA364xp_RV_0520.bin or eeprom_ar6320_3p0_NFA364xp_RV_0519.bin
# We need to dissect qca61x4_2_2.bin in order to build the firmware
mkdir dissected
cd dissected
python2 ../dissect_tool/dissect.py < ../win_firmware/qca61x4_2_2.bin
cd ..
# Fifth, the firmware file is generated from some of the dissected parts,
# enabling the btcoex-param flag
python2 qca-swiss-army-knife/tools/scripts/ath10k/ath10k-fwencoder --create \
--firmware-version=CUSTOM \
--features=wowlan,mfp-support,btcoex-param \
--firmware=dissected/fw-2.bin \
--otp=dissected/fw-1.bin \
--set-wmi-op-version=tlv \
--set-htt-op-version=tlv \
--set-fw-api=6
# Now, you should have a firmware-6.bin file
# You can check it with next command-line
python2 qca-swiss-army-knife/tools/scripts/ath10k/ath10k-fwencoder --info firmware-6.bin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment