=> ERROR 7 [NRF_ERROR_INVALID_PARAM] at E:\Nordic\nRF5_SDK_15.0.0_a53641a\examples\nrf51-ble-tutorial-service-master\nrf5-ble-tutorial-service\main.c:691
=> ERROR 7 [NRF_ERROR_INVALID_PARAM] at E:\Nordic\nRF5_SDK_15.0.0_a53641a\examples\nrf51-ble-tutorial-service-master\nrf5-ble-tutorial-service\main.c:691
I don't know what your main.c line 691 says, but I can guess. Is it:
err_code = ble_advertising_init(&m_advertising, &init); APP_ERROR_CHECK(err_code);
?
Either way, perhaps you can copy the entire function that includes your line 691? Is it advertising_init()?
this is my code and your guess is right,bro
/**@brief Function for initializing the Advertising functionality.
*/
static uint16_t ble_uuid_t m_adv_uuids[] =
{
{
BLE_UUID_OUR_SERVICE,
BLE_UUID_TYPE_VENDOR_BEGIN
}
};
static void advertising_init(void)
{
SEGGER_RTT_WriteString(0, "done.\n");
ret_code_t err_code;
ble_advertising_init_t init;
memset(&init, 0, sizeof(init));
init.advdata.name_type = BLE_ADVDATA_FULL_NAME;
init.advdata.flags = BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE;
// STEP 6: Declare and instantiate the scan response
//ble_advdata_t srdata;
// memset(&srdata, 0, sizeof(srdata));
init.srdata.uuids_complete.uuid_cnt = sizeof(m_adv_uuids) / sizeof(m_adv_uuids[0]);
init.srdata.uuids_complete.p_uuids = m_adv_uuids;
init.config.ble_adv_fast_enabled = true;
init.config.ble_adv_fast_interval = APP_ADV_INTERVAL;
init.config.ble_adv_fast_timeout = APP_ADV_DURATION;
init.evt_handler = on_adv_evt;
err_code = ble_advertising_init(&m_advertising, &init);
APP_ERROR_CHECK(err_code);
ble_advertising_conn_cfg_tag_set(&m_advertising, APP_BLE_CONN_CFG_TAG);
SEGGER_RTT_WriteString(0, "done1.\n");
}
Just to check, you are using this guide, right?
This snippet looks fine, so I believe the issue is somewhere else. What did you add before this issue occurred? Did you change the ADV_INTERVAL/DURATION? Is BLE_UUID_OUR_SERVICE correct?
Is on_adv_evt declared?
Please check out how the advertising is set up in the example: SDK15.0.0\examples\ble_peripheral\ble_app_uart.
Just to check, you are using this guide, right?
This snippet looks fine, so I believe the issue is somewhere else. What did you add before this issue occurred? Did you change the ADV_INTERVAL/DURATION? Is BLE_UUID_OUR_SERVICE correct?
Is on_adv_evt declared?
Please check out how the advertising is set up in the example: SDK15.0.0\examples\ble_peripheral\ble_app_uart.