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

regarding BLE_APP_MULTILINK_CENTRAL_PCA10040_s132

so i am trying to understand the code , and i would be really grateful if u help me . 

what i am trying to do is send data from one DK to multiple DK. i am not able to figure out where to send the data or read it from.  

SDK1 uploaded with  multilink_central and SDK2 is uploaded with ble_app_blinky (it works fine )

thank you 

ps- we are using SEGGER IDE , SDK BMD 300.

Parents
  • Which sdk version are you currently using? v15.1? Have you taken a look at the documentation provided here?

  • thank you for your reply

    v15.0 and yes i have gone throught he infocentre, but its still a bit blurry.....

    i just need to know what exactly is the data being transmitted (the frame configuration) ...

  • Take a look at the button_event_handler() function in main.c of the multilink example. As soon as the user presses button 1, the led_status_send_to_all() function gets called:

    static ret_code_t led_status_send_to_all(uint8_t button_action)
    {
        ret_code_t err_code;
    
        for (uint32_t i = 0; i< NRF_SDH_BLE_CENTRAL_LINK_COUNT; i++)
        {
            err_code = ble_lbs_led_status_send(&m_lbs_c[i], button_action);
            if (err_code != NRF_SUCCESS &&
                err_code != BLE_ERROR_INVALID_CONN_HANDLE &&
                err_code != NRF_ERROR_INVALID_STATE)
            {
                return err_code;
            }
        }
            return NRF_SUCCESS;

    This function will iterate through all of the central links & call ble_lbs_led_status_send(), which will write the led status to the peripheral link. There are 8 button client instances that are created in the multilink central example (i.e. m_lbs_c). The sd_ble_gattc_write performs the write procedure inside the tx_buffer_process() at the end of ble_lbs_led_status_send(). See the ble_gattc.h header file for more information. Hope that helps!

Reply
  • Take a look at the button_event_handler() function in main.c of the multilink example. As soon as the user presses button 1, the led_status_send_to_all() function gets called:

    static ret_code_t led_status_send_to_all(uint8_t button_action)
    {
        ret_code_t err_code;
    
        for (uint32_t i = 0; i< NRF_SDH_BLE_CENTRAL_LINK_COUNT; i++)
        {
            err_code = ble_lbs_led_status_send(&m_lbs_c[i], button_action);
            if (err_code != NRF_SUCCESS &&
                err_code != BLE_ERROR_INVALID_CONN_HANDLE &&
                err_code != NRF_ERROR_INVALID_STATE)
            {
                return err_code;
            }
        }
            return NRF_SUCCESS;

    This function will iterate through all of the central links & call ble_lbs_led_status_send(), which will write the led status to the peripheral link. There are 8 button client instances that are created in the multilink central example (i.e. m_lbs_c). The sd_ble_gattc_write performs the write procedure inside the tx_buffer_process() at the end of ble_lbs_led_status_send(). See the ble_gattc.h header file for more information. Hope that helps!

Children
Related