I have to set a timeout for the bluetooth pairing request if it's not accepted or canceled !!
It's mentioned that i have to use the timeout defined by Bluetooth standard
I am searching for that in the internet but I found nothing
I found this [https://stackoverflow.com/questions/26674532/is-it-possible-to-change-the-timeout-of-bluetooth-pairing-request-with-corebluet1] and it's mentioned that pairing request timeout is not changeable ,
Any help ?
The timeout should be 30 seconds and is defined in the Security Manager Specification (Bluetooth Core Specification, Version 5.2, Vol 3, Part H, Section 3.4 SMP TIMEOUT):-
To protect the Security Manager protocol from stalling, a Security Manager Timer is used. Upon transmission of the Security Request command or reception of the Security Request command, the Security Manager Timer shall be reset and restarted. Upon transmission of the Pairing Request command or reception of the Pairing Request command, the Security Manager Timer shall be reset and started.
The Security Manager Timer shall be reset when an L2CAP SMP command is queued for transmission.
When a Pairing process completes, the Security Manager Timer shall be stopped.
If the Security Manager Timer reaches 30 seconds, the procedure shall be considered to have failed, and the local higher layer shall be notified. No further SMP commands shall be sent over the L2CAP Security Manager Channel. A new Pairing process shall only be performed when a new physical link has been established.
This is usually hardcoded in the stack/API, so maybe it is not something you have to set in your app.