From owner-freebsd-bluetooth@FreeBSD.ORG Mon Sep 9 17:59:27 2013 Return-Path: Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A8BB8F52 for ; Mon, 9 Sep 2013 17:59:27 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: from mail-ve0-x22c.google.com (mail-ve0-x22c.google.com [IPv6:2607:f8b0:400c:c01::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 69D8B290D for ; Mon, 9 Sep 2013 17:59:27 +0000 (UTC) Received: by mail-ve0-f172.google.com with SMTP id oz11so3709710veb.17 for ; Mon, 09 Sep 2013 10:59:26 -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=OtA5VN56Zlpu4T5P6JQpS0tQhMkxdgpvvKkL0Kp0AHU=; b=dhMJg2xwNaLLt3uvTknVzBJisQN9MBaQzatsnfUIiVL9HvZVoYUmXJAtp7If2ywVdk QOdw+E4z1j6wmiStJ+7GN98LgZ+PhSLWKUCinJlZ337eRCCWR3WH4N+y2CYkqFDyOhQV TyFqBPQwc/b9aJzFFBvdD9prNHzx3KmdFK1yHmkMqFkbzaOaMH62RhebssqkVlka/flN 01kR/Ji+TZPRVC1euZsrSrajS4TeFcJa2tgx7m5rxTnsy4PYUgNrQ7FqE/QmYmNsUZnr KHt/7yzfjlN7UAl5hJGZm2yTRaxb9h30Clou6E6yvN5hhErGjgbye8GTyu1dk823EHWT Vmtg== MIME-Version: 1.0 X-Received: by 10.52.117.68 with SMTP id kc4mr15568233vdb.0.1378749566518; Mon, 09 Sep 2013 10:59:26 -0700 (PDT) Received: by 10.221.60.134 with HTTP; Mon, 9 Sep 2013 10:59:26 -0700 (PDT) In-Reply-To: <522DEFD9.1030608@rawbw.com> References: <522DEFD9.1030608@rawbw.com> Date: Mon, 9 Sep 2013 10:59:26 -0700 Message-ID: Subject: Re: Can ubt0 be a slave or a passive listener, and not a master? From: Maksim Yevmenkin To: Yuri Content-Type: text/plain; charset=ISO-8859-1 Cc: "freebsd-bluetooth@freebsd.org" X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Sep 2013 17:59:27 -0000 On Mon, Sep 9, 2013 at 8:57 AM, Yuri wrote: > I am trying to do some troubleshooting of BlueTooth connectivity and wouild > like to see the packets, or maybe make a simple slave (like GPS slave). i'm not sure what packets are you talking about here. fist of all, if thinking about link layer then its not going to happen. if you would like to dump HCI communication then you can use hcidump from ports collection. > I have this BlueTooth USB dongle: > ubt0: on > usbus1 > Then I stop bluetooth (master) stack, so that ubt0 has no hooks. > Then I direct all packets to ng_hole node: > ngctl mkpeer ubt0: hole hook hhook well, let me put it this way - its a little bit more complicated than this :) > Then I run DTrace script showing when some msg or data comes: > #!/usr/sbin/dtrace -s > fbt::ngh_rcvmsg:entry > { > printf("ngh_rcvmsg * "); > } > fbt::ngh_rcvdata:entry > { > printf("ngh_rcvdata * "); > } yes, i can believe it. > Attaching the hook to ubtN causes it to start bulk and interrupt transfers > (according to the code). true > Then I turn the cellphone (master) into discovery mode. But nothing comes to > the ng_hole at all. Supposedly, master in discovery mode should announce > itself to slaves. what are you expecting to see? > Why no messages arrive to the hole? Where is the problem? the lowest communication interface between host and device is HCI. there are HCI commands, HCI responses and HCI events. as far as discovery (inquiry) goes, one device initiates discovery (inquiry) in response to HCI command received from its host. the device responds (back to its host) with zero or more HCI events with information about other devices in RF proximity, followed by HCI response to indicate completion of discovery (inquiry). near by devices that are being discovered do not send anything back to their hosts. i hope that helps thanks max