PAwR connexion and sync issues

Hello,

I am testing the RF range of a BLE application based on PAwR (Periodic Advertsing with response) in coded PHY (S8) with SDK 2.9.0.

In order to test the robustness of the system and its ability to re-sync and reconnect in case of sync lost, the tests are performed in the link budget limit (RSSI of arround -80 or -90 dBm).

Fanstel chips are used based on nRF52840.

The code is based on the Nordic demo :

8562.PAwR_Demo.zip 

Periodic Advertising with Responses (PAwR): A practical guide - Software - nRF Connect SDK guides - Nordic DevZone

Many bugs are found during the tests and those bugs do not allow the scan to restart in the main while loop when the sync is lost : 

 1- the error "Connected (err 0x02)" in the connected_cb which stops scanning since the semaphore &sem_connected never releases, so I changed the call back connected_cb content in a way it always executes the semaphore even with err 0x02

2- HCI related errors as "<err> bt_hci_core: Invalid connection complete event"  and "bt_hci_core: Connection creation timeout triggered" when calling bt_conn_le_create() in device_found which seems to stop the connected and disconnected call backs, and so the scan too, it seems that this was addressed here but not so sure  (+) BT connection timeouts with PAWR enabled - Nordic Q&A - Nordic DevZone - Nordic DevZone

3- errors with bt_le_per_adv_set_info_transfer() as "failed to send past err = -5" and "bt_hci_core: opcode 0x205b status 0xla"

The errors shared here, do not occur systematicaly and not all together necessarly, but each time it makes the scan impossible to re-start, overall, it makes the PAwR not so robust in case of sync lost.

Related