peripherials fail to connect to central (nrf5340) if another central (nrf5340) is scanning nearby

hi,

                  i am trying to connect  peripherals ( blood pressure, pulse ox meter) with nrf5340 as a central using uuid and mac, everything works as expected. however the peripherils fails to send notification datas to the central to which it is already connected when another certral (nrf5340) is placed nearby. i get time out error. 

Function connected (callback) called with conn_err: 2; Failed to connect to 50:33:8B:26:C5:30 (public)
Failure reason 2: connection create timeout
Refreshing scanning
Setting new scan filters for connecting mode based on target addresses and current active connections
Setting new scan filters for connecting mode based on target addresses and current active connections

Starting scanning

Filters matched. Address: 50:33:8B:26:C5:30 (public) connectable: 0
Therm discovered
Scanning stopped
Initiating connection with Thermometer

Function connected (callback) called with conn_err: 2; Failed to connect to 50:33:8B:26:C5:30 (public)
Failure reason 2: connection create timeout
Refreshing scanning

  • Hi,

    Are both centrals trying to connect the same peripheral? I assume the peripheral stops the connectable advertiser as soon as it has established a connection with one of them.

    Best regards,

    Vidar

  • hi vidar, thanks for the reply, the central can switch between two different mode;

    pairing mode: that filters peripherals based on uuid and extract mac and store them;

    connection mode: that filters based on the stored mac and gets connected to the peripherals that matches the mac addr and gets the data from the peripherals.  

    lets say two central are place next to each other and if one central device is in connection mode and gets data from the perhiperial that is already connected with  the central.

    Meanwhile if the other central device is in pairing mode and is near by,  it affects the peripherial from sending the data to the central which it is already in connection with. we get this error in the debug log of the central .

    Function connected (callback) called with conn_err: 2; Failed to connect to 50:33:8B:26:C5:30 (public)
    Failure reason 2: connection create timeout
    Refreshing scanning
    Setting new scan filters for connecting mode based on target addresses and current active connections
    Setting new scan filters for connecting mode based on target addresses and current active connections

    Starting scanning

    Filters matched. Address: 50:33:8B:26:C5:30 (public) connectable: 0
    Therm discovered
    Scanning stopped
    Initiating connection with Thermometer

    Function connected (callback) called with conn_err: 2; Failed to connect to 50:33:8B:26:C5:30 (public)
    Failure reason 2: connection create timeout
    Refreshing scanning

  • Hi,

    If the device in pairing mode (observer?) is scanning aggressively and sending a scan request for every advertisement event, you may frequently encounter collisions between the scan request and the connection request. The solution is to attempt the connection again.

Related