not able to connect 4 devices (2 nrf devices + 2 B24 custom modules)

Hi, 

I am trying to connect 4 devices (2 nrf devices + 2 B24 custom modules). Each of them can get connected independently as single device, but as soon as I start connecting the other devices, they are getting disconnected.

Even the NRF devices are getting disconnected if I connect one after another. (conn_handle: 0x0, reason: 0x8) Below is my min and max conn intervals from peripheral

#define APP_ADV_DURATION		    500					    /**< The advertising duration (5 seconds) in units of 10 milliseconds. */
#define APP_PAIRING_ADV_DURATION	12000					/**< The advertising duration (5 seconds) in units of 10 milliseconds. */

#define MIN_CONN_INTERVAL		MSEC_TO_UNITS(20, UNIT_1_25_MS)		/**< Minimum acceptable connection interval (20 ms), Connection interval uses 1.25 ms units. */
#define MAX_CONN_INTERVAL		MSEC_TO_UNITS(75, UNIT_1_25_MS)		/**< Maximum acceptable connection interval (75 ms), Connection interval uses 1.25 ms units. */
#define SLAVE_LATENCY			0					/**< Slave latency. */
#define CONN_SUP_TIMEOUT		MSEC_TO_UNITS(500, UNIT_10_MS)		/**< Connection supervisory timeout (4 seconds), Supervision Timeout uses 10 ms units. */

#define FIRST_CONN_PARAMS_UPDATE_DELAY	APP_TIMER_TICKS(5000)
#define NEXT_CONN_PARAMS_UPDATE_DELAY	APP_TIMER_TICKS(30000)
#define MAX_CONN_PARAMS_UPDATE_COUNT	30

On the central side I have the below parameters

#define NRF_BLE_SCAN_SCAN_INTERVAL 		        80
#define NRF_BLE_SCAN_MIN_CONNECTION_INTERVAL 	7.5	
#define NRF_BLE_SCAN_MAX_CONNECTION_INTERVAL 	20
#define NRF_BLE_SCAN_SLAVE_LATENCY 		        0

#define NRF_SDH_BLE_CENTRAL_LINK_COUNT 		    4
#define NRF_SDH_BLE_TOTAL_LINK_COUNT 		    4

The b24 has 3 different services, and I am using the #define NRF_BLE_GQ_QUEUE_SIZE    8

Is there any example I can look into to figure out what is going wrong? 

SDK version - 17.1.0

Thank you,

Vinayaka KS

Parents
  • Hello,

    On your central, what are these set to?

    NRF_BLE_SCAN_SCAN_WINDOW
    NRF_BLE_SCAN_SUPERVISION_TIMEOUT

    What you can try is to increase the connection interval settings on the central? Try setting the max to the same as your peripheral:

    NRF_BLE_SCAN_MAX_CONNECTION_INTERVAL 75

    And see if that helps. If not, what does the logs say?

    I see that the disconnect reason is 0x08, which is BLE_HCI_CONNECTION_TIMEOUT. So either, they are out of range, or some of the devices has too much to do in too little time. Increasing the connection interval to e.g. 75 may reduce the load, leaving more time to maintain more connections. 

    Best regards,

    Edvin

  • I checked with the same parameters set in the peripheral for the Central. But still its having the same problems.

    #define NRF_BLE_SCAN_SCAN_WINDOW                80
    #define NRF_BLE_SCAN_SUPERVISION_TIMEOUT        4000

    do we have any examples where I can see multiple non-nordic peripherals getting connected along with nordic peripherals? I want to see how the connection handlers are managed?

    Thank you,

    Vinayaka KS

  • There should be no difference between Nordic and non-Nordic BLE devices, and hence, we don't have anything showcasing non-nordic peripherals (but we don't have any Nordic-specific samples either, strictly speaking). 

    So you have one central and 4 peripherals in your setup, right?

    Is there any pattern in what you are seeing? Any particular device that is always disconnected first? You did say that the Nordic devices are also being disconnected, right?

    VinayakaKS said:
    do we have any examples where I can see multiple non-nordic peripherals getting connected along with nordic peripherals?

    Although it is not non-nordic specific, you can check out the ble_central\ble_app_multilink_central example for a central that connects to multiple peripherals, and how it handles the connection handles. 

    What does the logs from the peripherals say? Are they the ones saying "disconnected reason 0x08"? And do you see the same reason on both the peripheral and central?

    Did you write the application for the b24 devices as well, or is it a 3rd party device with pre-written software? (do you have the possibility to control connection parameters on this device as well?)

    And what is your application doing when you see the disconnect message in the log? Are you "just" connected? Or do you send a lot of data at the time?

    And finally, if the logs doesn't give any hints. Can you please try to capture a sniffer trace of one of the failed connections? For this you can use the nRF Sniffer for Bluetooth LE.

    Best regards,

    Edvin

Reply
  • There should be no difference between Nordic and non-Nordic BLE devices, and hence, we don't have anything showcasing non-nordic peripherals (but we don't have any Nordic-specific samples either, strictly speaking). 

    So you have one central and 4 peripherals in your setup, right?

    Is there any pattern in what you are seeing? Any particular device that is always disconnected first? You did say that the Nordic devices are also being disconnected, right?

    VinayakaKS said:
    do we have any examples where I can see multiple non-nordic peripherals getting connected along with nordic peripherals?

    Although it is not non-nordic specific, you can check out the ble_central\ble_app_multilink_central example for a central that connects to multiple peripherals, and how it handles the connection handles. 

    What does the logs from the peripherals say? Are they the ones saying "disconnected reason 0x08"? And do you see the same reason on both the peripheral and central?

    Did you write the application for the b24 devices as well, or is it a 3rd party device with pre-written software? (do you have the possibility to control connection parameters on this device as well?)

    And what is your application doing when you see the disconnect message in the log? Are you "just" connected? Or do you send a lot of data at the time?

    And finally, if the logs doesn't give any hints. Can you please try to capture a sniffer trace of one of the failed connections? For this you can use the nRF Sniffer for Bluetooth LE.

    Best regards,

    Edvin

Children
Related