随机化BLE中的Mac地址 [英] Randomize Mac Address in BLE

查看:495
本文介绍了随机化BLE中的Mac地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我制作了一个将iOS设备变成信标的应用程序.现在,当我从android设备扫描BLE设备时,我在扫描列表中找到了该iOS设备,但是问题是每次我获得随机的Mac地址时.

I have made one app which turns iOS device to beacon. Now when I scan BLE devices from android device I got that iOS device in scan list but issue is every time I got random Mac address.

所以,我的问题是:此默认行为是否意味着获得随机的mac地址? 我已经检查了所有关于堆栈溢出的问题,并得到了相同的答案,但是我仍然想确认吗?

So, my question is: Is this default behaviour means getting random mac address? I have checked all question on stack overflow and got same answer but still I want to confirm it?

此外,如果更改mac地址是默认行为,那么更改mac地址时能否获得?

Also, if changing mac address is default behaviour then can we get when mac address changed?

同样适用于android,如果我的android设备充当信标,并且如果我对其进行扫描,那么它仍然会旋转我的mac地址吗?

Same for android as well, If my android device works as beacon and if I scan it then still it will rotate my mac address?

推荐答案

每当发布BLE时,iOS设备将在未指定的期限和条件后自动轮播广告数据包的MAC地址.

Whenever advertising BLE, iOS devices will automatically rotate the advertisement packets' MAC address after an unspecified period and conditions.

发生这种情况的确切条件和频率是无证的,专有的,并且Apple随时可能对其进行更改.尽管偶然的测试表明它通常一次只能保持几分钟的稳定运行,但是没有可靠的方法来预测iOS设备何时会轮换正在进行的BLE广告的MAC.

The exact conditions and frequency in which this happens is undocumented, proprietary, and subject to change at any time by Apple. There is no reliable way to predict when an iOS device will rotate the MAC of an ongoing BLE advertisement, although casual testing shows it often remains stable for minutes at a time.

知道何时更改MAC的唯一方法是使iOS发布已知的iBeacon标识符,附近没有其他设备在发布该iBeacon标识符,并在Android或其他可以读取原始广告的MAC的操作系统上跟踪该标识符.然后,您可以直接测量MAC何时更改.

The only way to know when the MAC changes is to make iOS advertise a known iBeacon identifier that no other device in the vicinity is advertising and track this identifier on Android or another OS that lets you read the raw advertisement's MAC. You can then directly measure when the MAC changes.

以上技术有效,但在大多数使用情况下帮助有限,因为它需要两个紧邻的设备和一个iOS固定的广告.

The above technique works, but is of limited help in most use cases as it requires two devices in the immediate vicinity and a fixed advertisement by iOS.

这篇关于随机化BLE中的Mac地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆