From owner-freebsd-bluetooth@FreeBSD.ORG Fri Nov 12 16:58:05 2010 Return-Path: Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE7841065672 for ; Fri, 12 Nov 2010 16:58:05 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 82BE98FC0A for ; Fri, 12 Nov 2010 16:58:05 +0000 (UTC) Received: by iwn39 with SMTP id 39so3701023iwn.13 for ; Fri, 12 Nov 2010 08:58:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=+LezrfBVImSIB5ZxlOzMsNhV/E7RpsON/ddslPeW5ms=; b=npiTLoTNXlNhlRst8JpfuG4ciOo10uUaBYEKCr9+gJVAC0LUzqgzLIFFJhUh0iS+Tc BuMb1Ti11XcJUXjgDZ60C0baJQAi8kEaRDEOFe6CEjCtTXVRfhADn2G2CxuuSC25EwWn qZ60ILrCt5PyRiA4zf4BhNz1cn7bn4M9L3wdA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=olvSaKTifYia2BFzsmFDiGbir8cADjOe71cpdPfAdOslZ76pLjLZaN+2lWEBlY8omp mapd9kJBReG/A2sAbmAIAE2/Di650xbdOfq0yq1uOksWTRMTIY2sK9H8p8BtgVry/+PX TPcMy9stKSG9DkBjmz4CG+D6utHjKSNiS+57o= MIME-Version: 1.0 Received: by 10.231.12.130 with SMTP id x2mr622347ibx.138.1289581084545; Fri, 12 Nov 2010 08:58:04 -0800 (PST) Received: by 10.231.207.14 with HTTP; Fri, 12 Nov 2010 08:58:04 -0800 (PST) In-Reply-To: References: Date: Fri, 12 Nov 2010 08:58:04 -0800 Message-ID: From: Maksim Yevmenkin To: Marek Salwerowicz Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-bluetooth@freebsd.org Subject: Re: Can't l2ping to BT device X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Nov 2010 16:58:05 -0000 Marek, > 'hccontrol inquiry' discovers the device I want to connect to, but l2ping > can't ping to it: > > vv1% hccontrol inquiry > Inquiry result, num_responses=3D1 > Inquiry result #0 > =A0 =A0 =A0 BD_ADDR: FF2 > =A0 =A0 =A0 Page Scan Rep. Mode: 0x1 > =A0 =A0 =A0 Page Scan Period Mode: 00 > =A0 =A0 =A0 Page Scan Mode: 00 > =A0 =A0 =A0 Class: 00:1f:00 > =A0 =A0 =A0 Clock offset: 0x77cd > Inquiry complete. Status: No error [00] > > vv1% l2ping -a FF2 > 0 bytes from FF2 seq_no=3D0 time=3D5127.835 ms result=3D0x4 > 0 bytes from FF2 seq_no=3D1 time=3D5128.129 ms result=3D0x4 > 0 bytes from FF2 seq_no=3D2 time=3D5127.133 ms result=3D0x4 > 0 bytes from FF2 seq_no=3D3 time=3D5128.159 ms result=3D0x4 > ^C > vv1% 0x4 is page timeout, i.e. device does not answer page call. basically baseband connection timeout. > it's a new pair, so I typed config in hcsecd.conf: > > device { > =A0 =A0 =A0 bdaddr =A000:06:66:00:e2:84; # 'FF2' results in syntax error,= need to be > MAC address > =A0 =A0 =A0 name =A0 =A0"so51-FF2"; > =A0 =A0 =A0 key =A0 =A0 nokey; > =A0 =A0 =A0 pin =A0 =A0 "1234"; > } > and then restarted hcsecd > > during l2ping'ing hcsecd throws only this message: > > hcsecd[2315]: Received unexpected HCI event, event=3D0xff usually l2ping does not require any pairing. it works at l2cap control channel level, i.e. lower than any bluetooth profile. in any case, 0xff is a vendor specific event. hcisecd(8) can not do anything about it, so it just ignores it. > # hcidump : > > vv1% # hcidump > HCIDump - HCI packet analyzer ver 1.5 > device: any snap_len: 65535 filter: 0xffffffffffffffff >> >> HCI Event: Vendor(0xff) plen 2 >> HCI Event: Connect Complete(0x03) plen 11 > < HCI Command: Create Connection(0x01|0x0005) plen 13 >> HCI Event: Vendor(0xff) plen 2 >> HCI Event: Command Status(0x0f) plen 4 >> HCI Event: Vendor(0xff) plen 2 >> HCI Event: Connect Complete(0x03) plen 11 > < HCI Command: Create Connection(0x01|0x0005) plen 13 >> HCI Event: Vendor(0xff) plen 2 >> HCI Event: Command Status(0x0f) plen 4 >> HCI Event: Vendor(0xff) plen 2 >> HCI Event: Connect Complete(0x03) plen 11 interesting... there is a vendor event with every transaction with the device. next time please run hcidump -X or obtain a binary dump with hcidump -w (to get more information). timestamps would also be useful. what kind of devices you have? both local and remote > l2ping from other machine (stays next to vv1) to FF2 works great - the > config is the same so, are you saying that there is an already established connection between other machine and ff2? if so, then it explains page timeout. thanks, max