From owner-freebsd-bluetooth@FreeBSD.ORG Mon Mar 16 17:15:35 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 67585331 for ; Mon, 16 Mar 2015 17:15:35 +0000 (UTC) Received: from mail-ig0-x22a.google.com (mail-ig0-x22a.google.com [IPv6:2607:f8b0:4001:c05::22a]) (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 2D0792FE for ; Mon, 16 Mar 2015 17:15:35 +0000 (UTC) Received: by igcau2 with SMTP id au2so10781507igc.0 for ; Mon, 16 Mar 2015 10:15:34 -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=bUSYAVM350Spx/Ny6EPkc80U8doM9TsU7SD7o80QFM8=; b=eTK9ErWCfVZg82zaNtrBYfxmVs0vDFofTsS3LjdyRwec/9S8HJ8wLGXMEdytcM/6hE 36+vHZ9DhVsuH3lOlC0TaJSVJzzeqhdRxF2dNpxud4b/8DEG7UJ+/skGDiDqYx05JyIO hYB44O2BjgMiZYzOtKf37tP99fiLpQz89WmUE5gXJcTbcq260pMnNr0fy8jl+i7UWfNL DgNVz3/F9Z9Cq7TT4sT9mtvOWgwA/wTjM6uLR+bLp7lNMajCVArrdG4tXPKxd6gVoxes ivvp1LW18bF3/XoDG1KJF9uVnZ8uH+4Yj/FMLCIc8QgGGeHIUnoRvtjf6XUivJoEyZuE uHQw== MIME-Version: 1.0 X-Received: by 10.107.7.141 with SMTP id g13mr76492670ioi.52.1426526134541; Mon, 16 Mar 2015 10:15:34 -0700 (PDT) Received: by 10.36.66.74 with HTTP; Mon, 16 Mar 2015 10:15:34 -0700 (PDT) In-Reply-To: References: Date: Mon, 16 Mar 2015 10:15:34 -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:15:35 -0000 Hello, > I'm having trouble registering HID service with sdpd, here is a simple example: > > > sdp_sp_profile_t sp; > bdaddr_t bt_addr_any; > void *ss; > uint32_t sdp_handle; > > memcpy(&addr, NG_HCI_BDADDR_ANY, sizeof(addr)); > memset(&sp, 0, sizeof(sp)); > sp.server_channel = 0; > > ss = sdp_open_local(NULL); > > sdp_register_service(ss, SDP_SERVICE_CLASS_HUMAN_INTERFACE_DEVICE, > &bt_addr_any, (void *)&sp, sizeof(sp), > &sdp_handle); hmmm.... can you please explain what are you trying to do? as far as i can see you are trying to use UUID for SDP_SERVICE_CLASS_HUMAN_INTERFACE_DEVICE , but you are passing sdp_sp_profile_t data structure (which is for SDP_SERVICE_CLASS_SERIAL_PORT). [...] > I see /usr/src/usr.sbin/bluetooth/bthidd/ but I believe that's to > connect to remote HID services. well, yes and no. depending on what do you mean by "connecting to remote HID services". bthidd(8) provides support for bluetooth peripherals that implement bluetooth hid profile, for example bluetooth keyboard and mouse. > Also I went to the local electronics store and picked up every bt > dongle they had on the shelf. (it looks like v4 bt devices they have > use the CSR8510 chip despite the "brand name". but I also have v3, v2, > and v1 devices to test). Starting the bluetooth service always seems > to result in error for all the devices, however I can run sdpd and if all devices give you errors, then, i would suggest starting looking at your USB setup. are there any hubs for example? also, sometimes, devices require some sort of firmware to be downloaded first to be fully operational. i doubt its the case here. though. > also browse remote services and pair from client to server and > vice-versa, so I'm not exactly sure of the importance of the bluetooth > service? you can run sdpd(8) even if no bluetooth devices are connected to the system. sdpd(8) is responsible for answering sdp queries from the remote devices. it effectively advertises (to remove clients) what bluetooth services are available on the local host. thanks max