I ran into an issue on the nRF Connect SDK trying to get a nRF52840 advertising using CODED PHY. I figure it's not fully implemented yet are there any updates on timeline for that? I also posted a bug in the Zephyr repo.
Describe the bug
BLE advertising failed to start on a nRF52840 when enabling BT_LE_ADV_OPT_EXT_ADV.
[00:00:00.002,960] <inf> ble_m: BLE Stack Ready!
[00:00:00.002,960] <inf> ble_peripheral: Bluetooth initialized
[00:00:00.002,960] <err> ble_peripheral: Advertising failed to start (err -22)
To Reproduce
- Choose any BLE example
- Use a compatible board like
nrf52840dk_nrf52840
- Add
CONFIG_BT_EXT_ADV=y
to yourprj.conf
- When initializing
struct bt_le_adv_param *adv_param =
add these two flagsBT_LE_ADV_OPT_CODED | BT_LE_ADV_OPT_EXT_ADV
Looks like this:
struct bt_le_adv_param *adv_param =
BT_LE_ADV_PARAM(BT_LE_ADV_OPT_CONNECTABLE |
BT_LE_ADV_OPT_ONE_TIME | BT_LE_ADV_OPT_CODED |
BT_LE_ADV_OPT_EXT_ADV,
BT_GAP_ADV_FAST_INT_MIN_2,
BT_GAP_ADV_FAST_INT_MAX_2,
NULL);
For instance, if I used the throughput example in the SDK and try to set BT_LE_ADV_OPT_CODED | BT_LE_ADV_OPT_EXT_ADV
as some of the parameters it always return -22. Looking further into it, it appears that CODED PHY advertising is (purposefully?) disabled in valid_adv_param.
Any insight is appreciated!