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

differentiate two devices with same service

My sensor app is based on nRF UART service and my current case in one sensor (peripheral) one gateway (central).

In a situation where there are two pairs of sensors (S1, S2) and gateways (G1 G2). How can I make them only connect to one particular nodes (S1 ~ G1, S2 ~ G2) such that one running pair would not mess up the other?

Parents
  • Hi,

    In the SDK central examples we generally use 3 different methods to differentiate between peripherals, in order to determine what peripherals to connect to.

    • Advertising name: Only connect to peripherals with a given name.
    • BLE address: Only connect to a peripheral that have the correct Bluetooth address.
    • UUID: Only connect to peripherals that have the correct service UUID.

    Assuming that your sensors uses the same UUID, you can either differentiate between them using the BLE address or the advertising name.

    All these methods are shown in the ble_app_hrs_c example. The example can be found in the folder:

    <SDK_InstallFolder>\examples\ble_central\ble_app_hrs_c
    
Reply
  • Hi,

    In the SDK central examples we generally use 3 different methods to differentiate between peripherals, in order to determine what peripherals to connect to.

    • Advertising name: Only connect to peripherals with a given name.
    • BLE address: Only connect to a peripheral that have the correct Bluetooth address.
    • UUID: Only connect to peripherals that have the correct service UUID.

    Assuming that your sensors uses the same UUID, you can either differentiate between them using the BLE address or the advertising name.

    All these methods are shown in the ble_app_hrs_c example. The example can be found in the folder:

    <SDK_InstallFolder>\examples\ble_central\ble_app_hrs_c
    
Children
No Data
Related