Common Procedures

The Connection Handover specification defines a framework that allows two implentations to exchange information about alternative carriers and perform a selection process. The protocol follows a client-server model and does not require the server to keep state information between successive client requests.

Connection handover protocol messages are exchanged over an LLCP data link connection and thus require connection setup before the handover message exchange. The service access point of a remote handover server application is determined by the NFC Forum registered service name urn:nfc:sn:handover.

For performance reasons, the data link connection should allow LLCP Information (I) PDUs to utilize at least the full transport capacity of an NFC-DEP MAC layer PDU.

Interoperability Test Requirement

The interoperability test scenarios require that a connection handover implementation provides a data link connection MIU of at least 248 octets.

Establish Connection with Server

The purpose this test scenario is to verify that a handover server implementation accepts a data link connection request from a remote client and provides a reasonable data link connection MIU. The reason why this is separate from Terminate Connection with Server is to be re-usable in other test scenarios.

  1. Establish a data link connection with the urn:nfc:sn:handover service on the Device Under Test. It is an implementation choice of the Device In Testmode whether the service name is first resolved into the service access point address and followed by a CONNECT PDU to that address, or a CONNECT PDU is send to the service discovery component with the service name provided as a parameter.
  2. Verify that the remote Maximum Information Unit MIU of the data link connection is 248 or more octets.
  3. Perform Terminate Connection with Server

Terminate Connection with Server

The purpose this test scenario is to verify that a handover server implementation allows the client to orderly terminate the data link connection. The reason why this is separated from Establish Connection with Server is to be re-usable in other test scenarios.

  1. Perform Establish Connection with Server
  2. Send a Disconnect (DISC) PDU to terminate the data link connection with the connection handover service on the Device Under Test.
  3. Verify that the Device Under Test replies with a Disconnected Mode (DM) PDU.

Sequentially Establish Connection

The purpose of this test scenario is to ensure that a handover server implementation returns to the connectable state after the client has closed the data link connection.

  1. Perform Establish Connection with Server
  2. Perform Terminate Connection with Server
  3. Perform Establish Connection with Server
  4. Perform Terminate Connection with Server

Multiple Messages from Client

The purpose of this test scenario is to ensure that the handover server implementation keeps the data link connection and responds to handover messages until the client terminates. This allows a handover requester to ask for only a specific subset of alternative carriers in a first message to impose a strong preference on the handover selector. It also allows a handover mediator to send a handover initiate message after receiving a handover select message over the same data link connection.

  1. Perform Establish Connection with Server
  2. Send a handover request message with a single alternative carrier of type urn:nfc:ext:nfc-forum.org:x-unknown-carrier-type-1.
  3. Verify that the Device Under Test returns a Handover Select Message with an empty alternative carrier selection.
  4. Send a handover request message with a single alternative carrier of type urn:nfc:ext:nfc-forum.org:x-unknown-carrier-type-2.
  5. Verify that the Device Under Test returns a Handover Select Message with an empty alternative carrier selection.
  6. Perform Terminate Connection with Server

Accept Connection from Client

The purpose of this test scenario is to ensure that a handover client implementation on the Device Under Test establishes the data link connection with an MIU of at least 248 octets.

  1. Activate the local handover server and wait for a data link connection request from the Device Under Test.
  2. Verify that the remote Maximum Information Unit MIU committed with the data link connection request is 248 or more octets.
  3. Confirm the data link connection.
  4. Receive and reply connection handover protocol messages until the client terminates the data link connection.

Handover Request Collision

The connection handover protocol is run by a local client against with a remote server on behalf of an, explicit or implicit, user intention for data sharing. If both devices intend to share data, the local connection handover clients will both connect to the remote servers to send a handover request message and attempt to perform the role of a Handover Requester. In order to proceed with connection handover, one device must switch role to become the Handover Selector and avoid that both devices eventually try to establish the alternative carrier connection. In case that one device has received the handover request message early enough to stop sending, that device will simply switch role and become the Handover Selector. However, if both devices have sent the handover request message, the conflict is resolved by comparing a local and a remote random number that have been mutually exchanged with the handover request messages.

If the sent and received random number are equal, both devices need to again send a handover request message with a newly generated random number. Otherwise, the random numbers are compared to determine the roles, using both the numerical value represented by all 16 bits of the random number and the value of the least significant bit in spearate comparisions. If the least significant bit of both numbers are equal, the device that sent the numerically greater random number continues as the Handover Selector. If the least significant bit of both numbers are different, the device that sent the numerically lower random number continues as the Handover Selector.

  1. Activate the local handover server and wait until data link connection 1 has been established by the Device Under Test.
  2. Perform Establish Connection with Server to get data link connection 2.
  3. Wait to receive a Handover Request Message from the Device Under Test over data link connection 1.
  4. Send a Handover Request Message with the same random number as received from the Device Under Test (using data link connection 2).
  5. Verify that the Device Under Test sends a further Handover Request Message with a different random number (using data link connection 1).
  6. If possible, send a Handover Request Message with a random number that assigns the role of Handover Selector to the Device Under Test (using data link connection 2). Otherwise return to step 4.
  7. Verify that the Device Under Test closes data link connection 1 and returns a Handover Select Message over data link connection 2.
  8. Perform Terminate Connection with Server to close data link connection 2.