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

How many peripherals can be connected to the central in the NUS multiple peripheral to central firmware.

Hello, I am making a system with 20 peripherals to a central base on nRF52840. I followed the firmware."ble_app_uart__saadc_timer_driven__scan_mode" from NORDIC playground in GITHUB for peripheral board and nrf52-ble-app-uart-c-multilink for central board. The peripherals advertise 224 bytes data every 20ms and the central receives data then transfer to laptop via UART. 

Now I can transfer 6 or 7 peripherals to the central, but when the peripherals increased to 18, many peripherals will stop advertising. There will be only two or three peripherals working at last. I remember nordic SDK should support 20 peripherals in this mode. Which parameter should I change to correct the errors? I can post my code for analysis. Any help will be appreciated. 

Parents Reply Children
  • Hi Kenneth, thank you for your reply. I read through the information in your post. I can understand the "scheduling"  for BLE advising and scanning. I have tried the parameters in the central board and sensor boards, but it didn't work well. I don't know which configuration is corresponding the parameters with the nordic manual for "multilink_scheduling". I changed the parameters as following but the multilink works not stable.

    // <o> NRF_BLE_SCAN_SCAN_INTERVAL - Scanning interval. Determines the scan interval in units of 0.625 millisecond. 
    #ifndef NRF_BLE_SCAN_SCAN_INTERVAL
    #define NRF_BLE_SCAN_SCAN_INTERVAL 400      //160
    #endif
    
    // <o> NRF_BLE_SCAN_SCAN_DURATION - Duration of a scanning session in units of 10 ms. Range: 0x0001 - 0xFFFF (10 ms to 10.9225 ms). If set to 0x0000, the scanning continues until it is explicitly disabled. 
    #ifndef NRF_BLE_SCAN_SCAN_DURATION
    #define NRF_BLE_SCAN_SCAN_DURATION 0
    #endif
    
    // <o> NRF_BLE_SCAN_SCAN_WINDOW - Scanning window. Determines the scanning window in units of 0.625 millisecond. 
    #ifndef NRF_BLE_SCAN_SCAN_WINDOW
    #define NRF_BLE_SCAN_SCAN_WINDOW 200      // 80
    #endif
    
    // <o> NRF_BLE_SCAN_MIN_CONNECTION_INTERVAL - Determines minimum connection interval in milliseconds. 
    #ifndef NRF_BLE_SCAN_MIN_CONNECTION_INTERVAL
    #define NRF_BLE_SCAN_MIN_CONNECTION_INTERVAL 7.5       //7.5
    #endif
    
    // <o> NRF_BLE_SCAN_MAX_CONNECTION_INTERVAL - Determines maximum connection interval in milliseconds. 
    #ifndef NRF_BLE_SCAN_MAX_CONNECTION_INTERVAL
    #define NRF_BLE_SCAN_MAX_CONNECTION_INTERVAL 180      //30
    #endif

    How should I change the parameters for my project? What I need is to build 20 peripherals to 1 central BLE network using the NUS service. The advising interval of each peripheral is about 280ms and 224 bytes of data to transmit. What parameters should I modify to meet our project? Thanks.

Related