Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Sep 2013 10:59:26 -0700
From:      Maksim Yevmenkin <maksim.yevmenkin@gmail.com>
To:        Yuri <yuri@rawbw.com>
Cc:        "freebsd-bluetooth@freebsd.org" <freebsd-bluetooth@freebsd.org>
Subject:   Re: Can ubt0 be a slave or a passive listener, and not a master?
Message-ID:  <CAFPOs6r2sWxEnW76ti9zreo396=%2Bp0KzXrQwfZwYenS-NucQcA@mail.gmail.com>
In-Reply-To: <522DEFD9.1030608@rawbw.com>
References:  <522DEFD9.1030608@rawbw.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Sep 9, 2013 at 8:57 AM, Yuri <yuri@rawbw.com> 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: <vendor 0x0a12 product 0x0001, class 224/1, rev 2.00/19.15, addr 3> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFPOs6r2sWxEnW76ti9zreo396=%2Bp0KzXrQwfZwYenS-NucQcA>