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

multi link central uart with multiple peripheral

hi...

I have modified the multi link central to multi link central uart , i can able to connect with 8 peripherals . One central getting connected with multiple peripheral, data are getting transfer between them. Now i want to differentiate the multiple peripherals to central , by using different uuid or name , product address . so that i can able to send the data to particular peripheral device from central .

how can i input the different uuid or name for multiple peripheral ?  i need some sample 

for example i am having central1 , peripherals (A,B,C,D) suppose A want to send message to D how can it send ? is it possible to transfer the data between the peripheral

suggest me a good one 

Thanks in advance 

  • Hi 

    Every link on the central side will be identified by a unique connection handle, which is a 16-bit value that starts at 0 and is incremented for each additional link. 

    If you want you can map the connection handle to something else, such as the BLE address or a device name, but whenever you want to send something to a specific device you need to use the connection handle of that device to address it. 

    It is important to know that each device could get a different connection handle each time it connects to the central, so the central will have to update the connection handle/BLE address map continuously as devices are disconnected and connected. 

    It is also important to know that the connection handle for a link is not necessarily the same on the peripheral and central side (a peripheral with only one link to a master will only use connection handle 0). 

    Best regards
    Torbjørn

  • Thank your explanation , how to send the data via uart using connection handle of specific device 

    Best regards ,

    pavi

  • can we able  send the message to  particular device (peripheral to peripheral )by manually , similar like this central has been connected 4 peripherals ( A--B---C--D)by using name of the peripheral .In this case peripheral A wants to send the message to the peripheral D, similarly peripheral D wants to send the message to peripheral B , C . so communication has to be done randomly .,whoever in connection in central  from end to end , (A B C D ) peripherals  have to send the data to each other .is it possible ? 

    can we resolve by using connection handle . 

    A--- HAS 0X01 connection handle 

    B----HAS 0X02 connection handle 

    C----HAS 0X03 connection handle so on

    example if A want to send the data to C 

    can i able to enter manually like ------ A (0X01) , hello to B(0x02) 

    or else is there any other way to communicate the peripheral to peripheral

    Best regards

    pavi

  • connection handle are created by the softdevice right , so how to put the connection handle in an array ,by that way i can able  to get the particular peripheral to send the data , is it possible ?

    Best regards,

    pavi

  • Hi 

    When a device establishes a connection you will receive the BLE_GAP_EVT_CONNECTED event on the peripheral and central side. 

    Inside this event you can read the connection handle from the p_ble_evt->evt.gap_evt->conn_handle variable. 

    Then you can update your local variable associating connection handle with the device from there. 

    Best regards
    Torbjørn

Related