Can not enable BLE Characteristic indication and notification at same time

Hello DevZone.

Is it possible to enable Notify and Indicate method at the same time in NCS?

From my side, this doesn't work on my project, neither on Nordic sample (peripheral_hr_coded).

You can try the `peripheral_hr_coded` example, and modify as below to disable Coded PHY. So that your smart phone can scan it:

main.c:

	struct bt_le_adv_param param = 
				BT_LE_ADV_PARAM_INIT(BT_LE_ADV_OPT_CONNECTABLE,
		// BT_LE_ADV_PARAM_INIT(BT_LE_ADV_OPT_CONNECTABLE |
		// 		     BT_LE_ADV_OPT_EXT_ADV |
		// 		     BT_LE_ADV_OPT_CODED,
				     BT_GAP_ADV_FAST_INT_MIN_2,
				     BT_GAP_ADV_FAST_INT_MAX_2,
				     NULL);

 prj.conf:

# disable this 2 lines
# CONFIG_BT_CTLR_PHY_CODED=y
# CONFIG_BT_CTLR_ADV_EXT=y

On iOS nRF Connect SDK, I can enable Notify and Indicate buttons:

But the actual value of CCCD is still Notify(0x01).

Even if I set the CCCD value from the button on the bottom. No matter what I set, 0x02(Indicate) or 0x03(Both), it always becomes 0x01(Notify).

From the device log, it also shows that the indication is not enabled.

Is this a bug of NCS? Or does BLE Specification doesn't allow this situation?

Best regards,

Jayant

Parents
  • From the Bluetooth 6.0 spec:

    "If both the Notification and Indication bits are set, then the server shall use the notification procedure (see Section 4.10) when an acknowledgment is not required by a higher-layer specification or shall use the indication procedure (see Section 4.11) when
    an acknowledgment is required. The server should not use both procedures to send the same characteristic value.
    The server may reject a request to set both the Notification and Indication bits for the same characteristic"

  • Thank you very much. By the way, is this a bug on iOS nRF Connect APP? Because when INDICATION and NOTIFICATION are both permitted, the iOS nRF Connect can only enable Notification.
    We tried Light Blue on iOS, it behaves same. But at least the iOS nRF Connect APP should not light the 2 buttons at the same time:

Reply Children
No Data
Related