Advertising Failure After Multiple Pairing Requests and Cancels

Hello everyone,

I'm using the Bluetooth Peripheral sample UART and have noticed an issue.

When I perform a lot of sequential pairing requests followed by cancels from my phone to my device, after around 3 or 4 requests/cancels, it stops advertising.

Is this normal behavior?

How can I handle it? Is there any function to get the current status of advertising? Otherwise, is it okay to call this function one more time in the disconnection callback?

This function is called only once in the main.

err = bt_le_adv_start(BT_LE_ADV_CONN, ad, ARRAY_SIZE(ad), sd, ARRAY_SIZE(sd));

but even with re-calling this function in Disconnected callback, it gives no error :( but the device is not showing in my phone

I would really appreciate your help in this matter!

Thanks in advance.

Iheb

Related