From owner-freebsd-bluetooth@FreeBSD.ORG Tue Apr 7 22:35:02 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 E05B0CA7 for ; Tue, 7 Apr 2015 22:35:01 +0000 (UTC) Received: from mail-wg0-x234.google.com (mail-wg0-x234.google.com [IPv6:2a00:1450:400c:c00::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 746DF7A4 for ; Tue, 7 Apr 2015 22:35:01 +0000 (UTC) Received: by wgbdm7 with SMTP id dm7so70750858wgb.1 for ; Tue, 07 Apr 2015 15:34:59 -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=/pzJaFImGphxoFOBogcpgVM69cITvgdM00Q4395/6zc=; b=a8vNcepO3dJJ4mS/6XfCOL4raG7cnDhtP7hcxif+GypS62ipYrjF5b/Kx+jbS8N2hq YIei67aQzu8ivvHevkk1kyijFbdY4pGIFXBimOeJVKVcUO+0WFPo3fvD1Ojh6pNYN2w+ ShYeQZC5zxrabtl4EpXbutDE2IgSmIO6c2SBdBDsDKCbQhj0CmNOTgjfM68LXWEr1CsK GbYE8VEBSOOnynOI2I2E43nB87wER/sSYOowZCZ5zt/5h94G1Yn2zQYUj6IbGkl7HYtC Q1fne9uSinENvzetypNWS+h3V0u3G+WXOFFkuX0NAPdVzyiOkCIbX6wU/lzCI7YFp698 aNbw== MIME-Version: 1.0 X-Received: by 10.180.80.65 with SMTP id p1mr8797862wix.70.1428446099922; Tue, 07 Apr 2015 15:34:59 -0700 (PDT) Received: by 10.27.91.75 with HTTP; Tue, 7 Apr 2015 15:34:59 -0700 (PDT) In-Reply-To: References: Date: Tue, 7 Apr 2015 15:34:59 -0700 Message-ID: Subject: Re: troubleshooting "btsockstat: kvm_nlist: no namelist" 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: Tue, 07 Apr 2015 22:35:02 -0000 On Sun, Apr 5, 2015 at 3:31 PM, Waitman Gobble wrote: > On Sun, Apr 5, 2015 at 3:17 PM, Waitman Gobble wrote: >> Hi, >> >> Does anyone know the reason(s) or circumstances I might receive the >> error message "no namelist" from kvm_list? >> >> ie, >> >> # btsockstat >> btsockstat: kvm_nlist: no namelist >> >> >> ... >> kvm_nlist(kvmd, nl); >> nl[0].n_name is "_ng_btsocket_hci_raw_sockets" >> nl[0].n_type is 0, which causes the error message to be displayed. >> should be something like 4 i think. >> >> >> >> # hccontrol inquiry >> shows list of devices >> >> # sdpcontrol -l browse >> shows service records >> >> >> i am seeing some errors in dmesg, >> >> ubt0: ubt_bulk_read_callback:977: bulk-in transfer failed: USB_ERR_IOERROR >> ubt0: ubt_intr_read_callback:878: interrupt transfer failed: USB_ERR_IOERROR >> >> >> Thank you, >> >> >> -- >> Waitman Gobble >> Los Atlos California USA >> 510-830-7975 > > > I do receive some USB_ERR_IOERROR messages on working machines, so I > don't think it's actually related to the namelist condition. > > Thanks, > > -- > Waitman Gobble > Los Altos California USA > 510-830-7975 I changed the code in btsockstat a little to print out error message instead of "no namelist" https://gist.github.com/waitman/f572053c0307a39f11e2 if (nl[0].n_type == 0) { printf("error: %s\n",kvm_geterr(kvmd)); } The error reported is: kvm_nlist: No such file or directory So I'm supposing this is because there are no ng_btsocket defined. _ng_btsocket_hci_raw_sockets # sysctl -a | grep bt dev.ubt.%parent: dev.ubt.0.%desc: vendor 0x0a12 CSR8510 A10, class 224/1, rev 2.00/88.91, addr 7 dev.ubt.0.%driver: ubt dev.ubt.0.%location: bus=0 hubaddr=4 port=5 devaddr=7 interface=0 ugen=ugen0.7 dev.ubt.0.%pnpinfo: vendor=0x0a12 product=0x0001 devclass=0xe0 devsubclass=0x01 sernum="" release=0x8891 mode=host intclass=0xe0 intsubclass=0x01 intprotocol=0x01 dev.ubt.0.%parent: uhub2 # sysctl -a | grep btsocket (no results) kldstat: 5 1 0xc2ba0000 e000 ng_ubt.ko 6 5 0xc2bb1000 14000 netgraph.ko 7 1 0xc2bcb000 12000 ng_hci.ko 8 3 0xc2bde000 a000 ng_bluetooth.ko 13 1 0xc2cc0000 16000 ng_l2cap.ko 14 1 0xc2cd8000 24000 ng_btsocket.ko 15 1 0xc2d05000 c000 ng_socket.ko ?? looks like these are set up in /usr/src/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c Any help appreciated. Thanks, -- Waitman Gobble Los Altos California USA 510-830-7975