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
  • FormerMember
    0 FormerMember

    Unfortunately, there is no way for the application to check if a device is currently advertising. If the advertising timeout is set to '0', there is no advertising timeout. It therefore has to be another reason why the device stop advertising.

    Does your device at some point gets connected to another device?

    How do you do error handling? If an error is caught by APP_ERROR_CHECK() and the "DEBUG" flag is set, the error handler will go into a infinite loop.

  • 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);  
    

    }

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);  
    

    }

Children
No Data
Related