iBeacon/低功耗蓝牙(BLE 设备)- 最大信标数 [英] iBeacon / Bluetooth Low Energy (BLE devices) - maximum number of beacons

查看:33
本文介绍了iBeacon/低功耗蓝牙(BLE 设备)- 最大信标数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想通过 iPhone (5s) 上的应用程序在 50-100 m 半径范围内一次跟踪大量信标 (~500).我已经查看了规范和在线内容,但我看不到您可以使用 BLE 一次跟踪的信标数量是否有任何限制.有谁知道您可以跟踪的信标数量是否存在限制,或者 iPhone 5s 是否可以完成跟踪这么多信标的任务?

I would like to track a large number of beacons (~500) at once within a 50-100 m radius via an app on an iPhone (5s). I've had a look at the spec and online and I can't see if there is any limit on the number of beacons you can track at once using BLE. Does anyone know if there is limitation on the number of beacons you can track exists or if an iPhone 5s would be up to the task of tracking that many beacons?

推荐答案

你用了track这个词,但iOS有两种不同的方法:监控和测距.

You used the word track, but iOS has two different methods: monitoring and ranging.

您最多可以设置 20 个区域进行监控.(可在 startMonitoringForRegion: 方法的文档中找到.)如果您的应用程序在后台运行,区域限制主要发挥作用.当您进入或离开您正在监控的区域时,操作系统会提醒您的应用程序(等待几分钟).操作系统甚至会启动您的应用,只是为了让它知道发生了什么(尽管只是很短的时间).

You can set a maximum of 20 regions to monitor. (Found in documentation for the startMonitoringForRegion: method.) Region limits mostly come into play if your app is in the background. The OS will alert your app when you enter or leave a region that you're monitoring (give or take a few minutes). The OS will even launch your app just to let it know what happened (although only for a short time).

另一种方法是测距,即找到设备蓝牙范围内的所有信标(通常在 100 英尺左右).如果您的信标分布在 100 英里以上,那么您在这里可能不会遇到任何实际限制.我没有找到任何相关文档,而且我只有四个信标正在测试,并且一次可以使用四个.

The other method is ranging, which is to find all the beacons within the Bluetooth range of the device (typically around 100 feet give or take). If your beacons are spread out over 100 miles, then you probably won't run into any practical limit here. I have not found any documentation for this, and I have only four beacons that I'm testing with, and four at a time works.

这是处理您的情况的一种方法.让所有 500 个信标使用相同的 UUID,并使用 initWithProximityUUID:identifier: 方法创建一个信标区域.(标识符仅供您使用——它不会影响任何事情).开始监视该信标区域.这样,只要找到您的 500 个信标中的一个(给或需要几分钟),您的应用就会收到通知.收到通知后,您可以使用 startRangingBeaconsInRegion: 查找该区域周围的所有信标,然后使用主要值和次要值来确定用户靠近哪些信标.

Here's one way to handle your situation. Make all your 500 beacons use the same UUID, and make a beacon region using initWithProximityUUID:identifier: method. (Identifier is just for you -- it doesn't affect anything). Starting monitoring for that beacon region. That way, your app will be notified whenever one of your 500 beacons are found (give or take a few minutes). Once notified, you can use startRangingBeaconsInRegion: to find all the beacons around that area, then use the major and minor values to figure out which beacons the user is near.

这篇关于iBeacon/低功耗蓝牙(BLE 设备)- 最大信标数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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