[Tfug] Questions regarding Linux and Bluetooth...

John Gruenenfelder johng at as.arizona.edu
Sat Mar 14 22:19:31 MST 2009


On Tue, Mar 03, 2009 at 08:57:25PM -0700, Jim March wrote:
>Folks,
>
>I need the ability to check to see if Bluetooth communications are going on
>in a given room (like, say, the Pima County election center).
>
>When checking for WiFi I know how to use WiFi Radar and similar tools to
>read what's going on even if there's no SSID.  I have a WiFi modem that can
>operate in promiscuous mode (Atheros 5007).  So I'm covered there.
>
>Are there equivelent software tools for Bluetooth?

Funny you should ask, but I just recently noticed 'btscanner' in the Debian
repository.  It does more or less what you are looking for.  The docs aren't
clear, but you need to run it as root.

It's an ncurses tool and after you start a scan it will list all of the
discovered devices in the main window.  Selecting one will show a page of
detailed information on the device.  This information, along with timestamps
so you know when it was visible and for how long, is stored to disk.
btscanner also comes with a copy of the OUI database (matches device IDs to
names and manufacturers) to give more useful output, although in this
particular case my BT headphones are not listed.

There's also 'hcitool' which is the multitool for working with Bluetooth.  It
can scan, show info, change settings, and lots of other low level stuff.  But
it's much lower level and manual and not really a "scanner" like WiFi Radar or
btscanner.  hcitool can also do a lot without being root.

Due to the nature of the BT protocol, what you discover may be rather hit and
miss.  For example, my BT headphones will show up on an inquiry scan iff they
are in pairing mode.  If I just turn them on, they will not show up in a
scan.  However, if you use hcitool to inquire about the headphone's specific
MAC address then you can still get information.  YMMV.

>Also: which Bluetooth USB adapters are any good?  Are some better than
>others for "scanning"?

I've been extremely happy with the Linksys USB-BT100 adapter I bought in 2005.
It uses the btusb module and works just fine in Linux.  lsusb output shows the
vendor ID as "Cambridge Silicon Radio, Ltd".

The main reason I bought this particular device, however, is that it has an
antenna, about 6-7cm long, on a rotating arm.  I seem to get very good range
with it.  I can wear my BT headphones all throughout the house (2 bedroom
condo, not that big) and only in the opposite corner in the kitchen does the
signal sometimes drop a packet.  But it's audio so no harm done.  The dongle
sits atop my desk plugged into a USB hub underneath my right speaker and next
to my display.

As for scanning... I can't answer that question.  It *could* be my particular
adapter that is preventing me from scanning for devices not in pairing
mode... I don't really know.  My laptop has a built-in BT adapter, but I can't
use it right now to test that hypothesis.


Now... if I could only get these BT headphones to work with either ALSA+dmix
or PulseAudio.... Argh...


-- 
--John Gruenenfelder    Systems Manager, MKS Imaging Technology, LLC.
Try Weasel Reader for PalmOS  --  http://weaselreader.org
"This is the most fun I've had without being drenched in the blood
of my enemies!"
        --Sam of Sam & Max




More information about the tfug mailing list