Hello, I've been tinkering around with the BLE Advertising tutorial on my nRF52840 Dongle (using SoftDevice 140) and I have a question:
How do I configure the dongle's user button to change the advertising data on press?
Currently, I've modified prepended some code to one of the functions in `main.c`
static void bsp_event_handler(bsp_event_t event) { ret_code_t err_code; ble_gap_adv_data_t my_data; uint8_t data[] = "New!"; // New data to advertise my_data.adv_data.p_data = data; my_data.adv_data.len = sizeof(data); sd_ble_gap_adv_set_configure(&(m_advertising.adv_handle), &my_data, NULL); // Update existing advertising data // The rest of the original function is still here }
I scan for the Dongle with nRF Connect on my phone--it shows up with the original advertising data and does not update to "New!" even when I press the button.
I'm new to the Nordic nRF family; is there something I'm missing? Help would be greatly appreciated.
Thank you!