I have advertising in s130 set to BLE_GAP_ADV_TIMEOUT_GENERAL_UNLIMITED. The idea is to advertise until a connection event is received. In reality the user will pull the finger out of the pulse ox turning it off if no connection takes place.
In any case, when a connection takes place and the measurement is transferred, I disconnect and write data to flash and that is it. However, the chip starts advertising again even though I did not ask it to. In fact I specifically call
sd_ble_gap_adv_stop(); // just to make sure
in both the connection event and in the disconnect event
Since that did not work I added
err_code = sd_ble_gap_adv_data_set(data_buffer, 0, scan_rsp_buffer, 0); // CAN'T have flags and name duplicated
APP_ERROR_CHECK(err_code);
to the connection event to clear the data so the peer would not respond to it if the chip was still stupid enough to start advertising again. That did not work. It still starts advertising and still sends the original advertisement.
How can I shut this thing up?
By the way what do you mean by an advertising type of BLE_GAP_ADV_TYPE_ADV_SCAN_IND
My interpretation of this is that the device will respond to scan requests and this is connectable, but your documentation states
"An application can start an advertising procedure for broadcasting purposes while a connection is active. After a BLE_GAP_EVT_CONNECTED event is received, this function may therefore be called to start a broadcast advertising procedure. The advertising procedure cannot however be connectable (it must be of type BLE_GAP_ADV_TYPE_ADV_SCAN_IND or BLE_GAP_ADV_TYPE_ADV_NONCONN_IND)."
There you state that a scannable advertisement is not connectable. What do you mean by 'scannable'?