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

How to broadcasting to all peripherals in the S120 multiplink example

Hi, I am modify the S120 multi-link UART example code (code is available here), and just noticed a problem that the central is only able to send the UART data to the last connected peripheral. How can I make the central to broadcast the UART data to all the connected peripherals? Thanks a lot for your help, jack

Parents
  • FormerMember
    0 FormerMember

    From what I can see, ble_app_uart_c is not implemented to work properly with more than one peripheral device. In order to make it work with more than one peripheral, you will have to modify the example so that it can keep track of more than one peripheral device; the example ble_app_multilink_central shows how to do that. m_ble_nus_c in ble_app_uart, corresponds to m_ble_lbs_c in ble_app_multilink_central.

  • FormerMember
    0 FormerMember in reply to FormerMember

    As you can see in ble_app_multilink_central, m_ble_lbs_c is an array containing handles for all of the connected devices. And then, when you want to transmit data, you have to select the correct handle for the transmission, or choose to loop through all of the devices.

Reply Children
No Data
Related