Closed UVohra closed 1 year ago
Hi, Can you elaborate more on this. We always try to have queries specific to FreeRTOS, so it might be more helpful if you post this queries in other forums like EmbedTLS.
From what I can tell, the general flow is something like this:
For some code pointers:
For reference, I found this StackOverflow post helpful. There is also example code provided with it. The BLE 4.2 corespec volume 3, part H, chapter 2.3.5 may also be helpful.
@kstribrnAmzn Thank you for your suggestions here.
As suggested I’ve updated Broadcast Receiver with ACTION_PAIRING_REQUEST
and added logic there to pass the custom PIN using setPin
method.
Before that even registered the ACTION_PAIRING_REQUEST
receiver. But I’ve observed that registerBondStateCallback
method never gets triggered in my case and as a result, I’m not able to setPin
.
Peripheral already broadcasting intent to Pair with PIN and I’m getting a default OS popup to enter the PIN that I don’t want instead I want to pass a custom PIN and even don’t want the user to see that default OS popup
Maybe it will require some additional changes. Kindly let me know if that's the case and suggest how can I manage to setPin using this SDK without showing user a default popup
Thanks for really diving into this @mukesh-simform! I wonder if entering the pin manually is really needed. This stack overflow post seems to suggest that the dialog is in error and goes away once the setPin
call is made. The user found abortBroadcast();
was a way to remove this dialog. That being said this post is 3 years old so I'm not sure if this was some sort of bug which was patched out.
Overall - I'm not sure the issue here is due to our SDK. There are a number of questions around this various topic posted online and all answers suggest this dialog is a system dialog and cannot be hidden. I would recommend either...
@mukesh-simform can you please take a look at the above comment from @kstribrnAmzn and verify whether that is the case?
Thanks, Aniruddha
@AniruddhaKanhere @kstribrnAmzn I've managed this with some additional changes in a local copy of SDK and It's working fine on Android
Thank you for replying to us @mukesh-simform.
I shall close this issue now.
I am trying to connect to a Bluetooth device which is restricted with Pin Authentication but cannot see an option to pass that PIN via the Android SDK.
System info Android version: 13
To Reproduce Frequency: No Support Steps to reproduce the behavior: Connect with Bluetooth device restricted with pin