tcpdump mailing list archives

Re: pcap_findalldevs doesn't return bluetooth interfaces known to hcitool


From: Guy Harris <guy () alum mit edu>
Date: Wed, 14 Nov 2007 18:02:03 -0800


On Nov 14, 2007, at 10:57 AM, Barry Reinhold wrote:

I am attempting to use libpcap to capture Bluetooth exchanges
(DLT_BLUETOOTH)

Presumably you mean DLT_BLUETOOTH_HCI_H4 or DLT_BLUETOOTH_HCI_H4_WITH_PHDR; there is no DLT_BLUETOOTH with that name.

and am working with the head of the cvs repository.

The environment is a CentOS 5 system with kernel  2.6.18. It has a USB
Bluetooth adaptor that shows up as hci0 when the "hcitool dev" command is given. However, this interface, hci0, is not returned by pcap_findalldevs -
is it expected to be returned by pcap_findalldevs or are there other
requirements outside of being visible to hcitool before the interface will
be seen by pcap?

The code that looks for Bluetooth adapters is bt_platform_finddevs() in pcap-bt-linux.c; that code is compiled in if PCAP_SUPPORT_BT is defined in config.h.

config.h is constructed by the configure script; the configure script will set it if you're on Linux (which you are) and if there's a "/usr/ include/bluetooth/bluetooth.h" header. If that header isn't found, the configure script will not halt, but it will print the message

Bluetooth sniffing is not supported; install bluez-lib devel to enable it

Do you have a developer package for the Bluez Bluetooth stack's library? (No, I don't know what package that would be.)
-
This is the tcpdump-workers list.
Visit https://cod.sandelman.ca/ to unsubscribe.


Current thread: