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

Device discovery of direct advertising devices is not working #12440

Closed
pdunaj opened this issue Jan 11, 2019 · 5 comments
Closed

Device discovery of direct advertising devices is not working #12440

pdunaj opened this issue Jan 11, 2019 · 5 comments
Assignees
Labels
area: Bluetooth Enhancement Changes/Updates/Additions to existing features

Comments

@pdunaj
Copy link
Collaborator

pdunaj commented Jan 11, 2019

Is your feature request related to a problem? Please describe.
Device discovery for direct advertising devices is not working.

Describe the solution you'd like
I would like device that are direct advertising to be discoverable.

Describe alternatives you've considered
I really need direct advertising so there are no alternatives.

Additional context
Today I tried to use direct advertising between peripheral and central running Zephyr. It seems nobody has used that for some time. There was a bug on peripheral side (#12438). After fixing the issue I see direct advertising packets going out of the device. However central does not see the peripheral (yes, device was bonded earlier).

I checked the code and I see that although normal advertising report is supported (look for BT_HCI_EVT_LE_ADVERTISING_REPORT in hci_core.c), direct advertising is not (lack of reaction to BT_HCI_EVT_LE_DIRECT_ADV_REPORT).

I have tried to put logs in le_advertising_report to see if any devices are actually found (even if report is not processed further) but I see no direct advertisement detected (I see packets on the sniffer that contain both my peripheral and central addresses). Has anybody actually used this?

@pdunaj pdunaj added the Feature Request A request for a new feature label Jan 11, 2019
@pdunaj
Copy link
Collaborator Author

pdunaj commented Jan 11, 2019

Hi @cvinayak , do you know if this scanning should work? It seems that there is code missing there...

@carlescufi carlescufi added area: Bluetooth Enhancement Changes/Updates/Additions to existing features and removed Feature Request A request for a new feature labels Mar 17, 2020
@carlescufi
Copy link
Member

@cvinayak @pdunaj @joerchan is this still applicable?

@joerchan
Copy link
Contributor

joerchan commented Mar 17, 2020

I suspect this was the issue:

 *  Note: The LE scanner by default does not use the Identity Address of the
 *        local device when :option:`CONFIG_BT_PRIVACY` is disabled. This is to
 *        prevent the active scanner from disclosing the identity information
 *        when requesting additional information from advertisers.
 *        In order to enable directed advertiser reports then
 *        :option:`CONFIG_BT_SCAN_WITH_IDENTITY` must be enabled.

AFAIK adv reports with directed advertiser works, given that one of the two options are enabled.
Using BT_PRIVACY is the one I would recommend in this case.

@joerchan
Copy link
Contributor

Closing this since I have confirmed with @MarekPieta That discovery of directed advertiser is working.

@MarekPieta
Copy link
Collaborator

I verified that information about direct advertising packets is properly forwarded to the application through the registered callback. The same callback is used for indirect advertising packets (the advertising type field value is the difference). I tested with the nrfxlib LL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Bluetooth Enhancement Changes/Updates/Additions to existing features
Projects
None yet
Development

No branches or pull requests

4 participants