I have seen that the recommended method for switching between connectable and non-connectable advertising is:
sd_ble_gap_adv_stop()
...change advertising structures as needed...
sd_ble_gap_adv_start()
My app is doing this, and it works. But using sd_ble_gap_adv_start() instead of ble_advertising_start() causes my app to no longer get events to on_adv_evt(). When I try to change to using ble_advertising_start() instead, I get crashes on restarting (works fine starting the first time).
So is there a way to switch between connectable and non-connectable advertising while still getting advertising events?