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:
Source device application calls
GAP_HandoverTimeSyncReceive()
with thestopWhenFound
parameter set to ‘gTimeSyncStopWhenFound_c’.Target device application calls
GAP_HandoverTimeSyncTransmit()
Source device receives the ‘gHandoverTimeSyncReceiveComplete_c’ event indicating that Source Link Layer is waiting for the time synchronization event.
Target device receives the ‘gHandoverTimeSyncTransmitStateChanged_c’ event indication that time synchronization transmission is enabled.
The Source device receives the ‘gHandoverTimeSyncEvent_c’ event containing the timing information.
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
Source device calls
Gap_HandoverSuspendTransmit()
to suspend the Bluetooth LE communication with the connected device.After the
gHandoverSuspendTransmitComplete_c
event is received, the Handover Data may be retrieved usingGap_HandoverGetData()
. The application must provided memory for the Handover Data. To obtain the required data size, use the functionGap_HandoverGetDataSize()
.Wait for the
gHandoverGetComplete_c
event to confirm the Handover Data retrieval.Transfer the Handover Data from the Source device to the Target device.
On the Target device, call
Gap_HandoverSetData()
to set the received Handover Data.Wait for the
gHandoverSetComplete_c
event to confirm the Handover Data has been successfully set.
Context Synchronization signaling chart
Anchor Search
The Anchor Search procedure takes the connection parameters and timing information obtained in the Time Synchronization procedure to locate the anchor point of the connection between the source device and the connected device.
Anchor Search steps
Source device calls
Gap_GetConnParams()
to retrieve current connection parameters. The connection parameters will be reported through the gGetConnParamsComplete_c event.Send the connection parameters and the timing information obtained from Time Synchronization to the Target device.
On the Target device, call
Gap_HandoverAnchorSearch()
with the received connection parameters and timing information. Set the ‘mode’ parameter according to the current process:‘gSuspendTxMode_c’ for Connection Handover.
‘gRssiSniffingMode_c’ for Anchor Monitoring.
‘gPacketMode_c’ for Packet Monitoring.
Wait for the
gHandoverAnchorSearchStarted_c
event to confirm the Anchor Search procedure has started.If Anchor Search is successful the requested events will be reported to the application through the
gHandoverAnchorMonitorEvent_c
orgHandoverAnchorMonitorPacketEvent_c
event.
Anchor Search 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
Target device calls
Gap_HandoverConnect()
to initiate the connection handover process.Wait for the
gConnEvtHandoverConnected_c
event on the Target device. Once received, the connection has been successfully transferred.Notify the Source device that the Target device has successfully connected to the Device.
If the application does not include Channel Sounding, call
Gap_HandoverDisconnect
on the Source device to terminate its connection.The Handover Data is no longer required and may be freed by calling
Gap_HandoverFreeData()
on the Target device.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:
After step 3 above, retrieve the Channel Sounding context on the Source device by calling
Gap_HandoverGetCsLlContext()
and wait for thegHandoverGetCsLlContextComplete
event.Send the Channel Sounding context to the Target device.
Set the context in the Target device by calling
Gap_HandoverSetCsLlContext()
and wait for thegHandoverSetCsLlContextComplete_c
event.Notify the Source device that the Channel Sounding context has been successfully set.
Call
Gap_HandoverDisconnect()
on the Source device to terminate its connection. When complete, thegHandoverDisconnected_c
event will be sent.
Connection Handover signaling chart
Procedures - Detail view
Connection Handover
Connection Handover with Channel Sounding
Anchor/Packet Monitoring