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

Directed Advertising not seen by the addressed device

Hi,

I am testing direct advertising with two nRF52-DK. One performs a direct advertising and the other scans for the directed adverts. Unfortunately, the scanning device cannot see the directed advertising packages.

For simplicty and to reduce variables, I have set a test where I use the below code on a nRF52 dk (nRF52832) and the BLE tool on the nRF Connect SDK for Desktop (using a nRF52840-donge). I have hardcoded the dongle address on the directed advertiser code. Unfortunately, I still cannot see the directed advertising packages. Why is that? Any help most welcome.

prj.conf file:

#
# Copyright (c) 2019 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#
#CONFIG_NCS_SAMPLES_DEFAULTS=y
CONFIG_BOARD_ENABLE_DCDC=n

CONFIG_BT=y
CONFIG_BT_DEBUG_LOG=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_EXT_ADV=y
CONFIG_BT_DEVICE_NAME="directed_adv"
CONFIG_BT_PRIVACY=n
CONFIG_BT_EXT_ADV_MAX_ADV_SET=1

CONFIG_BT_GATT_CLIENT=y

CONFIG_BT_SETTINGS=y

CONFIG_HEAP_MEM_POOL_SIZE=1024

CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_MAP=y
CONFIG_NVS=y
CONFIG_SETTINGS=y


# RTT Log Enanble
CONFIG_LOG=y
CONFIG_USE_SEGGER_RTT=y
CONFIG_LOG_BUFFER_SIZE=4096
CONFIG_RTT_CONSOLE=y
CONFIG_PRINTK=y

Direct Advertiser logs

*** Booting Zephyr OS build v2.7.0-ncs1  ***
11-directed_adv init
[00:00:01.327,239] <inf> fs_nvs: 6 Sectors of 4096 bytes
[00:00:01.327,270] <inf> fs_nvs: alloc wra: 0, f70
[00:00:01.327,270] <inf> fs_nvs: data wra: 0, 118
[00:00:01.327,392] <inf> sdc_hci_driver: SoftDevice Controller build revision: 
                                         df c0 4e d6 1f 7c 66 09  0a f5 2b a0 98 f2 43 64 |..N..|f. ..+...Cd
                                         62 c5 a6 2a                                      |b..*             
[00:00:01.330,413] <inf> bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)
[00:00:01.330,413] <inf> bt_hci_core: HW Variant: nRF52x (0x0002)
[00:00:01.330,413] <inf> bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 223.20160 Build 1719410646
[00:00:01.330,718] <inf> bt_hci_core: No ID address. App must call settings_load()
Bluetooth initialized
[00:00:01.330,902] <err> settings: set-value failure. key: bt/keys/e394a91ee9ef1 error(-2)
[00:00:01.331,634] <inf> bt_hci_core: Identity: F2:A4:36:CA:06:73 (random)
[00:00:01.331,634] <inf> bt_hci_core: HCI: version 5.2 (0x0b) revision 0x12b0, manufacturer 0x0059
[00:00:01.331,634] <inf> bt_hci_core: LMP: version 5.2 (0x0b) subver 0x12b0
Directed B2B Advertising Started addr: C7:45:56:34:0F:F0 (random)

BLE Tool

Parents
  • Hi Armand

    I don't think the Bluetooth application in nRF Connect for Desktop will show anything if a directed advertising packet is received. These packet doesn't really contain any data to show, just the peer address. 
    The same goes for extended advertise packets, I will need to check with the developers if this is supported. 
    I will get this confirmed during office hours tomorrow. 

    Have you tried to set up the other board to run a scanner example instead? 
    This should work, as long as you use comparable settings. 

    Best regards
    Torbjørn

Reply
  • Hi Armand

    I don't think the Bluetooth application in nRF Connect for Desktop will show anything if a directed advertising packet is received. These packet doesn't really contain any data to show, just the peer address. 
    The same goes for extended advertise packets, I will need to check with the developers if this is supported. 
    I will get this confirmed during office hours tomorrow. 

    Have you tried to set up the other board to run a scanner example instead? 
    This should work, as long as you use comparable settings. 

    Best regards
    Torbjørn

Children
  • Hi Armand

    The software developers confirmed that the nRF Connect for Desktop Bluetooth application doesn't support directed advertising or extended advertising, so you can't really use this tool to test your application. 

    The nRF Sniffer should be able to show the directed advertising packets though, if you are able to set that up?

    Otherwise you would need to configure your second board as a scanner, as I mentioned in my previous reply. 

    Best regards
    Torbjørn

  • Hi Torbjørn,

    As stated I did initally test with two nRF52 dev kits (nRF52832). I am going to share here my code for the scanner and the logs on both devices. I cannot get to see any directed advertisement package on the scanner side. Could you run on your side both codes on nRF52dk? Thanks

    LOGS

    Direct advertiser

    *** Booting Zephyr OS build v2.7.0-ncs1  ***
    11-directed_adv init
    [00:00:01.915,771] <inf> fs_nvs: 6 Sectors of 4096 bytes
    [00:00:01.915,802] <inf> fs_nvs: alloc wra: 2, fb0
    [00:00:01.915,802] <inf> fs_nvs: data wra: 2, 448
    [00:00:01.915,924] <inf> sdc_hci_driver: SoftDevice Controller build revision: 
                                             df c0 4e d6 1f 7c 66 09  0a f5 2b a0 98 f2 43 64 |..N..|f. ..+...Cd
                                             62 c5 a6 2a                                      |b..*             
    [00:00:01.918,914] <inf> bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)
    [00:00:01.918,914] <inf> bt_hci_core: HW Variant: nRF52x (0x0002)
    [00:00:01.918,945] <inf> bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 223.20160 Build 1719410646
    [00:00:01.919,219] <inf> bt_hci_core: No ID address. App must call settings_load()
    Bluetooth initialized
    [00:00:01.919,952] <inf> bt_hci_core: Identity: F2:A4:36:CA:06:73 (random)
    [00:00:01.919,952] <inf> bt_hci_core: HCI: version 5.2 (0x0b) revision 0x12b0, manufacturer 0x0059
    [00:00:01.919,952] <inf> bt_hci_core: LMP: version 5.2 (0x0b) subver 0x12b0
    Directed B2B Advertising Started addr: C1:F9:D7:24:F3:A6 (random)
    Directed B2B adv timeout

    Scanner logs:

    *** Booting Zephyr OS build v2.7.0-ncs1  ***
    [00:00:02.586,242] <inf> fs_nvs: 6 Sectors of 4096 bytes
    [00:00:02.586,242] <inf> fs_nvs: alloc wra: 3, e78
    [00:00:02.586,242] <inf> fs_nvs: data wra: 3, 20c
    [00:00:02.586,395] <inf> sdc_hci_driver: SoftDevice Controller build revision: 
                                             df c0 4e d6 1f 7c 66 09  0a f5 2b a0 98 f2 43 64 |..N..|f. ..+...Cd
                                             62 c5 a6 2a                                      |b..*             
    [00:00:02.589,202] <inf> bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)
    [00:00:02.589,202] <inf> bt_hci_core: HW Variant: nRF52x (0x0002)
    [00:00:02.589,202] <inf> bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 223.20160 Build 1719410646
    [00:00:02.589,477] <inf> bt_hci_core: No ID address. App must call settings_load()
    [00:00:02.589,660] <err> settings: set-value failure. key: bt/name error(-2)
    [00:00:02.589,904] <err> settings: set-value failure. key: bt/mesh/s/2/bind error(-2)
    [00:00:02.590,179] <err> settings: set-value failure. key: bt/mesh/AppKey/0 error(-2)
    [00:00:02.590,423] <err> settings: set-value failure. key: bt/mesh/RPL/1 error(-2)
    [00:00:02.590,698] <err> settings: set-value failure. key: bt/mesh/Seq error(-2)
    [00:00:02.591,064] <err> settings: set-value failure. key: bt/mesh/IV error(-2)
    [00:00:02.591,491] <err> settings: set-value failure. key: bt/mesh/NetKey/0 error(-2)
    [00:00:02.591,918] <err> settings: set-value failure. key: bt/mesh/Net error(-2)
    [00:00:02.592,742] <inf> bt_hci_core: Identity: <log_strdup alloc failed>
    [00:00:02.592,773] <inf> bt_hci_core: HCI: version 5.2 (0x0b) revision 0x12b0, manufacturer 0x0059
    [00:00:02.592,773] <inf> bt_hci_core: LMP: version 5.2 (0x0b) subver 0x12b0
    Starting 12 - Directed Advertising Scanner
    Addr: C1:F9:D7:24:F3:A6 (random)
    Bluetooth initialized
    Scanning successfully started
    No Match. Adv Type: 0x00 Props: 0x0003
    No Match. Adv Type: 0x04 Props: 0x000A
    No Match. Adv Type: 0x00 Props: 0x0003
    No Match. Adv Type: 0x04 Props: 0x000A
    No Match. Adv Type: 0x00 Props: 0x0003
    No Match. Adv Type: 0x00 Props: 0x0003
    No Match. Adv Type: 0x04 Props: 0x000A
    No Match. Adv Type: 0x00 Props: 0x0003
    No Match. Adv Type: 0x04 Props: 0x000A
    No Match. Adv Type: 0x00 Props: 0x0003
    No Match. Adv Type: 0x04 Props: 0x000A
    No Match. Adv Type: 0x00 Props: 0x0003
    No Match. Adv Type: 0x00 Props: 0x0003
    No Match. Adv Type: 0x00 Props: 0x0003
    No Match. Adv Type: 0x04 Props: 0x000A
    No Match. Adv Type: 0x00 Props: 0x0003
    No Match. Adv Type: 0x00 Props: 0x0003
    No Match. Adv Type: 0x00 Props: 0x0003
    No Match. Adv Type: 0x04 Props: 0x000A
    No Match. Adv Type: 0x00 Props: 0x0003
    No Match. Adv Type: 0x04 Props: 0x000A
    No Match. Adv Type: 0x00 Props: 0x0003
    No Match. Adv Type: 0x00 Props: 0x0003
    No Match. Adv Type: 0x00 Props: 0x0003
    No Match. Adv Type: 0x00 Props: 0x0003
    No Match. Adv Type: 0x00 Props: 0x0003
    No Match. Adv Type: 0x04 Props: 0x000A
    No Match. Adv Type: 0x00 Props: 0x0003
    No Match. Adv Type: 0x00 Props: 0x0003
    No Match. Adv Type: 0x04 Props: 0x000A
    No Match. Adv Type: 0x00 Props: 0x0003
    No Match. Adv Type: 0x00 Props: 0x0003
    No Match. Adv Type: 0x04 Props: 0x000A
    No Match. Adv Type: 0x00 Props: 0x0003
    No Match. Adv Type: 0x04 Props: 0x000A
    No Match. Adv Type: 0x00 Props: 0x0003
    No Match. Adv Type: 0x04 Props: 0x000A
    No Match. Adv Type: 0x00 Props: 0x0003
    No Match. Adv Type: 0x04 Props: 0x000A
    No Match. Adv Type: 0x00 Props: 0x0003
    No Match. Adv Type: 0x00 Props: 0x0003
    No Match. Adv Type: 0x04 Props: 0x000A
    No Match. Adv Type: 0x00 Props: 0x0003
    No Match. Adv Type: 0x00 Props: 0x0003
    No Match. Adv Type: 0x04 Props: 0x000A
    No Match. Adv Type: 0x00 Props: 0x0003
    

  • Hi Torbjørn, Any chance to test this? Thanks

  • Hi Armand

    My apologies, I had back to back meetings today and didn't get time. I will do my best to test this tomorrow and get back to you. 

    Best regards
    Torbjørn

Related