Bluetooth settings and PAwR (Periodic Advertising with Responses)

When calling the bt_conn_le_create_synced function to create a connection to a peripheral, which is synced to the PAwR train,
I get a CONNECTION FAILED TO BE ESTABLISHED (0x3E) error from the connected callback.
This only happens, when I enable persistent Bluetooth configuration in the peripheral (i.e., enable CONFIG_BT_SETTINGS).

Does the CONFIG_BT_SETTINGS option influence the connection process from the PAwR sync train?
Did i miss a crucial Kconfig?

Here is the proj.conf of my peripheral.

#BLE
CONFIG_BT=y
CONFIG_BT_OBSERVER=y
CONFIG_BT_BROADCASTER=y
CONFIG_BT_EXT_ADV=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_SMP=y
CONFIG_BT_BONDABLE=y
CONFIG_BT_GAP_PERIPHERAL_PREF_PARAMS=n
CONFIG_BT_CONN_CHECK_NULL_BEFORE_CREATE=y
CONFIG_BT_L2CAP_TX_BUF_COUNT=8
CONFIG_BT_EXT_ADV_LEGACY_SUPPORT=y
CONFIG_BT_EAD=y
CONFIG_BT_SETTINGS=y

#PAWR
CONFIG_BT_PER_ADV_SYNC=y
CONFIG_BT_PER_ADV_SYNC_TRANSFER_SENDER=y
CONFIG_BT_PER_ADV_SYNC_TRANSFER_RECEIVER=y
CONFIG_BT_PER_ADV_SYNC_RSP=y
CONFIG_BT_PER_ADV_SYNC_BUF_SIZE=247

#DIS
CONFIG_BT_DIS=y
CONFIG_BT_DIS_PNP_VID=0x1915
CONFIG_BT_DIS_PNP_PID=0x5484
CONFIG_BT_DIS_PNP=y
CONFIG_BT_DEVICE_NAME="My esl"
CONFIG_BT_DIS_MODEL="Nordic_Lite_ESL"
CONFIG_BT_DIS_MANUF="NordicSemi"

#Memory sizes
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
CONFIG_MAIN_STACK_SIZE=2048
CONFIG_HEAP_MEM_POOL_SIZE=4096

#Storage
CONFIG_FLASH=y
CONFIG_FLASH_MAP=y
CONFIG_NVS=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_SETTINGS=y

#OTS
CONFIG_BT_OTS=y
CONFIG_BT_OTS_MAX_OBJ_CNT=0x10
CONFIG_BT_OTS_OACP_WRITE_SUPPORT=y
CONFIG_BT_OTS_OACP_PATCH_SUPPORT=y
CONFIG_BT_OTS_OLCP_GO_TO_SUPPORT=y
CONFIG_BT_OTS_DIR_LIST_OBJ=y

#SPI
CONFIG_SPI=y

#DK IO
CONFIG_DK_LIBRARY=y

#LOG
CONFIG_LOG=y

Any help is greatly appreciated.

Parents
  • Hello,

    Is i t possible to upload the application you are testing? Just zip the application folder and drag and drop it here. 

    Does the CONFIG_BT_SETTINGS option influence the connection process from the PAwR sync train?

    Not that I was aware of, but when I am able to reproduce what you are seeing, I can have a closer look.

    What device are you trying to connect to? Another nRF device running another sample? If so, what sample are you using for testing?

    Best regards,

    Edvin

  • Thank you for your Response!

    The peripheral is running on a nrf52840-DK with nRF Connect version 2.9.0 and and the central is running on a nrf5340-DK with nRF Connect version 2.5.0. This is because for the central I am using the https://github.com/NordicPlayground/nrf-esl-bluetooth sample. The problem persists, even if I drop the peripheral SDK version to 2.5.0. The problem arises only if I enable CONFIG_BT_SETTINGS, otherwise the devices work fine.

    Here is the zip of my peripheral (electronic shelf label).6320.peripheral.zip

    Thank you for your help!

    Best regards,

    Ben

  • Can you please also upload the central sample you are using? Did you do any changes to the nrf-esl-bluetooth sample? Or did you just add CONFIG_BT_SETTINGS=y, built it for the nRF5340 DK and flashed it?

    BR,
    Edvin

  • For the central device, I am using the unmodified sample from github.com/.../nrf-esl-bluetooth. The peripheral is custom-built, although it's similar to the peripheral from the sample. You can find the peripheral code in the ZIP file uploaded in the previous message.

    To reproduce the error, flash the central firmware to a nRF5340DK and the peripheral firmware to a nRF52840DK. Connect to the shell on the central and synchronize with the peripheral (as described in the sample documentation). Then, switch from the synchronized PAwR connection back to a regular BLE connection.
    This only works if I disable CONFIG_BT_SETTINGS.

    Here are the commands I use in the central shell:

    esl_c acl scan 1 1          // Establishes sync with the peripheral
    esl_c acl connect_esl 0     // Attempts to connect to the peripheral with address 0000 (fails if CONFIG_BT_SETTINGS is enabled)

    Here is the ZIP file containing the sample. I'm only using the central part from it.nrf-esl-bluetooth.zip

    I hope this helps clarify the issue.

    Best regards,
    Ben

Reply
  • For the central device, I am using the unmodified sample from github.com/.../nrf-esl-bluetooth. The peripheral is custom-built, although it's similar to the peripheral from the sample. You can find the peripheral code in the ZIP file uploaded in the previous message.

    To reproduce the error, flash the central firmware to a nRF5340DK and the peripheral firmware to a nRF52840DK. Connect to the shell on the central and synchronize with the peripheral (as described in the sample documentation). Then, switch from the synchronized PAwR connection back to a regular BLE connection.
    This only works if I disable CONFIG_BT_SETTINGS.

    Here are the commands I use in the central shell:

    esl_c acl scan 1 1          // Establishes sync with the peripheral
    esl_c acl connect_esl 0     // Attempts to connect to the peripheral with address 0000 (fails if CONFIG_BT_SETTINGS is enabled)

    Here is the ZIP file containing the sample. I'm only using the central part from it.nrf-esl-bluetooth.zip

    I hope this helps clarify the issue.

    Best regards,
    Ben

Children
No Data
Related