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

multilink [ble_app_uart] - [ble_app_multilink_central]

nRF5_SDK_15.0.0_a53641a,ble_app_uart

When linking [ble_app_uart] and [ble_app_multilink_central], please tell me which settings and functions are missing in the sample program.
Also, when linking [ble_app_uart] and [ble_app_multilink_central], please tell me the method of [ble_app_uart] device discrimination.
Thanking you in advance.
  • An error occurred in the start setting of the application RAM.
    Error "0x04" is occurring at the following location Please tell me how to improve.

    static void ble_stack_init(void)
    {
    ret_code_t err_code;

    /*-< requesting to enable the SoftDevice. >-*/
    err_code = nrf_sdh_enable_request();
    APP_ERROR_CHECK(err_code);

    /*-< Configure the BLE stack using the default settings. >-*/
    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);

    /*-< Retrieving the address of the start of application's RAM. >-*/
    err_code = nrf_sdh_ble_app_ram_start_get(&ram_start);
    APP_ERROR_CHECK(err_code);

    /*-< Enable BLE stack.>-*/
    err_code = nrf_sdh_ble_enable(&ram_start);
    APP_ERROR_CHECK(err_code); <--------------------------(err_code = 0x04 error)

    /* Register a handler for BLE events. */
    NRF_SDH_BLE_OBSERVER(m_ble_observer, APP_BLE_OBSERVER_PRIO, ble_evt_handler, NULL);
    }

    That's all, thank you.
    [Add a question]
    Please tell me how to determine the setting value of IRAM 1.
     
  • Hi Yokokawa,

    It is hard for me to tell the right address. But if your logs are enabled, then your log will tell you the correct start of the IRAM address to set. Do you have some output logs?

  • I understood the RAM start address. Thank you very much
  • Question on communication settings of the multi-communication center
    1) Connection of the following program Do you operate the peripheral in "(2)"?
    -----------------------------------------------------------------------------------------
    static void on_adv_report(ble_gap_evt_adv_report_t const * p_adv_report)
    {
      ret_code_t err_code;

    //**
    Where to check **///
    (1) if (ble_advdata_name_find(p_adv_report->data.p_data,p_adv_report->data.len, m_target_periph_name)){
    (2) if (ble_advdata_uuid_find(p_adv_report->data.p_data,p_adv_report->data.len,&m_nus_uuid)){
    //** **//

      err_code = sd_ble_gap_connect(&p_adv_report->peer_addr, &m_scan_params, &m_connection_param, APP_BLE_CONN_CFG_TAG);
       if (err_code != NRF_SUCCESS){
        NRF_LOG_ERROR("Connection Request Failed, reason %d", err_code);
       }
      }else{
       err_code = sd_ble_gap_scan_start(NULL, &m_scan_buffer);
       APP_ERROR_CHECK(err_code);
      }
    }
    -----------------------------------------------------------------------------------------
    2) "Function for handling BLE events." Are the following (1) and (2) judgment unnecessary for multi-communication?

    -----------------------------------------------------------------------------------------
    static void ble_evt_handler(ble_evt_t const * p_ble_evt, void * p_context)
    {

    (1) case BLE_GAP_EVT_TIMEOUT:
      if (p_gap_evt->params.timeout.src == BLE_GAP_TIMEOUT_SRC_SCAN){
       NRF_LOG_INFO("Scan timed out.");
       scan_start();
      }

    (2) case BLE_GAP_EVT_SEC_PARAMS_REQUEST:
      err_code = sd_ble_gap_sec_params_reply(p_ble_evt->evt.gap_evt.conn_handle,

      BLE_GAP_SEC_STATUS_PAIRING_NOT_SUPP, NULL, NULL);
      APP_ERROR_CHECK(err_code);
      break;
    -----------------------------------------------------------------------------------------

    Thanking you in advance
Related