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

RSSI scan filter

I use nRF5340 DK as Central, iPhone as Peripheral.

I start a scan with no filters and in scan_filter_no_match() I check if RSSI is good enough "RSSI > -40" and initialize the connection.

It's working but searching the specific device takes too long, average 600ms.

Is there any way to speed up the scan?

Is it possible to set some RSSI filter, if there is any, to receive only advertisements from devices with a strong RSSI and ignore the rest?

Power consumption is not a problem, the board will be connected to power all the time.

Thanks in advance.

Parents
  • Is there any way to speed up the scan?

    Try to change the scan window and interval.

    Try e.g. something like this in scan_init(), snippet:

    struct bt_le_scan_param scan_param = {
    		.type = BT_LE_SCAN_TYPE_ACTIVE,
    		.options = BT_LE_SCAN_OPT_FILTER_DUPLICATE,
    		.interval = 0x0010,
    		.window = 0x0010,
    	};
    
    	struct bt_scan_init_param scan_init = {
    		.connect_if_match = 1,
    		.scan_param = &scan_param,
    		.conn_param = BT_LE_CONN_PARAM_DEFAULT,
    	};
    
    	bt_scan_init(&scan_init);

Reply
  • Is there any way to speed up the scan?

    Try to change the scan window and interval.

    Try e.g. something like this in scan_init(), snippet:

    struct bt_le_scan_param scan_param = {
    		.type = BT_LE_SCAN_TYPE_ACTIVE,
    		.options = BT_LE_SCAN_OPT_FILTER_DUPLICATE,
    		.interval = 0x0010,
    		.window = 0x0010,
    	};
    
    	struct bt_scan_init_param scan_init = {
    		.connect_if_match = 1,
    		.scan_param = &scan_param,
    		.conn_param = BT_LE_CONN_PARAM_DEFAULT,
    	};
    
    	bt_scan_init(&scan_init);

Children
No Data
Related