简体   繁体   English

如何在不指定UUID的情况下扫描iBeacon信号?

[英]How to scan iBeacon signals without specifying UUID?

Since iBeacon signal is just a BLE broadcasting with a predefined BLE profile, I think I can write an iOS App which scan the BLE broadcasting signals and analyze whether any found signal is iBeacon. 由于iBeacon信号只是具有预定义BLE配置文件的BLE广播,我想我可以编写一个iOS应用来扫描BLE广播信号并分析是否找到的信号是iBeacon。 But how to do that? 但是该怎么做呢?

  1. How to scan all BLE broadcasting signals around? 如何扫描周围的所有BLE广播信号?
  2. How to distinguish whether a BLE broadcasting signals is iBeacon? 如何区分BLE广播信号是否为iBeacon?

Unfortunately on iOS you must supply a ProximityUUID to see iBeacons. 不幸的是,在iOS上,您必须提供ProximityUUID才能看到iBeacons。 On Android you can see all iBeacons regardless of UUID. 在Android上,无论UUID是什么,您都可以看到所有iBeacon。 Further, on iOS you can not use CoreBluetooth APIs to what advertisements are iBeacons. 此外,在iOS上,您不能将CoreBluetooth API用作iBeacons的广告。

See here for details. 有关详细信息,请参见此处

The answer by @davidgyoung is not entirely correct. @davidgyoung的回答并不完全正确。 On iOS you can subscribe to enter/leave reigning, but you have to know the UUID beforehand. 在iOS上,您可以订阅进入/离开统治,但是您必须事先了解UUID。

However, you can use regular Bluetooth device scanning for detecting all Bluetooth devices. 但是,您可以使用常规的蓝牙设备扫描来检测所有蓝牙设备。 You can then look at the advertisement data to see if it is actually using a iBeacon identifier and list its iBeacon UUID. 然后,您可以查看广告数据以查看它是否实际上在使用iBeacon标识符,并列出其iBeacon UUID。

According to me, You can't find all beacons that are broadcasting advertise data, regardless of their proximity UUID. 据我说,您找不到所有广播广告数据的信标,无论它们的邻近性UUID如何。

This can be only done in Mac app, not in iOS. 这只能在Mac应用中完成,而不能在iOS中完成。

This will help you better understand Click here 这将帮助您更好地了解单击此处

And this is the link for open sourced beacon scanning app in working state for mac: Click here 这是Mac处于工作状态的开源信标扫描应用程序的链接: 单击此处

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM