From nobody Fri Mar 04 13:18:51 2022 X-Original-To: freebsd-bluetooth@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1854019EA1D8 for ; Fri, 4 Mar 2022 13:19:04 +0000 (UTC) (envelope-from kempe@lysator.liu.se) Received: from mail.lysator.liu.se (mail.lysator.liu.se [IPv6:2001:6b0:17:f0a0::3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4K97jM1zp9z3D4Q for ; Fri, 4 Mar 2022 13:19:03 +0000 (UTC) (envelope-from kempe@lysator.liu.se) Received: from mail.lysator.liu.se (localhost [127.0.0.1]) by mail.lysator.liu.se (Postfix) with ESMTP id C2F0140071; Fri, 4 Mar 2022 14:18:52 +0100 (CET) Received: from claptrap.lysator.liu.se (claptrap.lysator.liu.se [IPv6:2001:6b0:17:f0a0::fa]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.lysator.liu.se (Postfix) with ESMTPSA id 9685E4006E; Fri, 4 Mar 2022 14:18:52 +0100 (CET) Date: Fri, 4 Mar 2022 14:18:51 +0100 From: Andreas Kempe To: Pau Amma Cc: freebsd-bluetooth@freebsd.org Subject: Re: The (incomplete) saga of Bluetooth, ath(4), AR9565, and WB335. Message-ID: References: <9693b9d7332022f233244aa30b9b09f4@gundo.com> List-Id: Using Bluetooth in FreeBSD environments List-Archive: https://lists.freebsd.org/archives/freebsd-bluetooth List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bluetooth@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Virus-Scanned: ClamAV using ClamSMTP X-Rspamd-Queue-Id: 4K97jM1zp9z3D4Q X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=pass (policy=none) header.from=lysator.liu.se; spf=pass (mx1.freebsd.org: domain of kempe@lysator.liu.se designates 2001:6b0:17:f0a0::3 as permitted sender) smtp.mailfrom=kempe@lysator.liu.se X-Spamd-Result: default: False [-3.80 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+a:mail.lysator.liu.se]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MID_RHS_MATCH_FROMTLD(0.00)[]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[lysator.liu.se,none]; MLMMJ_DEST(0.00)[freebsd-bluetooth]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:1653, ipnet:2001:6b0::/32, country:EU]; RCVD_TLS_LAST(0.00)[] X-ThisMailContainsUnwantedMimeParts: N Hello Pau! On Thu, Feb 10, 2022 at 02:49:24AM +0000, Pau Amma wrote: > (Please cc: me on replies - I'm subscribed nomail as this is likely a > one-off question.) > > So, I'm trying to figure out whether Bluetooth can be made to work on my > Lenovo Z50-70 (https://wiki.freebsd.org/Laptops/Lenovo_z50_70) running > 12.2 (and soon 12.3), with 13.1 an option when it hits RC stage or maybe > BETA. Relevant lines of /var/run/dmesg.boot show > > ath0: mem 0xc0400000-0xc047ffff irq 19 at > device 0.0 on pci2 > ath0: WB335 2-ANT card detected > ath0:Bluetooth Antenna Diversity card detected > > kldstat -n ng_ubt.ko shows the module's loaded: > > 34 1 0xffffffff834d1000 4260 ng_ubt.ko > > but the "ubt0:" line > https://docs.freebsd.org/en/books/handbook/advanced-networking/index.html#network-bluetooth > led me to expect in /var/log/messages isn't there. Checking the wiki led > me to https://wiki.freebsd.org/dev/ath_hal%284%29/BluetoothCoex (8 years > old) where the "? - AR9565 + ?" line hints that my WiFi+Bluetooth > Atheros hardware was New and Strangeā„¢ then, and > https://wiki.freebsd.org/dev/ath_hal%284%29/AntennaDiversity (also 8 > years old) led me to > https://wiki.freebsd.org/dev/ath_hal%284%29/AntennaDiversityWhatChips > (also... you get the picture) which doesn't even mention the hardware I > have. > > At this point, I'm stumped. What are my options to get Bluetooth running > on my laptop? Get an USB Bluetooth dongle? > I don't really have any good solutions to propose to you. Bluetooth is, in my opinion, in quite a sorry state and isn't, as far as I am aware, prioritised upstream. I have a bluetooth mouse that I got to work on my old Thinkpad X220 by patching around a bit. I mailed the lists about this in the past, but my mails have gone unanswered. The issue with my mouse turned out to be that secure simple pairing support is completely missing in the current implementation. Because of this, I have been working on and off on writing my own Bluetooth user space stack on top of netgraph, but work has been quite slow since I'm no bluetooth expert and have been treating it as a time-sink when I have nothing better to do. If you're interested, I have a WIP git repository at https://git.lysator.liu.se/kempe/blued/-/tree/development-sockets/. Depending on what you plan to use bluetooth for, the reality is that you might currently be better served using a wired alternative. Cordially, Andreas Kempe