From owner-freebsd-bluetooth@FreeBSD.ORG Wed Mar 18 17:06:47 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 956352C8 for ; Wed, 18 Mar 2015 17:06:47 +0000 (UTC) Received: from mail-ig0-x236.google.com (mail-ig0-x236.google.com [IPv6:2607:f8b0:4001:c05::236]) (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 4E8749AB for ; Wed, 18 Mar 2015 17:06:47 +0000 (UTC) Received: by ignm3 with SMTP id m3so77088582ign.0 for ; Wed, 18 Mar 2015 10:06:46 -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=WtZ6+HyRm8vvyW7+DwnBGMbwjf3mj9W10cMH6/tq7lc=; b=KDrGVSWoy2kGPD/VD8Qfo5TzmEuQtnY3vD3mlgW2XW0pCAUi31M6W1sqwVt1myCm5V hYI4NQkoAyxy4XgybRBctCTkWCFhTobguhzRbyd+/Ort854edl30VcHroffD3i3tQnDI MLRJXACiXFRIG+jpwkHEd7xNAsrLVtTsMBfJJ9RxuTZOdZHL3+i650u6FOA63auaHlGW //W5NXmQoAhxJasrLgghyn/y5vzmAHQ2XF3kpW3sZL+OhLVToq2HPXOKIm8LWXEgBSU8 7uR8rekGr6vCLiC2AIYPFK+uOCOJ7+f50ZeQlPC/+RFZM1z33qs1lD7NtV/MJtcRcOe4 oXEg== MIME-Version: 1.0 X-Received: by 10.50.32.70 with SMTP id g6mr8679233igi.35.1426698406725; Wed, 18 Mar 2015 10:06:46 -0700 (PDT) Received: by 10.36.66.74 with HTTP; Wed, 18 Mar 2015 10:06:46 -0700 (PDT) In-Reply-To: References: <0AD7A2F7-37BE-4F6A-9FD6-F6C81B2CAF36@gmail.com> Date: Wed, 18 Mar 2015 10:06:46 -0700 Message-ID: Subject: Re: register HID with SDP error From: Maksim Yevmenkin To: Waitman Gobble Content-Type: text/plain; charset=UTF-8 Cc: "freebsd-bluetooth@freebsd.org" , Iain Hibbert 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: Wed, 18 Mar 2015 17:06:47 -0000 Hello, [...] > I think I'm getting close, I finally have a good scan with bthidcontrol > > Note that bthidcontrol doesn't seem to connect after sdpd is restarted > on the server, unless I do sdpcontrol browse first. hmm... i'm sorry, i do not follow. both bthidcontrol(8) and sdpcontrol(8) are using exactly the same way to obtain sdp records. it should not make any difference. > #sdpcontrol -a 00:1b:dc:06:94:d3 browse [...] > # bthidcontrol -a 00:1b:dc:06:94:d3 query [...] this looks better to me. > latest version at https://github.com/waitman/sdpd/blob/master/hid.c thanks! i will take a look. few minor nits: attribute list must be sorted. when generating protocol descriptor list and additional protocol descriptor list, you may re-use one function, i.e. additional protocol descriptor list is just a protocol descriptor list wrapped into a sequence. you hardwired lots of hid related things. while its ok for testing, i feel like it should be moved to parameters so clients can set those up as needed. > I didn't see a "bool(8)" defined in sdp.h, I was thinking maybe it was > the same as UINT8 but then I noticed Iain's post that showed a > 'bool(8)' as 0x28 instead of 0x08, thank you. huh? from /usr/include/sdp.h /* Unsigned integer */ #define SDP_DATA_UINT8 0x08 /* Boolean */ #define SDP_DATA_BOOL 0x28 thanks, max