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