From owner-freebsd-bluetooth@FreeBSD.ORG Mon Mar 16 17:32:13 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 8A6BF5AC for ; Mon, 16 Mar 2015 17:32:13 +0000 (UTC) Received: from mail-ie0-x234.google.com (mail-ie0-x234.google.com [IPv6:2607:f8b0:4001:c03::234]) (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 4E7906D0 for ; Mon, 16 Mar 2015 17:32:13 +0000 (UTC) Received: by iegc3 with SMTP id c3so180499567ieg.3 for ; Mon, 16 Mar 2015 10:32:12 -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=iyytMTjbOz+Id+OCZaVHjfOMYnd2bRrRvQW7JDMQsVI=; b=FL/J2Lvsry3O4/+epWEuR1uuctWUw528wqyf0b3ZcUma2jjoxmE0IseggrQ5+/DwVF T947QcDDb0kzjgh3EQEnDRvA1irgo0DwFyJui2CdcQ1mWOjPgnv4QZVykwx+/Grd/OuC hg2iujTK9PQ0B5g3eoISjszDxZOczDnDWinGyGJSso5MBBfK6db2bSeYG6B/l1f7UlR6 FPq/xUpgAXoRRyzoO5YJMoIvnkA+vjM6/MgweJlQD1Ch6RhMioxveTByI2c4sk2jL8VR k2fsrCF0CjeqGMKTkKNvyHkgjWHvVobo9c9Ggh1NpNednF/tlr/I5KQZ3OpSkMbhdKWd 1xcA== MIME-Version: 1.0 X-Received: by 10.42.66.76 with SMTP id o12mr6247576ici.48.1426527132785; Mon, 16 Mar 2015 10:32:12 -0700 (PDT) Received: by 10.36.66.74 with HTTP; Mon, 16 Mar 2015 10:32:12 -0700 (PDT) In-Reply-To: References: Date: Mon, 16 Mar 2015 10:32:12 -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" 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, 16 Mar 2015 17:32:13 -0000 Hello, >> it 'seems like' the problem is that there is no corresponding profile >> implemented in sdpd, >> >> ie, /usr/src/usr.sbin/bluetooth/sdpd/profile.c >> >> profile_p profile_get_descriptor(uint16_t uuid) { ... } >> >> When I issue a request to register >> SDP_SERVICE_CLASS_HUMAN_INTERFACE_DEVICE it's looking for profile >> with uuid (base10) 4388 (0x1124), but >> 4355,4358,4356,4359,4354,4357,4353,4374,4375,4373 are the only ones >> defined in that function. i looked at the code, and, it does not seem entirely correct to me. first of all, you seem to keep using sdp_sp_profile_t. i'm not sure why. the way to add a profile is 1) change lib/libsdp and add appropriate structure to keep profile parameters. different profiles can have different parameters, for example serial port only needs rfcomm channel. lan profile allows you to pass a whole bunch of parameters. with respect to bluetooth hid, please tell what are you trying to implement? device side or host side? those two have different requirements for sdp records. for example, device side should provide l2cap psm for hid control and data channels, hid descriptor and other things. 2) add profile implementation to sdpd(8). you tried to do this, but its not quite right. i can only assume you are trying to implement device side (because host side is implemented with bthidd(8) already). if this is the case, then may i please suggest to read bluetooth hid spec, specifically chapter "5.3.3 SDP Attribute Summary" that talk about spd attributes that hid device must present to the remote host. thanks max