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

    This sounds like it might be a misunderstanding. When you connect to one central with the peripheral, that peripheral will naturally stop advertising. So if it is the only advertising device your other central is scanning for it might seem like it stops scanning, or have you debugged and specifically see that the radio or scan function stops once the peripheral is connected to the other central?

    To make sure it isn't the case that you're only seeing the one peripheral stops advertising you can have two devices advertising that the central will detect. Either another DK running the BLE NUS peripheral sample, or a phone with the nRF Connect app advertising with the Nordic UART Service.

    Best regards,

    Simon

  • hi,  

    This sounds like it might be a misunderstanding. When you connect to one central with the peripheral, that peripheral will naturally stop advertising. So if it is the only advertising device your other central is scanning for it might seem like it stops scanning, or have you debugged and specifically see that the radio or scan function stops once the peripheral is connected to the other central?

    I am connecting two peripheral devices to the PC and checking the debugging messages.

    And when you turn on pheipheal, the above phenomenon occurs.

    As you can see in the captured image below, Central in the left terminal program and Central in the right terminal program

    are running simultaneously.

    static void ble_evt_handler(ble_evt_t const * p_ble_evt, void * p_context) -> BLE_GAP_EVT_ADV_REPORT

    When the two centrals are scanning as shown in the captured image above, when the peripheral is turned on, it looks like the image below.

    ( Name filter )

    The left central stopped scanning and the right central connected normally.

    What makes me think that the left central has stopped scanning is that debugging messages for scans no longer appear.

    Additionally, even if the peripheral device is turned on, it does not connect.

    Isn't it possible that the scan stops during the connection process and there is no time-out function for failure?

Reply
  • hi,  

    This sounds like it might be a misunderstanding. When you connect to one central with the peripheral, that peripheral will naturally stop advertising. So if it is the only advertising device your other central is scanning for it might seem like it stops scanning, or have you debugged and specifically see that the radio or scan function stops once the peripheral is connected to the other central?

    I am connecting two peripheral devices to the PC and checking the debugging messages.

    And when you turn on pheipheal, the above phenomenon occurs.

    As you can see in the captured image below, Central in the left terminal program and Central in the right terminal program

    are running simultaneously.

    static void ble_evt_handler(ble_evt_t const * p_ble_evt, void * p_context) -> BLE_GAP_EVT_ADV_REPORT

    When the two centrals are scanning as shown in the captured image above, when the peripheral is turned on, it looks like the image below.

    ( Name filter )

    The left central stopped scanning and the right central connected normally.

    What makes me think that the left central has stopped scanning is that debugging messages for scans no longer appear.

    Additionally, even if the peripheral device is turned on, it does not connect.

    Isn't it possible that the scan stops during the connection process and there is no time-out function for failure?

Children
No Data
Related