Hello,
I am trying to Implement Number Comparison bluetooth method with MITM protection, as per the Numeric comparison method when pairing is initiated 6digit key should appear at the both end(mobile and device end) which is generated by RNG, when I am trying to connect I am not getting the 6 digit key and also pairing is not happening below are the changes which I had made in the wireless_uart code(BM) for pairing parameter
I have enabled the bonding and pairing info like below
Note :- I am using KW38 Controller and wireless uart BM example code
Kindly let me know what other changes are required which I have missed here, and also is it possible to get the bonded paired information. Kindly revert back the earliest
Thanks
Hi,
On my side, gIoDisplayYesNo_C and gIoKeyboardDisplay_C both work fine, maybe it's the phone causes the different behavior.
Hi @Javad_Baig ,
please change the IO capabilities to displayYesNo,
gPairingParameters.localIoCapabilities = gIoDisplayYesNo_c;
You can use Gap_LoadKeys() to read bonded info.
Hello @xing_chang,
Thank you for your response, I changed the localIoCapabilites parameter to
gPairingParameters.localIoCapabilities = gIoDisplayYesNo_c;
again when I try to connect with Device it is showing "pair" option without displaying 6digit key generated from RNG, and also I tried looking for the variable which stores the key generated by RNG in the device end I couldn't able to find it.
Please again look in to the configuration which I shared in the previous post and let me know if any further changes are required for Numeric Comparison Method
I have attached a screenshot for the same, her I have changed the device name to 012345, when I try to connect with this device directly it is asking for pairing option without displaying 6-digit number
Hello @xing_chang,
Thanks for the reply, for me after click on "Pair", status is showing as connected, I am not getting that 6digits
Hello, @xing_chang
I compared your file and did the same changes as yours, still it is the same. When I click on "Pair" it will get connected automatically without displaying 6 digits.
I am using Samsung A30s Phone.
and also can you tell me which variable holds the 6digit key in the software end so that I can debug and check.
Thanks
Hi @Javad_Baig ,
In the Core spec 5.0, there is a table as follows, the phone as initiator with KeyboardDisplay, and KW38 as responder with DisplayYesNo or KeyboardDisplay, it should be Passkey Entry or Numeric Comparison, I don't why it is Just Works on your side. Could you capture some air log?
Hi, @xing_chang
Can you please tell me how to capture the airlog, since I am not aware of it and also can you please tell me the variable which holds 6 digit key so that I can put that in watch window
Thanks
You need a sniffer to capture the log, like this Ellisys - Bluetooth Tracker - Bluetooth Low Energy and WiFI Protocol Analyzer
In the event below, you can print the Numeric value.
case gConnEvtLeScDisplayNumericValue_c:
{
(void)Serial_Print(gAppSerMgrIf, "gConnEvtLeScDisplayNumericValue_c: ", gAllowToBlock_d);
(void)Serial_PrintDec(gAppSerMgrIf, pConnectionEvent->eventData.numericValueForDisplay);
(void)Serial_Print(gAppSerMgrIf, "\n\r", gAllowToBlock_d);
}
break;
Hello, @xing_chang
I dont have a sniffer tool to capture the log. Is there any alternative way to resolve this issue?
if gIoKeyboardDisplay_C is ok, you can use this configuration.
Hello, @xing_chang
Thanks alot now I am getting the passkey in the Application.
since the confirmation of the value also need to be verify from the Software(not in Application) end to make the pairing happen. Is there any way to automatically simulate this confirmation in the software end ? or how to confirm it in the MCUXpresso(Software) side?
Sorry, I don't understand, what is Software? what is Application?
Application - IoT ToolBox
Software - MCUXpresso (Like we need to verify the key from the Device(Frdm-kw38) end also right) , I belive we do this verification in the IDE itself
Hi @Javad_Baig ,
You can add some code here to display numbers and wait for keyboard to confirm.
case gConnEvtLeScDisplayNumericValue_c:
{
(void) pConnectionEvent->eventData.numericValueForDisplay;
/* Display on a screen for user confirmation then validate/invalidate based on value. */
(void)Gap_LeScValidateNumericValue(peerDeviceId, TRUE);
}
break;
Hello,@xing_chang
Okay will do the changes and check, Thanks for the your support. Advance Happy New Year 2022