如何自动连接,而无需扫描配对设备(BLE) [英] How to Autoconnect to a paired device (BLE) without scanning

查看:2217
本文介绍了如何自动连接,而无需扫描配对设备(BLE)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在开发一个应用程序BLE,我们需要一个低功耗。我们需要在设备的后台进程连接,所以我们正在扫描所有的时间。这意味着,电力消耗是巨大的。

We are developing a BLE application and we need a low power consumption. We need to connect devices in background processes so we are scanning all the time. This means that the power consumption is huge.

我们知道,Android操作系统会自动在一定的蓝牙设备为耳机或车载自由的双手设备和手机的功耗保持较低的连接。

We know that Android OS connects automatically to some bluetooth devices as headsets or car free-hands devices and the power consumption of the phone keeps low.

时有什么办法可以用同样的方法是Android操作系统使用?

Is there any way to use the same method that Android OS use?

我们需要为它出现在电话附近尽快连接到设备,我们需要不断地测量RSSI值。

We need to connect to the device as soon as it appears near the phone, and we need to measure the RSSI value constantly.

可以减少蓝牙功耗与BLE设备不断寻求?

Is possible to reduce the Bluetooth power consumption with a constant search for BLE devices?

推荐答案

我觉得<一个href=\"http://stackoverflow.com/questions/36915530/how-android-system-autoconnects-to-paired-device\">my为(我的)类似的问题的解决方案可能帮助autoconnection。只需保存BLE设备的MAC地址到DB或东西,以及当它需要使用MAC地址连接。您可以拨打 connectGatt()周期,应用程序启动时,或者当它初始化的东西。但我没有恒定RSSI确认部分的任何想法。它可能需要不断的扫描。

I think my solution for similar question (of me) might help for autoconnection. Just save the MAC address of the BLE device into DB or something, and connect by using the MAC address when it needed. You can call connectGatt() periodically, when the app starts, or when it initializes something. But I don't have any idea for constant RSSI checking part. It might need constant scanning.

这篇关于如何自动连接,而无需扫描配对设备(BLE)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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