This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Device Get shut down when after getting Insufficient Authorization

Hi, I am using the following security level for my nRF5188 device.


BLE_GAP_CONN_SEC_MODE_SET_ENC_WITH_MITM(&bas_init.battery_level_char_attr_md.cccd_write_perm);
BLE_GAP_CONN_SEC_MODE_SET_OPEN(&bas_init.battery_level_char_attr_md.read_perm);
BLE_GAP_CONN_SEC_MODE_SET_ENC_WITH_MITM(&bas_init.battery_level_char_attr_md.write_perm);

At first the device is visible in my Android Master Control Panel and can connect to the device. But after few seconds it shows "Insufficient Authorization" and the device get shut down when i disconnect. Even after rebooting the device the device is invisible in other Phones. I have to erase Softdevice and My firmware and re-programme to start the device again. Why this is happening?

Please let me know if some more information is needed.

Parents
  • Hi Khandker,

    I suspect there was a bug in the way your firmware handle bonding and pairing. When the phone receives "Insufficient Authorization" error, it will perform pairing process to encrypt the link. And when you restart the device, it's possible that the device automatically connect to the previous phone or start directed advertising and that why it's not visible to other devices (some app won't show you the device advertise with directed advertising to another phone).

    You said "device get shut down when i disconnect", does this mean the device remains in connection with the phone until you press disconnect ?

    Have you made sure you don't put the device into deep sleep mode when BLE_GAP_EVT_DISCONNECTED event occurs ?

    If possible please send us your code.

Reply
  • Hi Khandker,

    I suspect there was a bug in the way your firmware handle bonding and pairing. When the phone receives "Insufficient Authorization" error, it will perform pairing process to encrypt the link. And when you restart the device, it's possible that the device automatically connect to the previous phone or start directed advertising and that why it's not visible to other devices (some app won't show you the device advertise with directed advertising to another phone).

    You said "device get shut down when i disconnect", does this mean the device remains in connection with the phone until you press disconnect ?

    Have you made sure you don't put the device into deep sleep mode when BLE_GAP_EVT_DISCONNECTED event occurs ?

    If possible please send us your code.

Children
No Data
Related