[英]can we reconnect disconnected peripheral using bluetooth without scanning again ios
I am making communication between ios device and hardware. 我正在ios设备和硬件之间进行通信。 If my iOS app and hardware are connected using BLE and connection was established.
如果使用BLE连接了我的iOS应用和硬件,并且已建立连接。 If hardware is out of range or connection got any issue then iOS app will recheck for available devices automatically and if iOS app got previously paired hardware device then will try to reconnect automatically.
如果硬件超出范围或连接出现任何问题,则iOS应用将自动重新检查可用设备,如果iOS应用先前已配对了硬件设备,则将尝试自动重新连接。 What should i do to perform such task.
我应该怎么做才能执行这样的任务。 I have gone through many links where they are describing to call
did retrieve connected peripherals
method but by calling this method will it get connected automatically? 我已经遍历了许多链接,它们描述要调用的方法
did retrieve connected peripherals
方法,但是通过调用此方法,它将自动连接吗?
Yes, you can reconnect a disconnected peripheral by queuing up a connect command to that peripheral. 是的,您可以通过将连接命令排队到该外围设备来重新连接该外围设备。 It will persist until your app connect to the peripheral, at which point the didConnectPeripheral will be called.
它会一直持续到您的应用程序连接到外围设备为止,此时将调用didConnectPeripheral。 No scan necessary.
无需扫描。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.