<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p>From 27eddbbb1d30c97d192b9dd8e8f65d9dbf890a38 Mon Sep 17 00:00:00
2001<br>
From: Sergio Costas Rodriguez <a class="moz-txt-link-rfc2396E" href="mailto:sergio.costas@canonical.com"><sergio.costas@canonical.com></a><br>
Date: Mon, 29 May 2023 14:09:03 +0200<br>
Subject: [PATCH] firmware: add missing firmware for ar3k Atheros
bluetooth<br>
<br>
When using the Ubuntu Core 22 kernel in an Asus Zenbook UX22,<br>
this error is shown in journalctl:<br>
<br>
usb 1-1-1: Direct firmware load for ar3k/AthrBT_0x01020200.dfu
failed with error -2<br>
Bluetooth: Patch file not found ar3k/AthrBT_0x01020200.dfu<br>
Bluetooth: Loading patch file failed<br>
ath3k: probe of 1-1.1:1.0 failed with error -2<br>
<br>
and, of course, bluetooth doesn't work.<br>
<br>
This patch adds the missing files, and makes bluetooth work.<br>
<br>
Fix <a class="moz-txt-link-freetext" href="https://bugs.launchpad.net/ubuntu/+bug/2025054">https://bugs.launchpad.net/ubuntu/+bug/2025054</a><br>
---<br>
trim-firmware | 18 ++++++++++++++++++<br>
1 file changed, 18 insertions(+)<br>
<br>
diff --git a/trim-firmware b/trim-firmware<br>
index 148c964..e2fe269 100755<br>
--- a/trim-firmware<br>
+++ b/trim-firmware<br>
@@ -68,6 +68,24 @@ if [ -e "${DESTDIR}"/firmware/regulatory.db ] ;
then<br>
cp "${DESTDIR}"/firmware/regulatory.*
"${DESTDIR}"/firmware.new<br>
fi<br>
<br>
+# Copy all AthrBT files, because they are needed for some devices<br>
+# like the original Asus Zenbook, but only if the module ath3k.ko<br>
+# is compiled<br>
+if [[ -n `find "${DESTDIR}"/modules -name ath3k.ko` ]] ; then<br>
+ if [ -d "${DESTDIR}"/firmware/ar3k ] ; then<br>
+ mkdir -p "${DESTDIR}"/firmware.new/ar3k<br>
+ cp -a "${DESTDIR}"/firmware/ar3k/AthrBT_0x*.dfu
"${DESTDIR}"/firmware.new/ar3k/<br>
+ # the "ramps_" files are refered in the source code of
the driver, so<br>
+ # we must add them too.<br>
+ cp -a "${DESTDIR}"/firmware/ar3k/ramps_0x*.dfu
"${DESTDIR}"/firmware.new/ar3k/<br>
+ else<br>
+ # fail if the folder doesn't exist, because that means
that this<br>
+ # script requires a rework<br>
+ echo "The firmware folder for the Atheros Bluetoot
firmware doesn't exist".<br>
+ exit 1<br>
+ fi<br>
+fi<br>
+<br>
# Move kernel firmware files to the new firmware directory<br>
for d in "${DESTDIR}"/modules/* ; do<br>
if [ -d "${DESTDIR}"/firmware/"${d##*/}" ] ; then<br>
-- <br>
2.39.2<br>
<br>
</p>
</body>
</html>