蓝牙学习 (7) - raspberrryPi 扫描TI sensorTag

8 篇文章 0 订阅

前面几篇分别简单涉及了

那么接下来,可以仔细分析蓝牙的packets

raspberryPi scan

在raspberryPi上执行sudo hcitool lescan

pi@raspberrypi:~ $ sudo hcitool lescan
LE Scan ...
3F:27:A7:F4:76:A1 (unknown)
2B:52:CB:55:00:90 (unknown)
37:92:63:B7:9C:54 (unknown)
54:6C:0E:80:B4:86 CC2650 SensorTag

如log中54:6C:0E:80:B4:86 CC2650 SensorTag, Sensor Tag被扫描到。

Siniffer log

wireshark中Log的packet截图如下
在这里插入图片描述

ADV_IND

下图为sensorTag的广播报文
在这里插入图片描述
Advertising_Type:

  • 0x00 Connectable and scannable undirected advertising (ADV_IND)(default)
  • 0x01 Connectable high duty cycle directed advertising (ADV_DIRECT_IND, high duty cycle)
  • 0x02 Scannable undirected advertising (ADV_SCAN_IND)
  • 0x03 Non connectable undirected advertising (ADV_NONCONN_IND)
  • 0x04 Connectable low duty cycle directed advertising (ADV_DIRECT_IND, low duty cycle)

在spec 5.0中2.3.1.1 ADV_IND定义了ADV_IND PDU payload.
在这里插入图片描述

SCAN_REQ

下图为Scan Request packet
在这里插入图片描述
https://www.bluetooth.com/zh-cn/specifications/bluetooth-core-specification

Advertising devices may receive scan requests from listening devices in order to get additional user data from the advertising device. Scan responses are sent by the advertising device to the device making the scan request.

在spec 5.0 中, 4.2.2.3 Scanning Procedure

  • A scanning device uses the scanning procedure to listen for unidirectional broadcasts of user data from advertising devices using the advertising channel.
  • A scanning device can request additional user data from an advertising device by making a scan request.
  • The advertising device responds to these requests with additional user data sent to the scanning device over the advertising
    channel.

关于广播报文,Scan Request, Scan Response, 以及connect Request在下面的链接中有进一步的解释,
http://www.wowotech.net/bluetooth/ble_broadcast.html
这里就直接引用一下:
在这里插入图片描述

Reference

http://www.wowotech.net/bluetooth/ble_broadcast.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值