简体   繁体   English

BLE中心发出的连接请求可以唤醒在后台运行的充当BLE外围设备的iOS应用吗?

[英]Can an iOS app that is acting as a BLE peripheral running in the background be woken up by a connection request from a BLE central?

I have an iOS application that is acting as a BLE peripheral. 我有一个充当BLE外围设备的iOS应用程序。 It is advertising at all times. 它一直在做广告。 I have a Raspberry Pi that is acting as a BLE central. 我有一个充当BLE中心的Raspberry Pi。 It is scanning at all times. 它一直在扫描。 If the iOS app goes into the background and is suspended, and if the iOS app has the UIBackgroundModes key set to bluetooth-peripheral, will the app be woken up by a connection request from the central? 如果iOS应用程序进入后台并被挂起,并且iOS应用程序的UIBackgroundModes密钥设置为Bluetooth-peripheral,该应用程序是否会被来自中央的连接请求唤醒? Assume that the central and the peripheral have never connected before. 假设中央和外围设备以前从未连接过。 Thank you! 谢谢!

You can advertise a peripheral in the background, but there are some limitations, which are described in the Core Bluetooth Programming Guide 您可以在后台播报外围设备,但是有一些限制,请参见《 Core Bluetooth编程指南》中的描述。

  • The CBAdvertisementDataLocalNameKey advertisement key is ignored, and the local name of peripheral is not advertised. CBAdvertisementDataLocalNameKey广告密钥将被忽略,并且外围设备的本地名称不会被广告。
  • All service UUIDs contained in the value of the CBAdvertisementDataServiceUUIDsKey advertisement key are placed in a special “overflow” area; CBAdvertisementDataServiceUUIDsKey广告密钥的值中包含的所有服务UUID都放置在特殊的“溢出”区域中。 they can be discovered only by an iOS device that is explicitly scanning for them. 只有通过显式扫描它们的iOS设备才能发现它们。
  • If all apps that are advertising are in the background, the frequency at which your peripheral device sends advertising packets may decrease. 如果所有正在做广告的应用程序都在后台,则外围设备发送广告数据包的频率可能会降低。

The second point, in particular, may make it difficult for your RPi to discover the peripheral; 特别是第二点,可能会使RPi很难发现外围设备。 I am not sure if the standard discovery process will work. 我不确定标准发现过程是否可以正常工作。

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

相关问题 iOS 在从外围设备传入 BLE 连接时停止唤醒应用程序 - iOS stops waking up the app upon incoming BLE connection from peripheral iOS 作为 BLE 外围设备 - 连接问题 - iOS as BLE peripheral - connection issue 在后台扫描 BLE 外围设备 - iOS - Scan for BLE peripheral in background - iOS iOS BLE 中央如何在通知模式下从外围设备接收超过 182 个字节? - How can an iOS BLE central receive more than 182 bytes from a peripheral in notify mode? 当后台或手机中的应用处于锁定状态时,iOS BLE外围设备扫描 - iOS BLE peripheral scanning when app in background or phone is in lock state 当应用程序在后台时,从连接的按钮 BLE 外围设备监听点击事件<react-native ble manager ios></react-native> - listen to click-event from connected button BLE peripheral, while app is in background <react-native ble manager iOS > iOS BLE外设/广告数据在后台模式 - iOS BLE peripheral / advertisement data in background mode 使ios7 BLE外设在后台工作 - Making ios7 BLE peripheral to work in background 我们可以更改 iOS 中央和外围设备上的 BLE MTU 和特征大小吗 - Can we Change BLE MTU and characteristic sizes on iOS central and peripheral devices 可以从后台运行的应用唤醒BLE吗? - Is BLE wakeup from app running in the background possible?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM