Periodic Advertising Connection Procedure (Responder)
Overview
A simple application demonstrating the responder side of the Bluetooth LE Periodic Advertising Connection Procedure.
This sample starts as a connectable advertiser so that the initiator (Periodic Advertising Connection Procedure (Initiator)) can connect to it first over a regular connection and learn its address. After the initiator disconnects, this sample scans for the PAwR advertiser, synchronizes to it, and responds to subevent data (with its device name, only to prove liveness, since the initiator already knows its address). Once the initiator connects using the Periodic Advertising Connection Procedure, this device will disconnect and wait for a new connection to be established.
The responder uses its identity address so that the address learned during the initial connection remains valid for the subsequent PAwR connection.
Requirements
A board with Bluetooth LE support
A controller that supports the Periodic Advertising with Responses (PAwR) - Scanner feature
Building and Running
Build and flash the sample as follows, replacing <board> with your target board:
west build -b <board> samples/bluetooth/periodic_sync_conn
west flash
Start this sample first. After flashing, the device will advertise as connectable so the initiator can connect and learn its address. Once the initiator disconnects, this device will scan for the PAwR advertiser, synchronize to it, and respond to subevent data. Once the initiator connects using the Periodic Advertising Connection Procedure, this device will disconnect and wait for a new connection.
Use the Periodic Advertising Connection Procedure (Initiator) sample on a second board to connect to this device, then start PAwR advertising and connect to it once synced.