How to automatically connect to a paired device (BLE) without scanning

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

We know that the Android OS automatically connects to some bluetooth devices as headsets or devices for mobile devices, and the power consumption in the phone remains low.

Is it possible to use the same method that uses the Android OS?

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

Is it possible to reduce the power consumption of Bluetooth while constantly searching for BLE devices?

+1
source share
1 answer

I think my solution for a similar question (of me) may help for auto-join. Just save the MAC address of the BLE device to the database or something else, and connect using the MAC address when necessary. You can call connectGatt() periodically when the application starts or when it initializes something. But I have no idea for the constant part of RSSI checking. This may require constant scanning.

-1
source

Source: https://habr.com/ru/post/985431/


All Articles