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

[EDIT] connect multiple peripheral with one central

Hello, 

Central uses nRF52840, and multiple peripherals use nRF52832.

The central is paired with each peripheral device , and each communicate.

To do this, I am developing both central and peripheral and would like to ask you a question.

1. I think UUID distinguishes each peripheral.

In the example of  BLE multi-link Example , peripheral becomes a blinky application and 'Nordic_blinky' pairs using namefilter.

We distinguish each peripheral by UUID, but if different peripheral functions do the same, does it not matter if UUID is the same?


I want to connect up to 6 peripherals in one central, and each device is separate by ID which I create.

Which example should I refer to to to implement this?

BR,

lyrics

Parents
  • Hi

    Yes, you're correct. The filter set in scan_init() is setting the scan_filter by name indeed. The name specified is set by the following line:

    static char const m_target_periph_name[] = "name here";

    As long as you give the devices the same name, the UUIDs can be different for example. You can also set the central to use different filters. Here are the following filters you can use:

    typedef enum
    {
        SCAN_NAME_FILTER,       /**< Filter for names. */
        SCAN_SHORT_NAME_FILTER, /**< Filter for short names. */
        SCAN_ADDR_FILTER,       /**< Filter for addresses. */
        SCAN_UUID_FILTER,       /**< Filter for UUIDs. */
        SCAN_APPEARANCE_FILTER, /**< Filter for appearances. */
    } nrf_ble_scan_filter_type_t;

    Best regards,

    Simon

Reply
  • Hi

    Yes, you're correct. The filter set in scan_init() is setting the scan_filter by name indeed. The name specified is set by the following line:

    static char const m_target_periph_name[] = "name here";

    As long as you give the devices the same name, the UUIDs can be different for example. You can also set the central to use different filters. Here are the following filters you can use:

    typedef enum
    {
        SCAN_NAME_FILTER,       /**< Filter for names. */
        SCAN_SHORT_NAME_FILTER, /**< Filter for short names. */
        SCAN_ADDR_FILTER,       /**< Filter for addresses. */
        SCAN_UUID_FILTER,       /**< Filter for UUIDs. */
        SCAN_APPEARANCE_FILTER, /**< Filter for appearances. */
    } nrf_ble_scan_filter_type_t;

    Best regards,

    Simon

Children
Related