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

Problem connection to centrals to one peripheral

Hello,

I need help. I cannot see my earlier ongoing ticket!? I have been working With it for the last couple of Days and today i was asked to share my Project but now the whole ticket is gone:( What to do, do i need to do it all again or can you guys pick it up somewere?

/Kalle

Parents
  • If you dont have any backup. 

    I have tried to change parameters in example codes but i Always get the error code 0x3001 if i change the number of Connection (doenst matter if i increase peripherals or centrals). If i change it from 1 to let us say 2 or more, i get 0x3001.
    The function that return this error message is:
    ret = sd_ble_gap_adv_start(&adv_params, m_conn_cfg_tag);

    The parameter that i change is:

    #define BLE_GAP_ROLE_COUNT_PERIPH_DEFAULT      (1)

    In my last ticket we get so far that i was asked to send/share my Project. I asked how, if the responsible person had an >FTP or email for sharing this Project. After that the ticket dissapeared.

  • Hi,

    Do you enable ble in the application before starting advertising? Error 0x3001 indicates that ble is not enabled (BLE_ERROR_NOT_ENABLED). You enable it by calling these functions below:

     

    static void ble_stack_init(void)
    {
        ret_code_t err_code;
    
        err_code = nrf_sdh_enable_request();
        APP_ERROR_CHECK(err_code);
    
        // Configure the BLE stack using the default settings.
        // Fetch the start address of the application RAM.
        uint32_t ram_start = 0;
        err_code = nrf_sdh_ble_default_cfg_set(APP_BLE_CONN_CFG_TAG, &ram_start);
        APP_ERROR_CHECK(err_code);
    
        // Enable BLE stack.
        err_code = nrf_sdh_ble_enable(&ram_start);
        APP_ERROR_CHECK(err_code);
    
        // Register a handler for BLE events.
        NRF_SDH_BLE_OBSERVER(m_ble_observer, APP_BLE_OBSERVER_PRIO, ble_evt_handler, NULL);
    }

Reply
  • Hi,

    Do you enable ble in the application before starting advertising? Error 0x3001 indicates that ble is not enabled (BLE_ERROR_NOT_ENABLED). You enable it by calling these functions below:

     

    static void ble_stack_init(void)
    {
        ret_code_t err_code;
    
        err_code = nrf_sdh_enable_request();
        APP_ERROR_CHECK(err_code);
    
        // Configure the BLE stack using the default settings.
        // Fetch the start address of the application RAM.
        uint32_t ram_start = 0;
        err_code = nrf_sdh_ble_default_cfg_set(APP_BLE_CONN_CFG_TAG, &ram_start);
        APP_ERROR_CHECK(err_code);
    
        // Enable BLE stack.
        err_code = nrf_sdh_ble_enable(&ram_start);
        APP_ERROR_CHECK(err_code);
    
        // Register a handler for BLE events.
        NRF_SDH_BLE_OBSERVER(m_ble_observer, APP_BLE_OBSERVER_PRIO, ble_evt_handler, NULL);
    }

Children
Related