Hi to everyone. I'm starting developing a bluetooth LE application based on the new Nordic SDK using Zephyr.
I currently have two nrf52_pca10040 boards and I'm trying to connect them using advertising scan filtering. I was able to connect them using filter by uuid and filter by name separately. However I don't understand why combined filtering doesn't work.
Here is the relevant code in my scanning init function:
As I have already said, I can connect the two boards using one of the following scan filter enable:
- err = bt_scan_filter_enable(BT_SCAN_NAME_FILTER, false);
- err = bt_scan_filter_enable(BT_SCAN_UUID_FILTER, false);
- err = bt_scan_filter_enable((BT_SCAN_NAME_FILTER | BT_SCAN_UUID_FILTER), false);
However if I set the match_all parameter to true, connection can't be established because filters don't match.
This is the definition of the function:
In my project prj.conf file I am using the following keywords:
CONFIG_BT_SCAN=y
CONFIG_BT_SCAN_FILTER_ENABLE=y
CONFIG_BT_SCAN_UUID_CNT=1
CONFIG_BT_SCAN_NAME_CNT=1
On the serial output of my client board scanning the advertising information from my server board I am receiving two callbacks on my scan_filter_no_match() function:
Filter not match. Address: fb:fc:06:b3:35:d2 (random) connectable: 1
Filter not match. Address: fb:fc:06:b3:35:d2 (random) connectable: 1
What am I missing?