From owner-freebsd-bluetooth@FreeBSD.ORG Sun Mar 15 23:48:59 2015 Return-Path: Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4A1DFD39 for ; Sun, 15 Mar 2015 23:48:59 +0000 (UTC) Received: from mail-wi0-x22b.google.com (mail-wi0-x22b.google.com [IPv6:2a00:1450:400c:c05::22b]) (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 CE7619A9 for ; Sun, 15 Mar 2015 23:48:58 +0000 (UTC) Received: by wifj2 with SMTP id j2so29545473wif.1 for ; Sun, 15 Mar 2015 16:48:57 -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 :content-type; bh=2sTS3+bPAmLzZzvSWe8lUe9HijR0YVAJVtwPBwTRhsA=; b=kz7AANZBmmJMxhi5/YYxY7zmSWR8/4KEaAFS3ejQVjqdrhGEMhP3MswBPi91fWKmzN lGJWwCg3aUUum+uk3zVDI5TFgrjgwnGlzNZvQDNJPS/DJByYB9oYIUFs/0HcICkaQRMq 7ysN5dgsyFVwZy84FyP3fYrmzooDRd0xt4kbKWhON1nwzvuU6PTPE6JnRuLGRSsU2JZH Seg15jSkmdnc4z1/TZ/bB/3+m8jgBI/oNhu2QMN9KZ/ZySUiUijXNfHbq+b5rZmlYhF9 JhLGLDFjAk1lSnQBFHGkffz67C9nSz1xpUxizv6PbnKaCGGrZ3X+yUPvZdcKWcsbtkEV hvPA== MIME-Version: 1.0 X-Received: by 10.195.12.97 with SMTP id ep1mr119569241wjd.134.1426463337180; Sun, 15 Mar 2015 16:48:57 -0700 (PDT) Received: by 10.27.214.136 with HTTP; Sun, 15 Mar 2015 16:48:57 -0700 (PDT) In-Reply-To: References: Date: Sun, 15 Mar 2015 16:48:57 -0700 Message-ID: Subject: Re: register HID with SDP error From: Waitman Gobble To: freebsd-bluetooth@freebsd.org Content-Type: text/plain; charset=UTF-8 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: Sun, 15 Mar 2015 23:48:59 -0000 On Sun, Mar 15, 2015 at 7:58 AM, Waitman Gobble wrote: > Hi, > > 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); > > > > messages I am receiving: > > sdp_error(ss) is Input/output error (5) > > sdpd[6621]: Could not process SDP request from control socket, > pdu->pid=129, pdu->tid=1, pdu->len=12, len=17, error=3 > > > I see /usr/src/usr.sbin/bluetooth/bthidd/ but I believe that's to > connect to remote HID services. > > > 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 > 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? > > ubt0: on usbus0 > ubt0: ubt_bulk_read_callback:977: bulk-in transfer failed: USB_ERR_IOERROR > ubt0: at uhub0, port 8, addr 5 (disconnected) > ubt0: on usbus0 > ubt0: at uhub0, port 8, addr 6 (disconnected) > ubt0: on usbus0 > ng_hci_process_command_timeout: ubt0hci - unable to complete HCI > command OGF=0x3, OCF=0x3. Timeout > ng_hci_process_command_timeout: ubt0hci - unable to complete HCI > command OGF=0x4, OCF=0x9. Timeout > ubt0: ubt_bulk_read_callback:977: bulk-in transfer failed: USB_ERR_IOERROR > ubt0: at uhub0, port 8, addr 7 (disconnected) > ubt0: on usbus0 > ng_hci_process_command_timeout: ubt0hci - unable to complete HCI > command OGF=0x3, OCF=0x3. Timeout > ubt0: ubt_bulk_read_callback:977: bulk-in transfer failed: USB_ERR_IOERROR > ubt0: at uhub0, port 8, addr 8 (disconnected) > ubt0: on usbus0 > ng_hci_process_command_complete: ubt0hci - HCI command failed, > OGF=0x1, OCF=0xe, status=0xc > ng_hci_process_command_complete: ubt0hci - HCI command failed, > OGF=0x1, OCF=0xe, status=0xc > ng_hci_process_command_complete: ubt0hci - HCI command failed, > OGF=0x1, OCF=0xe, status=0xc > ubt0: ubt_bulk_read_callback:977: bulk-in transfer failed: USB_ERR_IOERROR > ubt0: at uhub0, port 8, addr 9 (disconnected) > ubt0: 10> on usbus0 > ubt0: ubt_bulk_read_callback:977: bulk-in transfer failed: USB_ERR_IOERROR > ubt0: at uhub0, port 8, addr 10 (disconnected) > ubt0: 11> on usbus0 > ubt0: ubt_bulk_read_callback:977: bulk-in transfer failed: USB_ERR_IOERROR > ubt0: at uhub0, port 8, addr 11 (disconnected) > ubt0: 12> on usbus0 > > > > Thank you for any pointers, help, comments. > > -- > Waitman Gobble > Los Altos, California USA > 510-830-7975 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. -- Waitman Gobble Los Altos California USA 510-830-7975