简体   繁体   English

iOS蓝牙低能耗

[英]iOS Bluetooth Low Energy emission rate

Apologise for the probably use of the wrong word in my question but for the life of me I can't think of the right one. 抱歉在我的问题中可能使用了错误的单词,但为了我的一生,我想不出正确的单词。

Anyway, I've been playing about with the Bluetooth Low Energy and I'm trying to create something that is going to use the RSSI signal strength the BLE device emits. 无论如何,我一直在研究低功耗蓝牙技术,并且正在尝试创建某种东西来利用BLE设备发射的RSSI信号强度。 For this, I need it to emit its pulse multiple times per second. 为此,我需要它每秒发出多次脉冲。

Is there a way I can up the amount of times my devices either scan for a signal, or broadcast their signal through code on iOS devices? 有什么办法可以增加我的设备扫描信号或通过iOS设备上的代码广播其信号的次数?

No, there is no API for you to change the advertisement speed or radio power. 不,没有API可让您更改广告速度或无线电功率。

This aspect is fully controlled by the system. 这方面完全由系统控制。 You can only start and stop the advertisement and add some metadata to the packets: device local name, advertised services, etc. Moreover, the contents of the advertisement packets will differ depending on whether your app is in the background or foreground and, additionally, in background it will be slowed down. 您只能启动和停止广告,并向数据包中添加一些元数据:设备本地名称,广告的服务等。此外,广告数据包的内容将根据您的应用是在后台还是在前台而有所不同,此外,在后台它会变慢。 These effects have been documented in various SO questions and in the header files. 这些影响已记录在各种SO问题和头文件中。

If your clients are iOS applications, then they should use either the RSSI in the advertisement packets ( centralManager:didDiscoverPeripheral:advertisementData:RSSI: method) or when connected, the readRSSI method on the peripheral object (just make sure you don't call it too often). 如果您的客户端是iOS应用程序,则他们应该在广告包中使用RSSI( centralManager:didDiscoverPeripheral:advertisementData:RSSI:方法),或者在连接时在外围对象上使用readRSSI方法(只需确保您不调用它)太频繁)。

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

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