From nobody Mon Jun 27 20:28:12 2022 X-Original-To: freebsd-hackers@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 94926878DF0; Mon, 27 Jun 2022 20:28:15 +0000 (UTC) (envelope-from kempe@lysator.liu.se) Received: from mail.lysator.liu.se (mail.lysator.liu.se [130.236.254.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4LWznV58cCz4Rqj; Mon, 27 Jun 2022 20:28:14 +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 4BC591EA67; Mon, 27 Jun 2022 22:28:13 +0200 (CEST) Received: from shipon.lysator.liu.se (unknown [IPv6:2001:6b0:17:f0a0::83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.lysator.liu.se (Postfix) with ESMTPSA id 49B261F02F; Mon, 27 Jun 2022 22:28:13 +0200 (CEST) Date: Mon, 27 Jun 2022 22:28:12 +0200 From: Andreas Kempe To: freebsd-bluetooth@freebsd.org Cc: freebsd-hackers@freebsd.org Subject: Re: blued: bluetooth daemon - looking for testers Message-ID: References: List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Virus-Scanned: ClamAV using ClamSMTP X-Rspamd-Queue-Id: 4LWznV58cCz4Rqj 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 130.236.254.3 as permitted sender) smtp.mailfrom=kempe@lysator.liu.se X-Spamd-Result: default: False [-3.91 / 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_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+a:mail.lysator.liu.se]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCVD_COUNT_THREE(0.00)[3]; MID_RHS_MATCH_FROMTLD(0.00)[]; RCVD_IN_DNSWL_MED(-0.20)[130.236.254.3:from]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[lysator.liu.se,none]; NEURAL_HAM_SHORT(-0.91)[-0.912]; MLMMJ_DEST(0.00)[freebsd-bluetooth,freebsd-hackers]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:2843, ipnet:130.236.0.0/16, country:SE]; RCVD_TLS_LAST(0.00)[] X-ThisMailContainsUnwantedMimeParts: N On Mon, Jun 27, 2022 at 09:52:05PM +0200, Dirk Engling wrote: > > On Mon, 27 Jun 2022, Andreas Kempe wrote: > > > After having issues with my bluetooth mouse, I figured out that the > > problem was a lack of support for secure simple pairing and I reported > > on this a while back to freebsd-bluetooth and freebsd-hackers. This > > sent me down the rabbit hole of working on my own bluetooth daemon > > with the goal of providing a user friendly way of pairing and using > > bluetooth devices. > > I was at a similar point and wrote > > man 8 bluetooth-config > > a while ago. Did you find this and how does your approach differ? > The biggest difference in bluetooth functionality at the moment is that I implemented support for secure simple pairing, something that was missing in hcsecd, not allowing for my mouse to pair correctly. It would connect once, but refuse to reconnect. Functionality that could have been amended to hcsecd for sure and I did submit a rough PoC to the mailing lists that garnered no response. Thinking a bit about it, I wanted to aim a bit differently and realised I would most likely be rewriting the whole of hcsecd anyway. My wish is to provide something with an RPC that allows an unprivileged user to configure and manage bluetooth devices. blued listens on a unix socket and has a msgpack based IPC that allows a used with sufficient permissions on the socket to manage devices that are saved to an sqlite3 database. At the moment, I only provide a command line client, but a goal is to provide some kind of graphical user interface that can list devices and make the use of a command line unnecessary. My ideal is a process that looks much like the one on a Linux system, where the user sees devices in proximity pop up in a list, click it, select pair and the mouse starts working. As I wrote in the mail you responded to, this current version relies on a stand-alone bthidd for the mouse functionality, but when the pairing support has gotten to a point where it seems stable and working out in reality, I want to integrate bthidd with blued in some manner to make it seamless via the blued IPC API. Cordially, Andreas Kempe