KW36 : Iphone re-pairing issue

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

KW36 : Iphone re-pairing issue

1,349 Views
skalyan2
Contributor IV

Hi,

Greetings for the day! 

I Face re-pairing issue in iPhone similar to the issue mentioned in this link  [Resolved] TI SDK 1.40.00.45 : Crash when re-pairing with a peer device that lost or removed its bon... 

My peripheral device : KW36, central device: iPhone X(iOS version: 12.4)

I try the following sequence : 

1) Flash KW36 with hid_device example.

2) Initiate a connection from iPhone X(iOS version:12.4) to KW36,

3) I use just works pairing( no display, no keyboard) and iPhone gets paired successfully

4) Bonding deleted from peripheral device(kw36) and not from central device(iPhone)

5) After this the central device(iphone) initiates a connection request, but does not send a pairing request to the peripheral device(kw36)

What I understood from this link [Resolved] TI SDK 1.40.00.45 : Crash when re-pairing with a peer device that lost or removed its bon...  is, we can send "insufficient authentication" to GATT read/write request by central device to peripheral device, so that central device will get discovery error(insufficient authentication) and iPhone will initiate pairing request after this. 

I want to implement this failure scenario in KW36, how I can do this ? 

Regards

Sai Kalyana Raman

0 Kudos
7 Replies

992 Views
estephania_mart
NXP TechSupport
NXP TechSupport

Hello,

Is there a specific reason why you are removing the bonding information from your device ? Also, could you please help me with more details about your security settings ? 

Regards ,
Estephania

0 Kudos

992 Views
skalyan2
Contributor IV

Hi Estephania,

According to my requirement, we can pair and bond maximum of one device.

Assume if kw36 has already one device bonded to kw36 and user needs to pair and bond some other device to kw36, for this we have a button in our prototype which if user presses, we will delete the bonding information of the previously bonded phone from KW36 and allow him to pair or bond new device.

Security settings :

securityModeAndLevel :mode1 level 2 and just works pairing 

localIoCapabilities : gIoNone_c

leSecureConnectionSupported = FALSE,
useKeypressNotifications = FALSE

Please get back if you need anything else.

Many thanks,

Sai Kalyana Raman

0 Kudos

992 Views
xing_chang
NXP Employee
NXP Employee

Hello,

After receiving the PIN or key missing, the iPhone will actively disconnect and cannot execute to GATT Read/Write, so replying to ATT_ERR_INSUFFICIENT_AUTHOR is also unrealizable.

pastedImage_1.png

0 Kudos

992 Views
skalyan2
Contributor IV

Hi XingChang‌,

As you say ,i understand the "ATT_ERR_INSUFFICIENT_AUTHOR" is unrealizable, then what is the procedure in slave(KW36 peripheral) that can be done for making master(central device - iphone) to initiate a pairing request after slave has sent a security request in this half-paired scenario?

Also in your snapshot

Regards

Sai Kalyana Raman

0 Kudos

992 Views
xing_chang
NXP Employee
NXP Employee

Hi Sai,

When KW36 returns PIN or Key missing, the phone will initiate the re-pairing, but it is obvious that the iPhone has not done so.

Can you check if the iPhone receives a key missing message, if yes, you can actively delete the pairing message and repair it

0 Kudos

992 Views
skalyan2
Contributor IV

Hi XingChang‌,

I have checked, iphone does not receive any "key missing message" , what is happening in my case is :

Step 1: KW36 is connected to iphone.

Step 2: I delete the bonding(keys) in kw36

Step 3: The iphone gets disconnected after step2 and after 2 seconds, iphone again shows as "connected" in "iphone->Settings-> bluetooth" menu , iphone encrypts the link and the iphone shows as connected . Can you please check in iphone X (12.4 ios version) and provide any workaround which can make iphone disconnect from kw36 or is it possible to do some workaround in "ios version - nxp iot toolbox" ? if any workaround can be done, please provide me the workaround , i am struck with this issue to test half paired scenarios

can you provide me some analysis for my request asap ? 

Many thanks for your understanding.

Regards,

Sai Kalyana Raman

0 Kudos

992 Views
xing_chang
NXP Employee
NXP Employee

Hi Sai,

At step 2, do you delete the bonding information using Gap_RemoveBond() in the connection state?

If yes, please disconnect first, then delete the bonding information.

Gap_RemoveBond
/*! *********************************************************************************
* \brief Removes the bond with a device.
*
* \param[in] nvmIndex Index of the device in the NVM bonding area.
*
* \return gBleSuccess_c or error.
*
* \remarks This API requires that there are no active connections at call time.
* nvmIndex is an integer ranging from 0 to N-1, where N is the number of
* bonded devices and can be obtained by calling Gap_GetBondedDevicesCount(&N).
*
* \remarks This function executes synchronously.
*
********************************************************************************** */
bleResult_t Gap_RemoveBond
(
uint8_t nvmIndex
);
0 Kudos