Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm running Ubuntu 10.04.1 and am trying to get packet capturing working for my Bluetooth dongle using hcidump.

From what I've read, libpcap must be compiled to enable Bluetooth sniffing and given that hcidump isn't finding a single packet, I'm guessing the version Ubuntu has installed for me isn't compiled with bluetooth support.

So I downloaded a newer version of libpcap and installed the bluez header files. Configured libpcap and it gave a "Yes" for bluetooth support. It is now installed and sitting in /usr/local/lib/.

Now I'm trying to compile hcidump to use this lib rather than the system default but I can't figure out how...

I've read that GCC can be passed the -lpcap flag to set the path but I haven't figured out how to do this.

Any ideas?

share|improve this question

1 Answer 1

I had a quick look at the libpcap package and it appears that all you need to do to get Bluetooth support is to compile it with bluetooth development files installed. That is, install the libbluetooth-dev Install libbluetooth-dev package, then recompile libpcap:

sudo apt-get install libbluetooth-dev build-essential fakeroot
sudo apt-get build-dep libpcap
apt-get source libpcap
cd libpcap-*
dpkg-buildpackage -rfakeroot -b -nc -us -uc
sudo dpkg -iGO ../*.deb

(Better, before the dpkg-buildpackage step, add a version to debian/control so that your package bears a version number that's different from the official package, such as 1.0.0-6bloo1.)

Then try the hcidump executable from the bluez-hcidump Install bluez-hcidump.

If you do need to recompile hcidump and pass it a custom include file path (and probably a custom library file path as well), the way with most programs that have a configure script is to run

CFLAGS='-I /path/to/dependency/include' LDFLAGS='-L /path/to/dependency/lib' ./configure …

/usr/local/include and /usr/local/lib are usually included in the default search, though.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.