Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

increase Android BLE bonding / pairing dialog timeout

I have an android app that connects to a BLE device and pairs with it using BleDevice.createBond(). the issue is that the dialog could disappear before the user noticing it.

here is a screenshot of the dialog I am talking about.

enter image description here

how long does the dialog appear? the documentation doesn't mention it

is there any way to increase the time of which the dialog is showing?

like image 672
Remon Shehatta Avatar asked Jan 26 '26 03:01

Remon Shehatta


1 Answers

No, you cannot increase the time. The dialog can only be valid for 30 seconds (even shorter if you also have to enter a PIN) this is because of BLE_GAP_SEC_STATUS_TIMEOUT and is defined in the Bluetooth Core Spec as 30 seconds (Bluetooth Specification, Version 5.0, Vol 3, Part H, Section 3.4 - SMP Timeout.)

like image 164
SigiN Avatar answered Jan 27 '26 16:01

SigiN



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!