android - 蓝牙macaddress是不同的地址
问题描述
我是使用 UUID 扫描蓝牙设备的低功耗蓝牙新手,问题是成功扫描蓝牙设备,但蓝牙 MAC 地址不是设备 MAC 地址,它是随机生成的 MAC 地址。
我尝试BLE
使用 uuid
扫描回调它工作正常,但问题是设备bluetooth
mac地址不正确,但设备名称正确。
ScanFilter scanFilter = new ScanFilter.Builder()
.setServiceUuid(new ParcelUuid(SERVICE_UUID))
.build();
List<ScanFilter> scanFilters = new ArrayList<ScanFilter>();
scanFilters.add(scanFilter);
ScanSettings scanSettings = new ScanSettings.Builder().build();
mBluetoothLeScanner.startScan(scanFilters, scanSettings, scanCallback);
我需要正确的bluetooth
mac 地址来扫描设备,但显示的地址错误。
解决方案
这是Bluetooh LE 的一项隐私功能。[Bluetooth SIG] 的博客有一篇关于它以及如何处理它的好帖子: https ://www.bluetooth.com/blog/bluetooth-technology-protecting-your-privacy/
推荐阅读
- swiftui - 使用 SegmentedControl 在视图之间切换
- javascript - 为什么我的代码无法处理或接受换行符?
- javascript - 如何在 JavaScript 中将 n 个像素适合画布?
- c# - 可以同时注入 UnitOfWork 和 DbContext 本身吗?
- python - 没有从数据库中获取结果 - sqlite 3
- javascript - 使用应该模拟的内部函数测试函数
- bash - 根据列中的值选择文本文件的行
- php - 尝试通过从结果中获取的键对获取结果进行排序
- php - 在 PHP 中使用 STRPOS 查找多个值进行过滤
- java - 休息模板响应正文为 404 但状态为 500