when i use the ble_adverting_start(BLE_ADV_MODE_FAST); and then use the ble _advering_start(BLE_ADV_MODE_IDLE); then ble_adverting_start(BLE_ADV_MODE_FAST); the return err_code is 8; then APP_ERROR_CHECK(err_code) it can system abnormal。
when i use the ble_adverting_start(BLE_ADV_MODE_FAST); and then use the ble _advering_start(BLE_ADV_MODE_IDLE); then ble_adverting_start(BLE_ADV_MODE_FAST); the return err_code is 8; then APP_ERROR_CHECK(err_code) it can system abnormal。
Error 8 is defined in nrf_error.h as:
#define NRF_ERROR_INVALID_STATE (NRF_ERROR_BASE_NUM + 8) ///< Invalid state, operation disallowed in this state
If you look at the declaration of the function ble_advertising_start() in ble_advertising.h you will see that it will return this error "if the module is not initialized". So then the question is: have you initialized the ble_advertising module with ble_advertising_init()? If so, can you try to step through the advertising functions with your debugger and see exactly where the error comes from?
Error 8 is defined in nrf_error.h as:
#define NRF_ERROR_INVALID_STATE (NRF_ERROR_BASE_NUM + 8) ///< Invalid state, operation disallowed in this state
If you look at the declaration of the function ble_advertising_start() in ble_advertising.h you will see that it will return this error "if the module is not initialized". So then the question is: have you initialized the ble_advertising module with ble_advertising_init()? If so, can you try to step through the advertising functions with your debugger and see exactly where the error comes from?