首页 > 解决方案 > 蓝牙macaddress是不同的地址

问题描述

我是使用 UUID 扫描蓝牙设备的低功耗蓝牙新手,问题是成功扫描蓝牙设备,但蓝牙 MAC 地址不是设备 MAC 地址,它是随机生成的 MAC 地址。

我尝试BLE使用 uuid扫描回调它工作正常,但问题是设备bluetoothmac地址不正确,但设备名称正确。

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);

我需要正确的bluetoothmac 地址来扫描设备,但显示的地址错误。

标签: androidbluetooth-lowenergy

解决方案


这是Bluetooh LE 的一项隐私功能。[Bluetooth SIG] 的博客有一篇关于它以及如何处理它的好帖子: https ://www.bluetooth.com/blog/bluetooth-technology-protecting-your-privacy/


推荐阅读