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

The nRF52 use the same Mac Address execute ADV mode is interference on some mobile

Hi, 

My product continues adv mode after connected with mobile until the amount of connection is full. By the way, there are 4 connect handle in my product.

My client use Samsung Note 5 bonding to my product (nRF52), and then this mobile continues to connect the all connect handle of nRF52 result in the other mobile can't connect with the nRF52.

I figure out the Samsung Note5 will continue to connect with the same mac address of nRF52 after the mobile scan the same mac address of the bond list. No matter the mobile already connect with nRF52.

How could I fix this condition? Because this problem leads to the other mobile can't connect with my product while Samsung Note 5 connects with my product.

Parents
  • Hi, 

    I'm not exactly sure I understand the question.

    • Is the Android system initiating multiple connections to the bonded nRF device? Or is he using an app to scan? 
    • How does Samsung Note 5 connect to the nRF52? Did it use nRF Connect? If not, do you see the same situation if you use the nRF Connect?
    • What is the SDK/SD used? 

    -Amanda H.

  • Hi,

    • Is the Android system initiating multiple connections to the bonded nRF device? Or is he using an app to scan?
      Ans: I'm not sure your question, this problem doesn't focus on the nRF device. I consider the mobile will connect all devices when the BLE device broadcasts the same mac address on ADV mode. And the mobile use system executes to scan, it doesn't use the APP to Scan.

    • How does Samsung Note 5 connect to the nRF52? Did it use nRF Connect? If not, do you see the same situation if you use the nRF Connect?
      Ans: I use the Bluetooth of System to choose the device name of ADV to connect nRF52. And then the mobile will bond with nRF52. This problem that mainly the nRF52 is the bond device. therefore, this none of nRF Connect. By the way, there is the HID service in the nRF52, so the mobile will auto bond procedure with the nRF52 device.

    • What is the SDK/SD used?
      Ans: I use SDK 15.2.0, SD 6.1.0
  • Hi Ken, 

    Due to the Easter holiday in Norway we are missing a lot of key personnel, so I will have to give you a definite answer next week when everybody is back. 

    -Amanda H.

  • Hi Ken, 

    We are not sure how to fix this since you're initiating the connection through Bluetooth settings and not a custom app. 

    The following information came from the developer:

    The thing I understand it is like that:

    1. They have an HID device supporting multiple simultaneous clients. The device continues advertising after it's connected, so other clients can connect to it.
    2. However, the device is using only 1 resolvable MAC address for all connections. Instead, it should use 4, I think.
    3. When first client bonds, the device should start advertising using a different MAC address, not the same.  There were already bonded devices, the device should advertise with all bound addresses, directly.
    4. Right now, when the device is using the same MAC for all clients, the controller on the Samsung phone just checks, that the resolved MAC is in its white list and connects to it, despite it already being connected.
    5. By separating MAC addresses this should not happen.
    6. I don't know if advertising with the same resolvable MAC (reusing MAC among different devices) is ok with spec. I guess yes, as they are random, so in theory, can repeat, but this may cause problems.

    Indeed, if an HID device was bound with Android, and the phone sees its advertising directly, it will try to connect automatically. I think. And this may be different between different phones/manufacturers.

    -----

    Hence, I wonder if this might be limited to note 5. I guess it depends on the implementation on the android side. I'm not sure if it's intended behavior from the android side. Could you try other phones or OS versions?

    Are you doing the directed advertisement to the same phone? You may try to disable the directed advertisement and see if you still get the same result. 

    -Amanda H.

  • Hi,

    Thank you for your help. I need a few days to test your suggestion. I will continue the discussion with you when I finish these testing.

  • Hi

    I test 2 situations.

    (1) Different Mac address of nRF52

    Step1: I set BLE_ADV_EVT_FAST in adv type, and start to adv.

    Step2: I change the mac address of the nRF52 after the mobile connects with nRF52.

    Step3: The nRF52 starts adv. the mobile doesn't connect with this nRF52.

    (2) Set BLE_ADV_EVT_DIRECTED in second adv packet

    Step1: I set BLE_ADV_EVT_FAST in adv type, and start to adv.

    Step2: I set BLE_ADV_EVT_DIRECTED in adv type after the mobile connects with nRF52.

    Step3: The nRF52 starts adv. the mobile doesn't connect with this nRF52.

    By the way, the directed peer address set other mac address in the BLE_ADV_EVT_DIRECTED.

    I don't know this test could help you analyze this question.  and I don't sure this directed test is right. because I find many direct types in nRF52 ADV. Below these types:

    #define BLE_GAP_ADV_TYPE_CONNECTABLE_SCANNABLE_UNDIRECTED 0x01 /**< Connectable and scannable undirected
    advertising events. */
    #define BLE_GAP_ADV_TYPE_CONNECTABLE_NONSCANNABLE_DIRECTED_HIGH_DUTY_CYCLE 0x02 /**< Connectable non-scannable directed advertising
    events. Advertising interval is less that 3.75 ms.
    Use this type for fast reconnections.
    @note Advertising data is not supported. */
    #define BLE_GAP_ADV_TYPE_CONNECTABLE_NONSCANNABLE_DIRECTED 0x03 /**< Connectable non-scannable directed advertising
    events.
    @note Advertising data is not supported. */
    #define BLE_GAP_ADV_TYPE_NONCONNECTABLE_SCANNABLE_UNDIRECTED 0x04 /**< Non-connectable scannable undirected
    advertising events. */
    #define BLE_GAP_ADV_TYPE_NONCONNECTABLE_NONSCANNABLE_UNDIRECTED 0x05 /**< Non-connectable non-scannable undirected
    advertising events. */
    #define BLE_GAP_ADV_TYPE_EXTENDED_CONNECTABLE_NONSCANNABLE_UNDIRECTED 0x06 /**< Connectable non-scannable undirected advertising
    events using extended advertising PDUs. */
    #define BLE_GAP_ADV_TYPE_EXTENDED_CONNECTABLE_NONSCANNABLE_DIRECTED 0x07 /**< Connectable non-scannable directed advertising
    events using extended advertising PDUs. */
    #define BLE_GAP_ADV_TYPE_EXTENDED_NONCONNECTABLE_SCANNABLE_UNDIRECTED 0x08 /**< Non-connectable scannable undirected advertising
    events using extended advertising PDUs.
    @note Only scan response data is supported. */
    #define BLE_GAP_ADV_TYPE_EXTENDED_NONCONNECTABLE_SCANNABLE_DIRECTED 0x09 /**< Non-connectable scannable directed advertising
    events using extended advertising PDUs.
    @note Only scan response data is supported. */
    #define BLE_GAP_ADV_TYPE_EXTENDED_NONCONNECTABLE_NONSCANNABLE_UNDIRECTED 0x0A /**< Non-connectable non-scannable undirected advertising
    events using extended advertising PDUs. */
    #define BLE_GAP_ADV_TYPE_EXTENDED_NONCONNECTABLE_NONSCANNABLE_DIRECTED 0x0B /**< Non-connectable non-scannable directed advertising
    events using extended advertising PDUs. */

    Could you support an example for the direct packet of the adv packet?

  • Hi,

    One of my last suggestion is:

    Are you doing the directed advertisement on the same phone? You may try to disable the directed advertisement and see if you still get the same result. 

    --

    You could check the HID mouse/keyboard example to see how to do that. 

    -Amanda H.

Reply Children
Related