简体   繁体   English

如何获得配对的BLE设备?

[英]How to get the paired BLE device count?

Description - How I can get the number of BLE connection in iOS. 描述 - 如何在iOS中获取BLE连接的数量。 I want to restrict a user to add more BLE sensor after a particular number of BLE connection. 我想限制用户在特定数量的BLE连接后添加更多BLE传感器。 I want to get the number of a BLE connection a device can handle. 我想获得设备可以处理的BLE连接的数量。

A connection represents state, not traffic. 连接表示状态,而不是流量。 The count of connections will be bound by either memory or the data structures used by the Bluetooth stack to manage them, both unknown. 连接数将受内存或蓝牙堆栈用于管理它们的数据结构的约束,两者都是未知的。 My answer is, "As many as it can and no more." 我的回答是,“尽可能多,不多。”

Packets represent traffic and each is handled one at a time. 数据包代表流量,每个数据包一次处理一个。 From this perspective, my answer is, "One." 从这个角度来看,我的回答是“一个”。

However, if a packet cannot be processed out of the critical paths in the chip and protocol stack fast enough to begin processing the next packet, packets can be dropped. 但是,如果无法快速地从芯片和协议栈中的关键路径处理数据包以开始处理下一个数据包,则可以丢弃数据包。 Experience has shown these critical paths in iOS are dependent on the traffic's packet size and rate. 经验表明iOS中的这些关键路径取决于流量的数据包大小和速率。 Additionally, other devices in the area not connected to your BLE stack may be flooding the radio spectrum and causing packet collisions outside the stack. 此外,未连接到BLE堆栈的区域中的其他设备可能会泛滥无线电频谱并导致堆栈外部的数据包冲突。 I have seen BLE traffic go to hell with an excess of 20 connections and as few as one. 我已经看到BLE流量超过20个连接并且只有一个连接到地狱。 From this perspective my answer is, "It depends." 从这个角度来看,我的回答是“这取决于”。

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

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