This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Error when trying to enable extended advertising on code based on NUS example

Hi,

I'm working on an nRF5340 project using nRF Connect SDK v1.7.0 with VS Code. I started my project with the NUS example.

I've been able to customize the standard/legacy advertising packets as required by my customer with no problem using bt_le_adv_start(), but they also want me to be able to use extended advertising in certain circumstances.

In order to do that I see that I have to not only switch to calling bt_le_ext_adv_start, but also create an advertising set using bt_le_ext_adv_create. I found an example that does that for reference (iso_broadcast), but when I call bt_le_ext_adv_create I get a -5 return code (-EIO).

The full sequence of calls is bt_le_ext_adv_create calls le_ext_adv_param_set, which calls bt_hci_cmd_send_sync(BT_HCI_OP_LE_SET_EXT_ADV_PARAM, buf, &rsp);

The send_sync function gets a 1  from this call: status = cmd(buf)->status;

That causes the function to send the -5 back up the chain.

What am I doing wrong?

Thanks,

Glen

Parents
  • can you show some code snippets on the details of arguments to bt_le_ext_adv_create I can try to replicate that on my end. That error looks like a missing feature but cannot confirm it before I can see it.

  • I finally got somewhere with this - Instead of always using "Debug" I tried "Erase and Flash" from the actions menu and now the example works (both after Erase and Flash and now that I just debug it. Maybe I had some old stuff in the network core or somewhere that was cleaned out by that action?

    Glad to have it going!

Reply
  • I finally got somewhere with this - Instead of always using "Debug" I tried "Erase and Flash" from the actions menu and now the example works (both after Erase and Flash and now that I just debug it. Maybe I had some old stuff in the network core or somewhere that was cleaned out by that action?

    Glad to have it going!

Children
No Data
Related