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

Differentiating BLE connection types

Hi, I am trying to implement an example that support multiple peripherals (HRS & UART). When I get a connection (from either) I get the BLE_GAP_EVT_CONNECTED. How can I differentiate who I am getting connected to ? (HRS or UART). I can see the address but address is not a valid differentiator in my scenario. Thanks

Parents
  • Hi

    The HRS and UART are services that can be implemented to be in the same connection. Do you really want to make your peripheral device connect to a central with only one of the services enabled at a time, or do you want the HRS and UART to be enabled in the same connection? 

    Please take a look at our BLE service tutorial to see how to implement services in your application, as I assume that you want to use the UART to print the values from HRS to a GUI (graphical user interface) to be able to see the HRS values.

    Best regards,

    Simon

Reply
  • Hi

    The HRS and UART are services that can be implemented to be in the same connection. Do you really want to make your peripheral device connect to a central with only one of the services enabled at a time, or do you want the HRS and UART to be enabled in the same connection? 

    Please take a look at our BLE service tutorial to see how to implement services in your application, as I assume that you want to use the UART to print the values from HRS to a GUI (graphical user interface) to be able to see the HRS values.

    Best regards,

    Simon

Children
  • Thanks Simon.

    I will not be doing UART and HRS on the same connection. Machine A will make a connection to my peripheral using UART and send/receive data in both directions. Machine B will make a connection to my peripheral and receive HR measurements. So my app can't tell what connections to send HR measurements and which is used for UART communications.

Related