Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nimble whitelist not working (IDFGH-13216) #14153

Open
3 tasks done
Steven35700 opened this issue Jul 8, 2024 · 5 comments
Open
3 tasks done

Nimble whitelist not working (IDFGH-13216) #14153

Steven35700 opened this issue Jul 8, 2024 · 5 comments
Assignees
Labels
Status: Opened Issue is new

Comments

@Steven35700
Copy link

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

General issue report

Hi,

I started from the bleprph example, I activated the CONFIG_EXAMPLE_EXTENDED_ADV flag over menuconfig and I added a line to activate the filter on the whitelist: params.filter_policy = BLE_HCI_SCAN_FILT_USE_WL; in the ext_bleprph_advertise(void) function.

After building and flashing the example on an ESP32S3, when I scan Bluetooth devices over NRFConnect, I still see the advertising and I can connect and interact with the device even though my phone is not in the whitelist.

I thought the problem might come from an empty whitelist. So I added a random address to the whitelist, but the problem persists.

There is no example dealing with this whitelist use case and the nimble documentation is not very complete on this subject.

I absolutely don't feel like this is normal, am I making a mistake ?

@espressif-bot espressif-bot added the Status: Opened Issue is new label Jul 8, 2024
@github-actions github-actions bot changed the title Nimble whitelist not working Nimble whitelist not working (IDFGH-13216) Jul 8, 2024
@rahult-github
Copy link
Collaborator

Hi @Steven35700 ,

Please try BLE_HCI_SCAN_FILT_USE_WL_INITA

@Steven35700
Copy link
Author

Hi @rahult-github

Using BLE_HCI_SCAN_FILT_USE_WL_INITA doesn't work either

However, I just tried without using extended advertising I can get the whitelist work !
But I use extended advertising to be able to have multi advertising

@rahult-github
Copy link
Collaborator

Hi @Steven35700 ,

Sorry for late reply . When the value BLE_HCI_SCAN_FILT_USE_WL_INITA is set, remote can still see the device. However, esp32 s3 will reject the incoming scan / connection request if the remote device is NOT in the whitelist.

I tested s3 now for both extended adv and legacy and i see it works correctly. May i know what exactly is not working at your end ?. Please share console log and application code for reference.

@finger563
Copy link

I'm having a possibly related issue where the remote device is able to connect, but the functionality of the peripheral is broken - e.g. the peripheral is a BLE HID input device and it sets the whitelist so that only a specific central can connect. The central does connect just fine, but does not properly discover the services and such. For the same device with the same bond, advertising without the whitelist address allows the central to connect and the HID device works just fine.

@finger563
Copy link

I'm also slightly confused - you're talking about using the BLE_HCI_SCAN_FILT_* values, which (as I understand) apply to a scan and its parameters. I'm currently using BLE_HCI_ADV_FILT_* to try to configure the peripheral to reject remote device connections which are not in the white list - is that not the correct way to do it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Opened Issue is new
Projects
None yet
Development

No branches or pull requests

5 participants