Procedures

This section describes the available Connection Handover procedures. A procedure is executed between a device in a connection, referred as the Source device, and another device involved in the Connection Handover or Anchor/Packet Monitoring process, referred to as the Target device.

Procedures - Top level view

The Connection Handover and Anchor/Packet Monitoring process comprises several procedures as illustrated below.

Connection Handover

Anchor/Packet monitoring

Individual procedures

This section describes each individual procedure in detail.

Time synchronization

The Time Synchronization procedure enables precise timing alignment between the Source and Target devices for the Connection Handover and Anchor/Packet monitoring processes. The timing information obtained is further required for the Anchor Search procedure.

To start the time synchronization procedure, one of the devices must call GAP_HandoverTimeSyncReceive() and the other device must call GAP_HandoverTimeSyncTransmit(). Either device, Source or Target, can initiate the procedure. The Connection Handover application common module initiates the procedure on the Source device by calling the Gap_HandoverTimeSyncReceive() function.

Time Synchronization steps

Time synchronization steps for two devices where the connected device starts the procedure:

  1. Source device application calls GAP_HandoverTimeSyncReceive() with the stopWhenFound parameter set to ‘gTimeSyncStopWhenFound_c’.

  2. Target device application calls GAP_HandoverTimeSyncTransmit()

  3. Source device receives the ‘gHandoverTimeSyncReceiveComplete_c’ event indicating that Source Link Layer is waiting for the time synchronization event.

  4. Target device receives the ‘gHandoverTimeSyncTransmitStateChanged_c’ event indication that time synchronization transmission is enabled.

  5. The Source device receives the ‘gHandoverTimeSyncEvent_c’ event containing the timing information.

  6. The Source device computes the Anchor Search ‘timingDiffSlot’ and ‘timingDiffOffset’ using the timing information received in the gHandoverTimeSyncEvent_c event as shown below: ‘timingDiffSlot = txClkSlot - rxClkSlot;’ ‘timingDiffOffset = txUs - rxUs;’

Time Synchronization signaling chart

Context Synchronization

In order to transfer an existing connection from a Source device to a Target device, the Host and Link Layer connection context must be synchronized. The Handover Data includes all the required connection information, which must be retrieved from the Source device and transferred to the Target device. Potential issues include instances where the Host or Link Layer context is updated during the Connection Handover process. To avoid such issues, the Bluetooth LE communication between the Source device and the connected device must be suspended until the Connection Handover is complete or aborted. In case the Connection Handover process is aborted, the original connection can be resumed. This procedure is required only for the Connection Handover process and not for the Anchor/Packet Monitoring process.

Context Synchronization steps

  1. Source device calls Gap_HandoverSuspendTransmit() to suspend the Bluetooth LE communication with the connected device.

  2. After the gHandoverSuspendTransmitComplete_c event is received, the Handover Data may be retrieved using Gap_HandoverGetData(). The application must provided memory for the Handover Data. To obtain the required data size, use the function Gap_HandoverGetDataSize().

  3. Wait for the gHandoverGetComplete_c event to confirm the Handover Data retrieval.

  4. Transfer the Handover Data from the Source device to the Target device.

  5. On the Target device, call Gap_HandoverSetData() to set the received Handover Data.

  6. Wait for the gHandoverSetComplete_c event to confirm the Handover Data has been successfully set.

Context Synchronization signaling chart

Connection Handover

The Connection Handover procedure may be performed after a successful Anchor Search procedure and consists in the Target device taking over the connection from the Source device.

Connection Handover steps

  1. Target device calls Gap_HandoverConnect() to initiate the connection handover process.

  2. Wait for the gConnEvtHandoverConnected_c event on the Target device. Once received, the connection has been successfully transferred.

  3. Notify the Source device that the Target device has successfully connected to the Device.

  4. If the application does not include Channel Sounding, call Gap_HandoverDisconnect on the Source device to terminate its connection.

  5. The Handover Data is no longer required and may be freed by calling Gap_HandoverFreeData() on the Target device.

  6. Application context may be transferred at this point through application specific means. If Channel Sounding is enabled in the application, the Channel Sounding Context must be transferred.

Additional steps for Channel Sounding applications:

  1. After step 3 above, retrieve the Channel Sounding context on the Source device by calling Gap_HandoverGetCsLlContext() and wait for thegHandoverGetCsLlContextComplete event.

  2. Send the Channel Sounding context to the Target device.

  3. Set the context in the Target device by calling Gap_HandoverSetCsLlContext() and wait for the gHandoverSetCsLlContextComplete_c event.

  4. Notify the Source device that the Channel Sounding context has been successfully set.

  5. Call Gap_HandoverDisconnect() on the Source device to terminate its connection. When complete, the gHandoverDisconnected_c event will be sent.

Connection Handover signaling chart

Procedures - Detail view

Connection Handover

Connection Handover with Channel Sounding

Anchor/Packet Monitoring