This example works closely with the IPSP Initiator Example.
The BLE IPSP Acceptor and the BLE IPSP Initiator Examples demonstrate the usage of the L2CAP connection oriented channel, referred to as the LE Credit Mode in the Bluetooth specification. Here, the Acceptor plays the BLE Peripheral role and the Initiator plays the BLE Central role.
The Acceptor advertises until a BLE connection is established. On BLE connection establishment, it waits for the L2CAP channel connection request on the IPSP PSM 35. The Initiator then provides the user with a trigger to initiate both the BLE connection and the L2CAP channel connection by using Buttons 1 and 2, respectively.
On successful channel establishment, which is indicated by BLE_IPSP_EVT_CHANNEL_CONNECTED with a success result, the Acceptor will start sending a packet of MTU size with a specific pattern. Once the Initiator echoes the packet back, the Acceptor sends a new packet with a new pattern. The size of the packet is reduced on every transmission until packet size zero is reached. On reaching zero, the packet size is reset to MTU size.
This transmission continues until channel disconnection or until the Initiator no longer echoes the packet back.
LED assignments:
You can find the source code and the project file of the example in the following folder: <InstallFolder>\examples\ble_peripheral\ble_app_ipsp_acceptor