static int set_advertise_disable(void) { #if 0 struct net_buf *buf; int err; #endif if (!atomic_test_bit(bt_dev.flags, BT_DEV_ADVERTISING)) { return 0; } #if 0 buf = bt_hci_cmd_create(BT_HCI_OP_LE_SET_ADV_ENABLE, 1); if (!buf) { return -ENOBUFS; } net_buf_add_u8(buf, BT_HCI_LE_ADV_DISABLE); err = bt_hci_cmd_send_sync(BT_HCI_OP_LE_SET_ADV_ENABLE, buf, NULL); if (err) { return err; } #endif nble_gap_stop_adv_req(NULL); atomic_clear_bit(bt_dev.flags, BT_DEV_ADVERTISING); return 0; }
int bt_le_adv_stop(void) { BT_DBG(""); nble_gap_stop_adv_req(NULL); return 0; }