This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to disable Bluetooth ?

Hello,

I'm looking to disable the Bluetooth in the ledButtonDemo,. In the led_write_handler, I've replaced the code by :

if(led_state == 0) { sd_ble_gap_disconnect(m_conn_handle, BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION); sd_ble_gap_adv_stop(); NRF_RADIO->TASKS_DISABLE=1; nrf_gpio_pin_clear(24); }

else { nrf_gpio_pin_set(24); }

But with the dongle, I'm still seeing the device "ledButtonDemo", and I'm able to connect it, and to change the settings.

Is there a mistake in my code ?

I used this topic to create my code : devzone.nordicsemi.com/.../

Thanks in advance !