Appearance
Appearance
XXX - 添加 Bluetooth 历史的简要说明
在 Wireshark 实现的最低层,Bluetooth 由 4 种不同类型的帧组成:
BTHCI_ACL:异步无连接流量。(数据)
BTHCI_SCO:同步面向连接流量。(语音)
BTHCI_CMD:命令
BTHCI_EVT:事件
No. Time Source Destination Protocol Info 11 5.731294 L2CAP Sent Echo RequestFrame 11 (57 bytes on wire, 57 bytes captured)Bluetooth HCI H4 Sent ACL Data Direction: Sent (0x00) HCI Packet Type: ACL Data (0x02)Bluetooth HCI ACL Packet .... 0000 0010 1001 = Connection Handle: 0x0029 ..10 .... .... .... = PB Flag: Start Fragment (2) 00.. .... .... .... = BC Flag: Point-To-Point (0) Data Total Length: 52Bluetooth L2CAP Packet Length: 48 CID: 0x0001 Command: Echo Request Command Code: Echo Request (0x08) Command Identifier: 0xc8 Command Length: 44Bluetooth 栈已部分实现,Wireshark 可以解析该栈的若干层和协议。
有一种为 Bluetooth 帧定义的 libpcap 格式,并且 libpcap 1.0.0 及更高版本支持在 Linux 中的 Bluetooth 设备上进行捕获;如果 Wireshark 链接了该版本的 libpcap,就能够在 Bluetooth 设备上捕获。(在随附早于 1.0.0 版本 libpcap 的 Linux 发行版中,libpcap 不支持在 Bluetooth 设备上捕获,因此你必须从 tcpdump.org 获取 libpcap 1.0.0 或更高版本并安装它,然后使用该版本的 libpcap 构建 Wireshark,才能在 Bluetooth 设备上捕获。截至 2009-01-27,Gentoo Linux 的主线仓库(portage)中已有支持 Bluetooth 的 libpcap。)Wireshark 也可以读取该格式的捕获文件。
原始 pcap 格式不会存储数据包是发送还是接收(bug 1751)。较新的文件格式包含方向信息,它是一个 4 字节字段;如果数据包是“received”,则设置 bit0,参见 LINK-LAYER HEADER TYPES 中的 LINKTYPE_BLUETOOTH_HCI_H4_WITH_PHDR。注意,即使 pcap 文件在其他地方以 little-endian 写入,该字段也是 big-endian(Development/LibpcapFileFormat)。原始格式使用协议 ID LINKTYPE_BLUETOOTH_HCI_H4,新格式使用 LINKTYPE_BLUETOOTH_HCI_H4_WITH_PHDR(LINK-LAYER HEADER TYPES)。
此外,Wireshark 可以读取由 Linux 和(我认为)BSD Bluetooth 栈中可用的 HCIDUMP 工具创建的捕获文件,也可以读取来自 macOS PacketLogger Bluetooth 日志应用程序的捕获文件。其他可以创建捕获文件的平台包括以下内容。.NET 库 32feet.NET 在 Windows Mobile 上使用 Stonestreet One Bluetopia 栈时会生成 libpcap 捕获文件,参见其文档中 32feet.NET: Stonestreet One Bluetopia stack 的 Diagnostics 部分。
在 1.10 版本中,Wireshark 支持大多数 Bluetooth profile 和协议。开发版本 1.11(或更高版本)相当稳定,可用于 Bluetooth 相关用途。它包含更好的 Bluetooth 支持。
| Profile/Protocol | Filter name | Bluetooth HCI H1 | hci_h1 | Bluetooth HCI H4 | hci_h4 | Bluetooth HCI USB Transport | hci_usb | Bluetooth Linux Monitor Transport | hci_mon | Bluetooth 3DS Profile | bt3ds | Bluetooth AMP Packet | btamp | Bluetooth Attribute Protocol | btatt | Bluetooth AVCTP Protocol | btavctp | Bluetooth AVDTP Protocol | btavdtp | Bluetooth A2DP Profile | bta2dp | Bluetooth VDP Profile | btvdp | Bluetooth AVRCP Profile | btavrcp | Bluetooth BNEP Protocol | btbnep | Bluetooth HCI ACL Packet | bthci_acl | Bluetooth HCI Command | bthci_cmd | Bluetooth HCI Event | bthci_evt | Bluetooth HCI SCO Packet | bthci_sco | Bluetooth HCRP Profile | bthcrp | Bluetooth HFP Profile | bthfp | Bluetooth HID Profile | bthid | Bluetooth HSP Profile | bthsp | Bluetooth L2CAP Protocol | btl2cap | Bluetooth Low Energy Link Layer | btle | Bluetooth Low Energy RF Info | btle_rf | Bluetooth MCAP Protocol | btmcap | Bluetooth OBEX Protocol | btobex | Bluetooth RFCOMM Protocol | btrfcomm | Bluetooth DUN Packet | btdun | Bluetooth SPP Packet | btspp | Bluetooth GNSS Profile | btgnss | Bluetooth SAP Profile | btsap | Bluetooth SDP Protocol | btsdp | Bluetooth Security Manager Protocol | btsmp
| 相关 dissector | Filter name | Bluetooth Common | btcommon | Bluetooth SBC Codec | sbc | APT-X Codec | aptx | Bluetooth A2DP Content Protection Header SCMS-T | bta2dp_content_protection_header_scms_t | Bluetooth VDP Content Protection Header SCMS-T | btvdp_content_protection_header_scms_t | Ubertooth | ubertooth
SampleCaptures/l2ping.cap(Linux BlueZ hcidump)包含一些使用 hcidump 捕获的 Bluetooth 数据包,这些数据包来自 Linux BlueZ 栈附带的 l2ping 命令。
SampleCaptures/Bluetooth1.cap(Linux BlueZ hcidump)包含一些使用 hcidump 捕获的 Bluetooth 数据包。
tcpdumpBluetooth.pcap(libpcap)由最新版 libpcap/tcpdump CVS 中的 Bluetooth 嗅探功能创建的捕获文件。
https://www.bluetooth.com 官方 Bluetooth 会员网站
http://www.bluetooth.com/bluetooth/ 官方 Bluetooth 无线信息网站
http://en.wikipedia.org/wiki/Bluetooth 一篇非常好的关于 Bluetooth 的 Wikipedia 文章
http://www.bluez.org/ Linux Bluetooth 实现
导入自 https://wiki.wireshark.org/Bluetooth,时间为 2020-08-11 23:11:34 UTC