A phenomenon in which NUS's Central stops midway while performing a BLE scan.

hello.

I have two NUS Centrals running at the same time. BLE Scan continues to run during standby.

static void scan_start(void)
{
    ret_code_t ret;

    printf("> Scanstart ");
    ret = nrf_ble_scan_start(&m_scan);
    APP_ERROR_CHECK(ret);

    Bsp_led_indication_Scanning_clr();
    ret = bsp_indication_set(BSP_INDICATE_SCANNING); // connection LED
    APP_ERROR_CHECK(ret);

}
The problem is that when the peripheral PCB is turned on while the two Centrals are performing BLE Scan,
One connection is made to the Central, and the other one stops while scanning.

There is no problem with other operations, only the BLE Scan stops.
Why is this like this?

Also, is there a way to check whether BLE SCAN is operating and restart it if BLE SCAN is stopped?
Parents
  • Hi

    I just ran the basic samples on two nRF52832 DKs on my end to try and reproduce this, but I'm not able to, as the central that doesn't get connected to simply disconnects with a 0x3E(CONN_FAILED_TO_BE_ESTABLISHED) or 0x08 (CONN_TIMEOUT) and then starts scanning again on its own. Here is some logging on my end. The peripheral I'm trying to connect to is target EE88A50528C2. Please excuse the other device that it tries connecting to, but there are multiple devices in range here at our office causing this.

    It was never necessary resetting either of the DKs to make them start scanning after "not being the chosen one", and this was done without any changes to the Nordic UART service central/peripheral example projects in nRF5 SDK v17.1.0. Have you made any changes to the projects on your end that might have trigged this to become an issue? For example some check of the connection state of the central no longer being checked or similar?

    Best regards,

    Simon

  • Something somewhat strange happened.

    I created a new and improved PCB, and the above problem disappeared.

    What was improved

    - Modify the load capacitor value of the 32.768kHz crystal in the peripheral (refer to the formula)

    - Fixed 2-pin GND disconnection among 4 pins of peripheral and central 32Mhz Crystal
    - Change peripheral CONN_INTERVAL related parameters

    [ after ]

    #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(4000, UNIT_10_MS) /**< Connection supervisory timeout (4 seconds), Supervision Timeout uses 10 ms units. */

    [ Before ]

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

Reply
  • Something somewhat strange happened.

    I created a new and improved PCB, and the above problem disappeared.

    What was improved

    - Modify the load capacitor value of the 32.768kHz crystal in the peripheral (refer to the formula)

    - Fixed 2-pin GND disconnection among 4 pins of peripheral and central 32Mhz Crystal
    - Change peripheral CONN_INTERVAL related parameters

    [ after ]

    #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(4000, UNIT_10_MS) /**< Connection supervisory timeout (4 seconds), Supervision Timeout uses 10 ms units. */

    [ Before ]

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

Children
No Data
Related