From owner-freebsd-bluetooth@FreeBSD.ORG Mon Mar 23 08:01:57 2015 Return-Path: Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C1A22C1F for ; Mon, 23 Mar 2015 08:01:57 +0000 (UTC) Received: from mail-we0-x235.google.com (mail-we0-x235.google.com [IPv6:2a00:1450:400c:c03::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47111F28 for ; Mon, 23 Mar 2015 08:01:57 +0000 (UTC) Received: by wetk59 with SMTP id k59so130871363wet.3 for ; Mon, 23 Mar 2015 01:01:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=ZqhQZTsLMlu0w0owFoeOAsjONLV7kPWmzrxMMJhHxak=; b=WYDniXQRkj9GXtvVhhEnY1TYqRi4OMC+aDFsbhghROaHgNThhLZoApLfv6v9n16gFr hlLd2CEGfk6gbIHs04gjikIHpnlqOfO3iuqMeqf6yPesV6wmdhlAHaMndAF/YeLCK4o+ 9TFI4bg61M4DRnFqSIrMd1IVxrFnN5CFdvqF9f3mpX9N1q3EyV7NeeGFNiZ9wY3Rdn/G izneie6a3s/GXy9Xh85NoZZLFFAcCr3n66v6XnjG+94kaSbUgpUm7FtKBGzng4UzbUV7 yIy6XqTlVGxeURdxIsVm5MShC7jGp569db58Ljy1GHqgtLqJdENIronH/O//kdp4dxNE QBFg== MIME-Version: 1.0 X-Received: by 10.180.104.35 with SMTP id gb3mr17057692wib.60.1427097715775; Mon, 23 Mar 2015 01:01:55 -0700 (PDT) Received: by 10.27.91.75 with HTTP; Mon, 23 Mar 2015 01:01:55 -0700 (PDT) Received: by 10.27.91.75 with HTTP; Mon, 23 Mar 2015 01:01:55 -0700 (PDT) In-Reply-To: References: <0AD7A2F7-37BE-4F6A-9FD6-F6C81B2CAF36@gmail.com> Date: Mon, 23 Mar 2015 01:01:55 -0700 Message-ID: Subject: Re: register HID with SDP error From: Waitman Gobble To: Iain Hibbert Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: freebsd-bluetooth@freebsd.org X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2015 08:01:57 -0000 On Mar 23, 2015 12:42 AM, "Iain Hibbert" wrote: > > On Sun, 22 Mar 2015, Waitman Gobble wrote: > > > Through trial and error I found that this code is preventing the > > response to the 0x0100 (L2CAP) query. > > > > in sdpd/ssar.c around line 230 or so. > > > > if (memcmp(&uuid, &puuid, sizeof(uuid)) != 0 && > > memcmp(&uuid, &uuid_public_browse_group, sizeof(uuid)) != 0) > > continue; > > > > > > When I comment that code out then it responds to the request with the > > list of registered and advertised services and my clients then > > magically connect. > > and if you search for some other protocol UUID that is perhaps not > present? I suspect that without that code, you will get all profiles > back, whatever you search for (which is going to be wrong :) > > the real problem is, that sdpd does not enumerate the Protocol UUIDs in > each profile that it has stored, and therefore cannot respond properly to > the request for 'all records containing UUID 0x0100' for example. > > regards, > iain Thank you, I appreciate the info. I'm thinking it's probably not causing issues for most people at the moment, however I am going to have to make it work on my system, because apparently Android, OS X and MS Windows all seem to depend on those results in order to properly open the connection to an HID device. It could potentially be an issue if using the GATT protocols with embedded ARM, etc, devices running FreeBSD which I presume will happen someday. (But it does seem like alot of people these days are popping out devices running proprietary software mixed in with GPLv3 code *a hunch* and not even thinking about it, which can possibly turn into an interesting legal mess. Will have to get some popcorn and watch.) Thanks, Waitman