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 

Parents
  • 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

  • Hi, Torbjorn 

    actually i am trying to do a task ,

    1.peripherals want to talk to each other (like chating) ,using termite . 

    2. peripheral can't send the data to other peripheral , in case of that i want to use the central as intermediate in between the peripherals . 

    3. here  many peripherals are present , if one want to send the data to particular peripheral  device .

    i have some suggestion 

    can i send the data using mac address or connection handle ?

    EXAMPLE  if peripheral A wants to send the data to peripheral C , then peripheral A pass the data to central using mac address or connection handle and it should tell to central to convey this data to peripheral C and peripheral C will receive and so on .can we do this ? these things to be achieved without changing the code often . 

    once the peripherals got connected to central , whoever in connection they should communicate with all of peripherals(using mac address or connection handle )  in termite .

    Thanks in advance

  • Hi

    Yes, this is possible. 

    On the central side you have to identify the different peripherals by the different items in the m_lbs_c array, where the connection handle of the device corresponds to the index in the array (as I explained in my previous reply). 

    If you want to use the BLE address to identify the device on the terminal side this is also possible, but then the central will have to do the translation between BLE address and connection handle when receiving messages. 

    In other words you will need to store a map in memory that maps between BLE address and connection handle. 

    Best regards
    Torbjørn

  • Thankyou Torbjorn , but how to do that , how the messages will passed from one to another .

  • providing sample code will be better for understanding . where i should declare and how the data will transferred between them . where i should enter the data

  • I can try to provide a sample showing how to send a message from one link to the other, but it will have to be a side project that I work on when I have some free time. 

    It is hard to say when I will have time to provide it. 

Reply Children
Related