This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How can I know that it's scanning or not?

Hi. I'm using nRF51822AC, SDK12.2.0 as Central.

Q1. Is there any function to know regarding it is scanning or not?

Q2. As your example "ble_app_multilink_central", Does "Scan" stop automatically after "sd_ble_gap_connect"?

Q3. Why do you use "(void) sd_ble_gap_scan_stop();" in "scan_start" function?

I hope your reply.

Parents
    1. No. I don't think this exists. Use an application timer with the same duration as the scan.
    2. Yes. According to the other examples. Scan stops automatically when you connect succesfully
    3. Stop scan is sometimes called in start_scan function so that you can call start_scan and not get an error if its already scanning
  • Thanks for your help. about Q3. I'm using scan_start function as below.

    void scan_start(void) { ret_code_t err_code;

    	(void) sd_ble_gap_scan_stop();
    
    	err_code = sd_ble_gap_scan_start(&m_scan_params);
    	APP_ERROR_CHECK(err_code);
    

    }

    Sometimes it makes an error and reboot system. Error code is 0x08. What could be the problem?

    I hope your reply.

Reply
  • Thanks for your help. about Q3. I'm using scan_start function as below.

    void scan_start(void) { ret_code_t err_code;

    	(void) sd_ble_gap_scan_stop();
    
    	err_code = sd_ble_gap_scan_start(&m_scan_params);
    	APP_ERROR_CHECK(err_code);
    

    }

    Sometimes it makes an error and reboot system. Error code is 0x08. What could be the problem?

    I hope your reply.

Children
No Data
Related