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

Is there a way to check if the beacon transmission is continuing?

When running ble_peripheral\ble_app_uart example..... Of course I am a little bit

corrected.....

Beacons occasionally stop.

Despite the following settings: #define APP_ADV_TIMEOUT_IN_SECONDS 0x0000 // 0

If I could check the beacon transmission status, it would be possible to reset it when the

beacon stops.

The beacon transmission stops and I can not guarantee continuous ble communication

connection.

Is there any good way?

Parents
  • thanks answers about my question..... my error handler code is below.....

    //에러체크코드 점검 void APP_ERROR_CHECK2( uint32_t err_code2) {

    if ((err_code2 != NRF_SUCCESS) && // (err_code2 != NRF_ERROR_INVALID_STATE) && // 8 (err_code2 != 12292) && // 0x3004 BLE_ERROR_NO_TX_BUFFERS (err_code2 != 13313) && //0x3401 13313 // BLE_ERROR_GATTS_SYS_ATTR_MISSING (err_code2 != NRF_ERROR_NOT_FOUND) && // 5 NRF_ERROR_NOT_FOUND 가비지값읽을시 발생 (err_code2 != 0 )) { printf( "%d, %X ,%c \n",err_code2,err_code2 ,err_code2); printf( "Error Check reset! \n");

    	   // 예상외 에러발생시 리셋 코드 추가====================================
    	   NVIC_SystemReset();  // reset	 
    	 
    	 
     // APP_ERROR_CHECK(err_code2);	 
    	 
    	
     }
    

    //=============================================================

    // Build advertising data struct to pass into @ref ble_advertising_init. memset(&advdata, 0, sizeof(advdata)); advdata.name_type = BLE_ADVDATA_FULL_NAME; advdata.include_appearance = false; // advdata.flags = BLE_GAP_ADV_FLAGS_LE_ONLY_LIMITED_DISC_MODE; advdata.flags = BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE; // sleep모드 끄기

    memset(&scanrsp, 0, sizeof(scanrsp));
    scanrsp.uuids_complete.uuid_cnt = sizeof(m_adv_uuids) / sizeof(m_adv_uuids[0]);
    scanrsp.uuids_complete.p_uuids  = m_adv_uuids;
    
    ble_adv_modes_config_t options = {0};
    options.ble_adv_fast_enabled  = BLE_ADV_FAST_ENABLED;
    options.ble_adv_fast_interval = APP_ADV_INTERVAL;
    options.ble_adv_fast_timeout  = APP_ADV_TIMEOUT_IN_SECONDS;
    
    err_code = ble_advertising_init(&advdata, &scanrsp, &options, on_adv_evt, NULL);
    APP_ERROR_CHECK2(err_code);
    

    =========================================================

    but form time to time.... occasionally....... sometimes...... just stop beacon advertisement.............

Reply
  • thanks answers about my question..... my error handler code is below.....

    //에러체크코드 점검 void APP_ERROR_CHECK2( uint32_t err_code2) {

    if ((err_code2 != NRF_SUCCESS) && // (err_code2 != NRF_ERROR_INVALID_STATE) && // 8 (err_code2 != 12292) && // 0x3004 BLE_ERROR_NO_TX_BUFFERS (err_code2 != 13313) && //0x3401 13313 // BLE_ERROR_GATTS_SYS_ATTR_MISSING (err_code2 != NRF_ERROR_NOT_FOUND) && // 5 NRF_ERROR_NOT_FOUND 가비지값읽을시 발생 (err_code2 != 0 )) { printf( "%d, %X ,%c \n",err_code2,err_code2 ,err_code2); printf( "Error Check reset! \n");

    	   // 예상외 에러발생시 리셋 코드 추가====================================
    	   NVIC_SystemReset();  // reset	 
    	 
    	 
     // APP_ERROR_CHECK(err_code2);	 
    	 
    	
     }
    

    //=============================================================

    // Build advertising data struct to pass into @ref ble_advertising_init. memset(&advdata, 0, sizeof(advdata)); advdata.name_type = BLE_ADVDATA_FULL_NAME; advdata.include_appearance = false; // advdata.flags = BLE_GAP_ADV_FLAGS_LE_ONLY_LIMITED_DISC_MODE; advdata.flags = BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE; // sleep모드 끄기

    memset(&scanrsp, 0, sizeof(scanrsp));
    scanrsp.uuids_complete.uuid_cnt = sizeof(m_adv_uuids) / sizeof(m_adv_uuids[0]);
    scanrsp.uuids_complete.p_uuids  = m_adv_uuids;
    
    ble_adv_modes_config_t options = {0};
    options.ble_adv_fast_enabled  = BLE_ADV_FAST_ENABLED;
    options.ble_adv_fast_interval = APP_ADV_INTERVAL;
    options.ble_adv_fast_timeout  = APP_ADV_TIMEOUT_IN_SECONDS;
    
    err_code = ble_advertising_init(&advdata, &scanrsp, &options, on_adv_evt, NULL);
    APP_ERROR_CHECK2(err_code);
    

    =========================================================

    but form time to time.... occasionally....... sometimes...... just stop beacon advertisement.............

Children
No Data
Related