6.2.2B Discoveree request procedure for restricted ProSe direct discovery model B

24.3343GPPProximity-services (ProSe) User Equipment (UE) to ProSe function protocol aspectsRelease 17Stage 3TS

6.2.2B.1 General

The purpose of the discoveree request procedure for restricted ProSe direct discovery model B is for the UE to obtain Discovery Query Filter(s) to be used for monitoring a model B query for a Restricted ProSe Application User ID (RPAUID) over the PC5 interface, and a ProSe Response Code to be announced over the PC5 interface as a response to a model B query, as defined in 3GPP TS 23.303 [2].

Before initiating the discoveree request procedure, the UE shall be authorised for restricted ProSe direct discovery model B discoveree operation in the registered PLMN or the local PLMN based on the service authorisation procedure as specified in clause 5.

NOTE: The notion of "local PLMN" does not apply for WLAN-based ProSe direct discovery. The UE can engage in WLAN-based ProSe direct discovery as announcing UE regardless of the serving PLMN or other PLMNs that provide E-UTRAN coverage in the UE location.

As the result of successful completion of this procedure, the UE obtains one or more Discovery Query Filters and applies them to the monitoring operation in PC5 interface. The UE shall also include the ProSe Response Code in a PC5_DISCOVERY message and passes the message to the lower layers for transmission over the PC5 interface, when there is a match of the Discovery Query Filter(s).

6.2.2B.2 Discoveree request procedure initiation

Before initiating the discoveree request procedure, the user sets the permissions for the restricted discovery using application layer mechanisms. The application client in the UE retrieves the PDUID provisioned to the UE as part of the service authorisation procedure as specified in clause 5 and obtains an RPAUID associated with the UE’s PDUID from the ProSe Application Server. The UE may provide metadata to be associated with the RPAUID, and the ProSe Application Server stores the metadata. This step is performed using mechanisms that are out of scope of the present specification.

If the UE is authorised to perform E-UTRA-based restricted ProSe direct discovery model B discoveree operation in the PLMN operating the radio resources signalled from the serving PLMN, or if the UE is authorised to perform WLAN-based restricted ProSe direct discovery model B discoveree operation, it shall initiate a discoveree request procedure:

a) when the UE is triggered by an upper layer application to announce an RPAUID in Model B and the UE has no valid corresponding ProSe Response Code and Discovery Query Filter(s) for that RPAUID of the upper layer application;

b) when the validity timer T4011 assigned by the ProSe Function to a ProSe Response Code and the corresponding Discovery Query Filter(s) has expired and the request from upper layers to announce the RPAUID corresponding to that ProSe Response Code is still in place;

c) when the UE selects a new PLMN while announcing or waiting for announcing a ProSe Response Code and intends to announce in the new PLMN, and the UE is authorised for restricted ProSe direct discovery model B discoveree operation in the new PLMN;

d) when, while announcing or waiting for announcing a ProSe Response Code, the UE intends to switch the announcing PLMN to a different PLMN without performing PLMN selection, and the UE does not have a valid allocated ProSe Response Code for this new PLMN yet; or

e) when the UE needs to update a previously sent restricted ProSe direct discovery model B discoveree request.

When the UE selects a new PLMN while announcing or waiting for announcing a ProSe Response Code and the UE is not yet authorised for restricted ProSe direct discovery model B discoveree operation in the new PLMN, the UE shall initiate a discoveree request procedure only after the UE is authorised for restricted ProSe direct discovery model B discoveree operation in the new PLMN.

NOTE 1: To ensure service continuity if the UE needs to keep announcing in Model B a ProSe Response Code corresponding to the same RPAUID, the UE can initiate the discoveree request procedure before the validity timer T4011 assigned by the ProSe Function for a ProSe Response Code expires.

The UE initiates the discoveree request procedure by sending a DISCOVERY_REQUEST message with:

– a new transaction ID not used in any other direct discovery procedures in PC3 interface;

– the RPAUID set to the RPAUID received from upper layers;

– the command set to "response";

– the UE identity set to the UE’s IMSI;

– the Application Identity set to the Application Identity of the upper layer application that requested the announcing;

– the Discovery Type set to "Restricted discovery";

– the Discovery Model set to "Model B";

– the Discovery Entry ID set to a 0 if the discoveree request is a new request, and set to the Discovery Entry ID received from the ProSe Function if the discoveree request is to update a previously sent discoveree request;

– optionally in case of E-UTRA-based restricted ProSe direct discovery model B discoveree operation, the Announcing PLMN ID set to the PLMN ID of the local PLMN operating the radio resources that the UE intends to use for announcing the RPAUID; and

– optionally the PC5_tech set to the PC5 radio technology that the UE wishes to use. PC5_tech may include more than one PC5 radio technology.

NOTE 2: A UE can include one or multiple transactions in one DISCOVERY_REQUEST message for different RPAUIDs (e.g., for different applications), and receive corresponding <restricted-discoveree-response> element or <response-reject> element in a DISCOVERY_RESPONSE message for each respective transaction. In the following description of the discoveree request procedure, only one transaction is included.

Figure 6.2.2B.2.1 illustrates the interaction of the UE and the ProSe Function in the discoveree request procedure.

Figure 6.2.2B.2.1: Discoveree request procedure for restricted ProSe direct discovery model B

6.2.2B.3 Discoveree request procedure accepted by the ProSe Function

Upon receiving a DISCOVERY_REQUEST message, the ProSe Function shall check that the application corresponding to the Application Identity contained in the DISCOVERY_REQUEST message is authorised for restricted ProSe direct discovery model B discoveree operation. If the application is authorised for restricted ProSe direct discovery model B discoveree operation, the ProSe Function shall check whether there is an existing context for the UE.

If there is no associated UE context, the ProSe Function checks with the HSS whether the UE is authorised for restricted ProSe direct discovery model B discoveree operation as described in 3GPP TS 29.344 [3]. If the check indicates that the UE is authorised, the ProSe Function creates a UE context that contains the UE’s subscription parameters obtained from the HSS. The HSS also provides to the ProSe Function the PLMN ID of the PLMN in which the UE is currently registered.

If the UE context exists, the ProSe Function shall check whether the UE is authorized for restricted ProSe direct discovery model B discoveree operation in the currently registered PLMN or in case of E-UTRA-based restricted ProSe direct discovery model B discoveree operation the local PLMN identified by the Announcing PLMN ID included in the DISCOVERY_REQUEST message.

If the UE is authorized and the Discovery Entry ID included in the DISCOVERY_REQUEST message is set to 0 then:

– the ProSe Function shall check whether the UE is authorised to announce the RPAUID contained in the DISCOVERY_REQUEST message. Optionally this can include checking with the ProSe Application Server as described in 3GPP TS 29.343 [31] to obtain the binding between the RPAUID and PDUID, and then verifying that the PDUID belongs to the requesting UE;

– if the UE is authorised to announce the RPAUID, the ProSe Function shall allocate the corresponding ProSe Response Code and ProSe Query Code for the RPAUID. It shall also allocate Discovery Query Filter(s) based on the allocated ProSe Query Code. Then it shall assign a value for validity timer T4011, which is associated with the ProSe Response Code, PorSe Query Code and Discovery Query Filter(s).

– the ProSe Function associates the allocated ProSe Response Code, ProSe Query Code, and Discovery Query Filter with a new discovery entry ID in the UE context, and starts timer T4012. For a given ProSe Response Code, timer T4012 shall be longer than timer T4011. By default, the value of timer T4012 is 4 minutes greater than the value of timer T4011.

If the Discovery Entry ID included in the DISCOVERY_REQUEST message is not set to 0 and if there is an existing discovery entry for this Discovery Entry ID value in the UE context, the ProSe Function shall either update the discovery entry with a new validity timer T4011, or allocate a new ProSe Response Code, ProSe Query Code and the Discovery Query Filter(s) for the requested RPAUID with a new validity timer T4011, restart timer T4012.

If the Discovery Entry ID contained in the DISCOVERY_REQUEST message is not found in the UE context or there is no UE context in the ProSe Function, the ProSe Function shall behave as if the Discovery Entry ID included in the DISCOVERY_REQUEST message was set to 0, and the ProSe Function shall allocate a new non-zero Discovery Entry ID for this entry.

If a new UE context was created or an existing UE context was updated, and the UE is currently roaming or the Announcing PLMN ID is included in the DISCOVERY_REQUEST message, the ProSe Function checks with the ProSe function of the VPLMN or in case of E-UTRA-based restricted ProSe direct discovery model B discoveree operation the local PLMN identified by the Announcing PLMN ID whether the UE is authorised for restricted ProSe direct discovery model B discoveree operation as described in 3GPP TS 29.345 [5].

The ProSe Function shall then send a DISCOVERY_RESPONSE message containing a <restricted-discoveree-response> element with:

– the transaction ID set to the value of the transaction ID received in the DISCOVERY_REQUEST message from the UE;

– the ProSe Response Code set to the ProSe Response Code allocated for the RPAUID received in the DISCOVERY_REQUEST message;

– one or more ProSe Query Filters set to the ProSe Query Filter(s) used to match a query for the RPAUID received in the DISCOVERY_REQUEST message;

– a Validity Timer T4011 set to the T4011 timer value assigned by the ProSe Function to the ProSe Response Code and the Discovery Query Filter(s);

– the Restricted Security set to a value containing the security-related information for restricted discovery provided by the ProSe Function;

– the Discovery Entry ID set to the ID of the discovery entry associated with this discoveree request in the UE context.

– optionally the PC5_tech set to the one or more PC5 radio technologies that are authorized to be used for the assigned ProSe Response Code.

If timer T4012 expires, the ProSe Function shall remove the discovery entry associated with the corresponding RPAUID from the UE’s context.

6.2.2B.4 Discoveree request procedure completion by the UE

Upon receipt of the DISCOVERY_RESPONSE message, if the transaction ID contained in the <restricted-discoveree-response> element matches the value sent by the UE in a DISCOVERY_REQUEST message with the command set to "response", the UE shall create a new discovery entry or update an existing discovery entry with the ProSe Response Code and Discovery Query Filter(s) received in the DISCOVERY_RESPONSE message and the PLMN ID of the intended announcing PLMN. For this discovery entry, the UE shall stop the validity timer T4011 if running and start the validity timer T4011 with the received value. The UE shall also use the received ProSe Response Code and Discovery Query Filter(s) to replace the old counterparts if they are currently used. This may involve notifying the lower layers to stop announcing the old ProSe Response Code or to stop monitoring with the old Discovery Query Filter(s). Otherwise the UE shall discard the DISCOVERY_RESPONSE message and shall not perform the procedures below.

The UE may apply the received Discovery Query Filter(s) to its monitoring operation. Using the Discovery Query Filter(s) may result in a match event. There is match event when, for any of the masks in a Discovery Query Filter, the output of a bitwise AND operation between the ProSe Query Code contained in the received PC5_DISCOVERY message and the mask, matches the output of a bitwise AND operation between the mask and the code contained in the Discovery Query Filter.

When applying a Discovery Query Filter to a received PC5_DISCOVERY message for the above-mentioned bitwise AND operation, the UE shall use the DUSK, if received as part of the filter in the DISCOVERY_RESPONSE message, and the UTC-based counter generated during the monitoring operation described below, to unscramble the PC5_DISCOVERY message as described in 3GPP TS 33.303 [6]. Then, if a DUCK is included as part of the filter, the UE shall use the DUCK and the UTC-based counter to decrypt the message-specific confidentiality protected portion identified by the Encrypted Bitmask, as described in 3GPP TS 33.303 [6];

NOTE 1: The UE can look for a match on the unencrypted bits first before applying DUCK, to minimise the amount of processing performed before finding a match.

If a DUIK is received as part of the filter, the UE shall use the DUIK and the UTC-based counter to verify the MIC field in the unscrambled PC5_DISCOVERY message.

NOTE 2: The UE needs to verify the MIC field because the match report procedure is not used for checking the MIC of a PC5_DISCOVERY message containing a ProSe Query Code by the ProSe Function.

The UE may instruct the lower layers to start monitoring with Discovery Query Filter(s) and prepare announcing the ProSe Response Code if all of the following conditions are met:

– the UE is currently authorized to perform restricted ProSe direct discovery model B discoveree operation in the registered PLMN or in case of E-UTRA-based restricted ProSe direct discovery model B discoveree operation, the local PLMN operating the radio resources that the UE intends to use;

– the UE has obtained the ProSe Response Code and Discovery Query Filter(s) and the respective validity timer T4011 for the corresponding discovery entry has not expired; and

– a request from upper layers to perform discoveree operation for the RPAUID associated with an authorised Application Identity is still in place.

During the discoveree operation, if one of the above conditions is no longer met, the UE may instruct the lower layers to stop the discoveree operation. When the UE stops discoveree operation, if the lower layers indicate that the UE is required to send a discovery indication to the eNodeB and in case of E-UTRA-based restricted ProSe direct discovery model B discoveree operation the UE is in EMM-CONNECTED mode, the UE shall trigger the corresponding procedure in lower layers as specified in 3GPP TS 36.331 [12].

Once the match of the Discovery Query Filter(s) occurs, the UE process this match event and requests the lower layers to announce the corresponding ProSe Response Code in the PC5 interface as a response, as specified in 3GPP TS 36.331 [12]. In case of E-UTRA-based restricted ProSe direct discovery model B discoveree operation this shall be done only if the lower layers indicate that ProSe direct discovery is supported by the network. In case of E-UTRA-based restricted ProSe direct discovery model B discoveree operation if the UE in EMM-IDLE mode has to request resources for ProSe direct discovery announcing as specified in 3GPP TS 36.331 [12], the UE shall perform a service request procedure or tracking area update procedure as specified in 3GPP TS 24.301 [11]. The UE shall obtain the UTC time for the next discovery transmission opportunity for ProSe direct discovery from the lower layers.

If a valid UTC time is obtained, the UE shall generate the UTC-based counter corresponding to this UTC time as specified in subclause 12.2.2.18. If the resulting UTC-based counter is within Max Offset of the time shown by the clock used for ProSe by the UE, the UE shall use the ProSe Response Code received in the DISCOVERY_RESPONSE message, along with the eight least significant bits of the UTC-based counter, in order to construct a PC5_DISCOVERY message, according to the format defined in subclause 11.2.5.

The UE shall then apply one or more of the DUIK, DUSK or DUCK with the associated Encrypted Bitmask, whichever received in the Restricted Code Security Material parameter of the DISCOVERY_RESPONSE message, along with the UTC-based counter to the PC5_DISCOVERY message, to e.g. generate a MIC value, scramble the message contents or provide confidentiality protection, as specified in 3GPP TS 33.303 [6].

The UE then passes the resulting PC5_DISCOVERY message, along with the PLMN ID of the intended announcing PLMN, to the lower layers for transmission.

For each match event with the Discovery Query Filter(s), the UE shall at least pass PC5_DISCOVERY message once to the lower layers for transmission. The UE shall ensure that it keeps on passing PC5_DISCOVERY messages to the lower layers for transmission as response(s) to the match event(s) of the corresponding Discovery Query Filter(s) until the validity timer T4011 expires. How this is achieved is left up to UE implementation.

6.2.2B.5 Discoveree request procedure not accepted by the ProSe Function

If the DISCOVERY_REQUEST message cannot be accepted by the ProSe Function, the ProSe Function sends a DISCOVERY_RESPONSE message containing a <response-reject> element to the UE including an appropriate PC3 Control Protocol cause value.

If the application corresponding to the Application Identity contained in the DISCOVERY_REQUEST message is not authorised for ProSe direct discovery Model B discoveree operation, the ProSe Function shall send the DISCOVERY_RESPONSE message containing a <response-reject> element with PC3 Control Protocol cause value #1 "Invalid application".

If the RPAUID contained in the DISCOVERY_REQUEST message is unknown to the ProSe Function or ProSe Application Server, the ProSe Function shall send a DISCOVERY_RESPONSE message containing a <response-reject> element with PC3 Control Protocol cause value #9 "Unknown RPAUID".

If the RPAUID contained in the DISCOVERY_REQUEST message does not match the stored RPAUID for the requested Discovery Entry ID, the ProSe Function shall send a DISCOVERY_RESPONSE message containing a <response-reject> element with PC3 Control Protocol cause value #10 "Unknown or Invalid Discovery Entry ID".

If the UE is not authorised for restricted ProSe direct discovery model B discoveree operation, the ProSe Function shall send the DISCOVERY_RESPONSE message containing a <response-reject> element with PC3 Control Protocol cause value #3 "UE authorisation failure".

If the RPAUID contained in the DISCOVERY_REQUEST message is not associated with a PDUID belonging to the requesting UE, the ProSe Function shall send a DISCOVERY_RESPONSE message containing a <response-reject> element with PC3 Control Protocol cause value #3 "UE authorisation Failure".

6.2.2B.6 Abnormal cases

6.2.2B.6.1 Abnormal cases in the UE

The following abnormal cases can be identified:

a) Indication from the transport layer of transmission failure of DISCOVERY_REQUEST message (e.g. after TCP retransmission timeout)

The UE shall close the existing secure connection to the ProSe Function, establish a new secure connection and then restart the discoveree request procedure.

b) No response from the ProSe Function after the DISCOVERY_REQUEST message has been successfully delivered (e.g., TCP ACK has been received for the DISCOVERY_REQUEST message)

The UE shall retransmit the DISCOVERY_REQUEST message.

NOTE: The timer to trigger retransmission and the maximum number of allowed retransmissions are UE implementation specific.

c) Indication from upper layers that the request to announce the RPAUID in model B is no longer in place after sending the DISCOVERY_REQUEST message, but before the discoveree request procedure is completed

The UE shall acknowledge the DISCOVERY_RESPONSE message received from the ProSe Function but discard its contents and then abort the procedure.

d) Change of PLMN

If a PLMN change occurs before the discoveree request procedure is completed, the procedure shall be aborted. If the UE is authorized to perform restricted ProSe direct discovery model B discoveree operation in the new PLMN, the procedure shall be restarted once the UE is registered on the new PLMN.

6.2.2B.6.2 Abnormal cases in the ProSe Function

The following abnormal cases can be identified:

a) Indication from the lower layer of transmission failure of DISCOVERY_RESPONSE message

After receiving an indication from lower layer that the DISCOVERY_RESPONSE message has not been successfully acknowledged (e.g. TCP ACK is not received), the ProSe Function shall abort the procedure, and stop any associated timer(s) T4012, if running.