6.2.14 5G ProSe direct discovery procedure over PC5 interface

24.5543GPPProximity-services (ProSe) in 5G System (5GS) protocol aspectsRelease 17Stage 3TS

6.2.14.1 General

This clause describes the procedures for 5G ProSe direct discovery procedure over PC5 interface. The purpose of the 5G ProSe direct discovery procedure over PC5 interface is to enable a ProSe-enabled UE to detect and identify another ProSe-enabled UE over PC5 interface.

To perform 5G ProSe direct discovery procedure over PC5 interface, the UE is configured with the related information as described in clause 5.2.3 and the UE interacts with 5G DDNMF as specified in clause 6.2 when it is in coverage to obtain the related parameters (e.g. ProSe application code, ProSe restricted code).

The following models for 5G ProSe direct discovery procedure over PC5 interface as specified in 3GPP TS 23.304 [2] are supported:

a) Model A uses a single discovery protocol message (Announcement); and

b) Model B uses two discovery protocol messages (Solicitation and Response).

NOTE: If the UE is authorized to perform both 5G ProSe direct discovery Model A and 5G ProSe direct discovery Model B, it is up to UE implementation to select which model to perform or perform both models simultaneously.

The UE may use the PC5 DRX mechanism to perform 5G ProSe direct discovery over PC5 interface when the UE is not served by NG-RAN as specified in clause 5.2.3.

The following procedures are defined for 5G ProSe direct discovery procedure over PC5 interface:

a) 5G ProSe direct discovery procedure over PC5 interface with Model A:

1) Announcing UE procedure for 5G ProSe direct discovery initiation;

2) Announcing UE procedure for 5G ProSe direct discovery completion;

3) Monitoring UE procedure for 5G ProSe direct discovery initiation; and

4) Monitoring UE procedure for 5G ProSe direct discovery completion; and

b) 5G ProSe direct discovery procedure over PC5 interface with Model B:

1) Discoverer UE procedure for 5G ProSe direct discovery initiation;

2) Discoverer UE procedure for 5G ProSe direct discovery completion;

3) Discoveree UE procedure for 5G ProSe direct discovery initiation; and

4) Discoveree UE procedure for 5G ProSe direct discovery completion.

6.2.14.2 Procedures

6.2.14.2.1 5G ProSe direct discovery procedure over PC5 interface with model A
6.2.14.2.1.1 General

In this procedure, the UE sending the PROSE PC5 DISCOVERY message is called the "announcing UE" and the "monitoring UE" is the UE that triggers the lower layer to start monitoring for PROSE PC5 DISCOVERY message.

6.2.14.2.1.2 Announcing UE procedure for 5G ProSe direct discovery initiation

The UE is authorised to perform the announcing UE procedure for 5G ProSe direct discovery if:

a) the UE is not served by NG-RAN, is authorised to perform 5G ProSe direct discovery using announcing procedure when the UE is not served by NG-RAN and is configured with the radio parameters to be used for 5G ProSe direct discovery when not served by NG-RAN;

b) the UE is served by NG-RAN and is authorised to perform 5G ProSe direct discovery using announcing in the PLMN indicated by the serving cell; or

c) the UE is:

1) in 5GMM-IDLE mode, in limited service state as specified in 3GPP TS 23.122 [14] and the reason for the UE being in limited service state is one of the following:

i) the UE is unable to find a suitable cell in the selected PLMN as specified in 3GPP TS 38.304 [15];

ii) the UE received a REGISTRATION REJECT message or a SERVICE REJECT message with the 5GMM cause #11 "PLMN not allowed" as specified in 3GPP TS 24.501 [11]; or

iii) the UE received a REGISTRATION REJECT message or a SERVICE REJECT message with the 5GMM cause #7 "5GS services not allowed " as specified in 3GPP TS 24.501 [11]; and

2) authorised to perform 5G ProSe direct discovery using announcing when the UE is not served by NG-RAN; and:

i) configured with the radio parameters to be used for 5G ProSe direct discovery when not served by NG-RAN; or

ii) the lower layers indicate that the UE does not need to request resources for 5G ProSe direct discovery procedure.

NOTE 1: When the lower layers indicate that the UE does not need to request resources for 5G ProSe direct discovery procedure, the serving cell broadcasts a common radio resources pool for ProSe discovery transmission and the UE can use this common radio resources pool while in limited service state.

otherwise, the UE is not authorised to perform the announcing UE procedure for 5G ProSe direct discovery.

Figure 6.2.14.2.1.2.1 illustrates the interaction of the UEs in the announcing UE procedure for 5G ProSe direct discovery.

Figure 6.2.14.2.1.2.1: Announcing UE procedure for 5G ProSe direct discovery

When the UE is triggered by an upper layer application to perform announcing UE procedure for 5G ProSe direct discovery announcing procedure, if the UE is authorised to perform the announcing UE procedure for 5G ProSe direct discovery, then the UE:

a) if the UE is served by NG-RAN and the UE in 5GMM-IDLE mode needs to request resources for sending PROSE PC5 DISCOVERY messages as specified in 3GPP TS 38.331 [13], shall perform a service request procedure as specified in 3GPP TS 24.501 [11];

b) shall obtain a valid UTC time for the discovery transmission from the lower layers and generate the UTC-based counter corresponding to this UTC time;

c) shall generate a PROSE PC5 DISCOVERY message for 5G ProSe direct discovery announcement if the resulting UTC-based counter is within the max offset of the time shown by the clock used for ProSe by the UE and if the timer T5060 or T5062 does not expire. In the PROSE PC5 DISCOVERY message for direct discovery announcement, the UE:

1) shall set the ProSe direct discovery PC5 message type parameter as specified in table 10.2.1.1 or table 10.2.1.2;

2) shall include either ProSe application code or ProSe restricted code;

3) shall include the MIC field computed as described in 3GPP TS 33.503 [34], by using the UTC-based counter and the discovery key contained in the <response-announce> element of the DISCOVERY_RESPONSE message for open 5G ProSe direct discovery, or using the UTC-based counter and the DUIK contained in the <restricted-announce-response> element of the DISCOVERY_RESPONSE message for restricted 5G ProSe direct discovery model A;

4) may include the Metadata IE to provide the application layer metadata information; and

5) shall set the UTC-based counter LSB parameter to the 4 least significant bits of the UTC-based counter;

d) shall apply the DUIK, DUSK, or DUCK with the associated Encrypted Bitmask, along with the UTC-based counter to the PROSE PC5 DISCOVERY message for whichever security mechanism(s) configured to be applied, e.g., integrity protection, message scrambling or confidentiality protection of one or more above parameters, as specified in 3GPP TS 33.503[34], for restricted 5G ProSe direct discovery;

e) shall set the destination layer-2 ID to the default destination layer-2 ID as specified in clause 5.2.3 and self-assign a source layer-2 ID for sending the direct discovery announcement; and

NOTE 2: The UE implementation ensures that the value of the self-assigned source layer-2 ID is different from any other self-assigned source layer-2 ID(s) in use for 5G ProSe direct communication as specified in clause 7.2, is different from any other provisioned destination layer-2 ID(s) as specified in clause 5.2 and is different from any other self-assigned source layer-2 ID in use for a simultaneous 5G ProSe direct discovery procedure over PC5 with a different discovery model as specified in clause 6.2.14.2.2.2, clause 6.2.15.2.2.2 and clause 8.2.1.3.1.2.

f) shall pass the resulting PROSE PC5 DISCOVERY message along with the source layer-2 ID and destination layer-2 ID for direct discovery announcement and an indication that the message is for 5G ProSe direct discovery to the lower layers for transmission over the PC5 interface.

In case of open 5G ProSe direct discovery, the UE shall either use the ProSe application code received in the DISCOVERY_RESPONSE message from the 5G DDNMF, or select one ProSe application code based on the ProSe application code prefix and ProSe application code suffix range(s) received in the DISCOVERY_RESPONSE message from the 5G DDNMF as announced ProSe application code, along with the MIC and the four least significant bits of the UTC-based counter.

NOTE 2: The UE can use different codes formed based on different ProSe application code suffixes to announce, without having to send a new request to the 5G DDNMF, as long as the validity timer T5060 of the ProSe application code prefix has not expired.

In case of restricted 5G ProSe direct discovery model A, the UE shall either use the ProSe restricted code received in the DISCOVERY_RESPONSE message, or select one ProSe restricted code based on the ProSe restricted code prefix and ProSe restricted code suffix range(s) received in the DISCOVERY_RESPONSE message from the 5G DDNMF as announced ProSe restricted code, along with the 4 least significant bits of the UTC-based counter.

NOTE 3: The UE can use different codes formed based on different ProSe restricted code suffixes to announce, without having to send a new DISCOVERY_REQUEST message to the 5G DDNMF, as long as the validity timer T5062 of the ProSe restricted code prefix has not expired.

The announcing UE shall ensure that it keeps on passing the same PROSE PC5 DISCOVERY message to the lower layers for transmission until the request from upper layers to perform announcing UE procedure for 5G ProSe direct discovery is still in place, or the validity timer of the ProSe application code or ProSe application code prefix in case of open 5G ProSe direct discovery or the validity timer of the ProSe restricted code or ProSe restricted code prefix in case of restricted 5G ProSe direct discovery expires. How this is achieved is left up to UE implementation.

NOTE 4: The announcing UE can stop announcing UE procedure for 5G ProSe direct discovery for power saving by implementation specific means e.g. an implementation-specific maximum number of 5G ProSe direct links configured in the UE, or an implementation-specific timer expires.

6.2.14.2.1.3 Announcing UE procedure for 5G ProSe direct discovery completion

When the request from upper layers to perform announcing UE procedure for 5G ProSe direct discovery is not in place, or the validity timer of the ProSe application code or ProSe application code prefix in case of open 5G ProSe direct discovery or the validity timer of the ProSe restricted code or ProSe restricted code prefix in case of restricted 5G ProSe direct discovery expires, the UE may instruct the lower layers to stop announcing.

NOTE: The announcing UE can stop announcing UE procedure for 5G ProSe direct discovery for power saving by implementation specific means e.g. an implementation-specific maximum number of 5G ProSe direct links configured in the UE, or an implementation-specific timer expires.

When the UE stops announcing, if the UE is in 5GMM-CONNECTED mode, the UE shall trigger the corresponding procedure in lower layers as specified in 3GPP TS 38.331 [13].

6.2.14.2.1.4 Monitoring UE procedure for 5G ProSe direct discovery initiation

The UE is authorised to perform the monitoring UE procedure for 5G ProSe direct discovery if:

a) the UE is not served by NG-RAN, is authorised to perform 5G ProSe direct discovery using monitoring when the UE is not served by NG-RAN and is configured with the radio parameters to be used for 5G ProSe direct discovery when not served by NG-RAN;

b) the UE is served by NG-RAN and is authorised to perform 5G ProSe direct discovery monitoring in at least one PLMN; or

c) the UE is:

1) in 5GMM-IDLE mode, in limited service state as specified in 3GPP TS 23.122 [14] and the reason for the UE being in limited service state is one of the following:

i) the UE is unable to find a suitable cell in the selected PLMN as specified in 3GPP TS 38.304 [15];

ii) the UE received a REGISTRATION REJECT message or a SERVICE REJECT message with the 5GMM cause #11 "PLMN not allowed" as specified in 3GPP TS 24.501 [11]; or

iii) the UE received a REGISTRATION REJECT message or a SERVICE REJECT message with the 5GMM cause #7 "5GS services not allowed" as specified in 3GPP TS 24.501 [11]; and

2) authorised to perform 5G ProSe direct discovery using monitoring when the UE is not served by NG-RAN; and:

i) configured with the radio parameters to be used for 5G ProSe direct discovery when not served by NG-RAN; or

ii) the lower layers indicate that the UE does not need to request resources for 5G ProSe direct discovery procedure.

NOTE 1: When the lower layers indicate that the UE does not need to request resources for 5G ProSe direct discovery procedure, the serving cell broadcasts a common radio resources pool for ProSe discovery transmission and the UE can use this common radio resources pool while in limited service state.

otherwise, the UE is not authorised to perform the monitoring UE procedure for 5G ProSe direct discovery procedure.

Figure 6.2.14.2.1.4.1 illustrates the interaction of the UEs in the monitoring UE procedure for 5G ProSe direct discovery procedure.

Figure 6.2.14.2.1.4.1: Monitoring UE procedure for 5G ProSe direct discovery

When the UE is triggered by an upper layer application to perform monitoring UE procedure for 5G ProSe direct discovery for a ProSe application code or ProSe restricted code; and:

a) if the UE is authorised to perform the monitoring UE procedure for 5G ProSe direct discovery;

b) if the difference between UTC-based counter associated with that discovery slot and UE’s ProSe clock is not greater than the max offset of the monitoring UE’s ProSe clock; and

c) if the timer T5060 or T5062 does not expire;

then the UE shall instruct the lower layers to start monitoring for PROSE PC5 DISCOVERY message.

In the case of restricted 5G ProSe direct discovery, upon reception of a PROSE PC5 DISCOVERY message for 5G ProSe direct discovery announcement for the destination layer-2 ID to be monitored, the UE shall use the associated DUSK, if received from the 5G DDNMF and the UTC-based counter obtained during the monitoring operation to unscramble the PROSE PC5 DISCOVERY message as described in 3GPP TS 33.503 [34]. Then, if a DUCK is received from the 5G DDNMF, the UE shall use the DUCK and the UTC-based counter to decrypt the configured message-specific confidentiality-protected portion, as described in 3GPP TS 33.503 [34]. Finally, if a DUIK is received from the 5G DDNMF, the UE shall use the DUIK and UTC-based counter to verify the MIC field in the unscrambled PROSE PC5 DISCOVERY message for 5G ProSe direct discovery announcement.

NOTE 2: The use of an erroneous UTC-based counter for processing received PROSE PC5 DISCOVERY messages at the ProSe-enabled UE can cause MIC check failure after DUIK is used for integrity check and malformed contents after DUSK is used for unscrambling or DUCK is used for deciphering. How a ProSe-enabled UE ensures the accuracy of the UTC-based counter is left to UE implementation.

NOTE 3: The UE can determine the received PROSE PC5 DISCOVERY message for 5G ProSe direct discovery announcement is for 5G ProSe direct discovery based on an indication from the lower layer.

In case of open 5G ProSe direct discovery, for a ProSe application ID requested by the monitoring UE, the 5G DDNMF may have assigned one or more discovery filters. If application-controlled extension is used, the UE may further apply additional filtering on the part corresponding to the ProSe application code suffix. The UE should apply all assigned discovery filters to its monitoring operation. Using these discovery filters may result in a match event. The UE shall consider that the ProSe application code it seeks to monitor has been discovered if there is a match event as following:

When, for any of the ProSe application masks in a discovery filter, the output of a bitwise AND operation between the ProSe application code contained in the received PROSE PC5 DISCOVERY message and the ProSe application mask, matches the output of a bitwise AND operation between the ProSe application mask and the ProSe application code contained in the same discovery filter.

NOTE 4: A ProSe application mask with all bits set to "1" is assigned by the 5G DDNMF for full matching.

In case of restricted 5G ProSe direct discovery model A, the UE provides the application level container, which contains the authorized Target RPAUID(s), to the upper layer applications. For each authorized target RPAUID, the 5G DDNMF may have assigned one or more restricted discovery filters. If application-controlled extension is used, the UE may further apply additional filtering on the part corresponding to the ProSe restricted code suffix. The UE should then apply all restricted discovery filters to its monitoring operation. Using these restricted discovery filters may result in a match event. The UE shall consider that the target RPAUID it seeks to monitor has been discovered if there is a match event as follows:

When, for any of the masks in a restricted discovery filter, the output of a bitwise AND operation between the ProSe restricted code contained in the received PROSE PC5 DISCOVERY message and the mask, matches the output of a bitwise AND operation between the mask and the code contained in the same restricted discovery filter.

NOTE 5: In a restricted discovery filter, a mask with all bits set to "1" is assigned by the 5G DDNMF for full matching of a ProSe restricted code.

6.2.14.2.1.5 Monitoring UE procedure for 5G ProSe direct discovery completion

During the monitoring UE procedure for 5G ProSe direct discovery, if the request from upper layers to perform the monitoring UE procedure for 5G ProSe direct discovery is not in place, or if the validity timer of the discovery filter or the validity timer of the Restricted discovery filter expires, the UE may instruct the lower layers to stop monitoring.

When the UE stops monitoring, if the UE is in 5GMM-CONNECTED mode, the UE shall trigger the corresponding procedure in lower layers as specified in 3GPP TS 38.331 [13].

6.2.14.2.2 5G ProSe direct discovery procedure over PC5 interface with model B
6.2.14.2.2.1 General

In this procedure, the UE sending the PROSE PC5 DISCOVERY message is called the "Discoverer UE" and the other UE is called the "Discoveree UE".

6.2.14.2.2.2 Discoverer UE procedure for 5G ProSe direct discovery initiation

The UE is authorised to perform the discoverer UE procedure for 5G ProSe direct discovery if:

a) the UE is not served by NG-RAN, is authorised to perform 5G ProSe direct discovery discoverer operation when the UE is not served by NG-RAN and is configured with the radio parameters to be used for 5G ProSe direct discovery when not served by NG-RAN;

b) the UE is served by NG-RAN and is authorised to perform 5G ProSe direct discovery discoverer operation in the PLMN indicated by the serving cell; or

c) the UE is:

1) in 5GMM-IDLE mode, in limited service state as specified in 3GPP TS 23.122 [14] and the reason for the UE being in limited service state is one of the following:

i) the UE is unable to find a suitable cell in the selected PLMN as specified in 3GPP TS 38.304 [15];

ii) the UE received a REGISTRATION REJECT message or a SERVICE REJECT message with the 5GMM cause #11 "PLMN not allowed" as specified in 3GPP TS 24.501 [11]; or

iii) the UE received a REGISTRATION REJECT message or a SERVICE REJECT message with the 5GMM cause #7 "5GS services not allowed" as specified in 3GPP TS 24.501 [11]; and

2) authorised to perform 5G ProSe direct discovery discoverer operation when the UE is not served by NG-RAN; and:

i) configured with the radio parameters to be used for 5G ProSe direct discovery use when not served by NG-RAN; or

ii) the lower layers indicate that the UE does not need to request resources for 5G ProSe direct discovery procedure.

NOTE 1: When the lower layers indicate that the UE does not need to request resources for 5G ProSe direct discovery procedure, the serving cell broadcasts a common radio resources pool for ProSe discovery transmission and the UE can use this common radio resources pool while in limited service state.

otherwise, the UE is not authorised to perform the discoverer UE procedure for 5G ProSe direct discovery.

Figure 6.2.14.2.2.2.1 illustrates the interaction of the UEs in the discoverer UE procedure for 5G ProSe direct discovery.

Figure 6.2.14.2.2.2.1: Discoverer UE procedure for 5G ProSe direct discovery

When the UE is triggered by an upper layer application to query the target RPAUID in restricted discovery Model B, associated with both the ProSe query code and the authorised ProSe identifier; and

a) if the UE is authorised to perform the discoverer UE procedure for 5G ProSe direct discovery in the registered PLMN or the local PLMN operating the radio resources that the UE intends to use; and

b) if the validity timer T5070 for the ProSe query code and corresponding ProSe Response Filter(s) has not expired,

then the UE:

a) if the UE is served by NG-RAN and the UE in 5GMM-IDLE mode needs to request resources for sending PROSE PC5 DISCOVERY messages as specified in 3GPP TS 38.331 [13], shall perform a service request procedure as specified in 3GPP TS 24.501 [11];

b) shall obtain a valid UTC time for the discovery transmission from the lower layers and generate the UTC-based counter corresponding to this UTC time and 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 for each ProSe query code in this discovery entry, use the ProSe query code to construct a PROSE PC5 DISCOVERY message as below;

c) shall generate a PROSE PC5 DISCOVERY message for 5G ProSe direct discovery solicitation. In the PROSE PC5 DISCOVERY message for 5G ProSe direct discovery solicitation, the UE:

1) shall set the ProSe direct discovery PC5 message type parameter as specified in table 10.2.1.3;

2) shall include ProSe query code;

3) shall include the MIC field computed as described in 3GPP TS 33.503 [34] by using the UTC-based counter and the DUIK contained in the <restricted-discoverer-response > element of the DISCOVERY_RESPONSE message; and

4) shall set the UTC-based counter LSB parameter to the 4 least significant bits of the UTC-based counter;

d) shall apply the DUIK, DUSK, or DUCK with the associated encrypted bitmask, along with the UTC-based counter to the PROSE PC5 DISCOVERY message for whichever security mechanism(s) configured to be applied, e.g., integrity protection, message scrambling or confidentiality protection of one or more above parameters, as specified in 3GPP TS 33.503 [34];

e) shall set the destination layer-2 ID to the default destination layer-2 ID as specified in clause 5.2.3 and self-assign a source layer-2 ID for sending the direct discovery announcement; and

NOTE 2: The UE implementation ensures that the value of the self-assigned source layer-2 ID is different from any other self-assigned source layer-2 ID(s) in use for 5G ProSe direct communication as specified in clause 7.2, is different from any other provisioned destination layer-2 ID(s) as specified in clause 5.2 and is different from any other self-assigned source layer-2 ID in use for a simultaneous 5G ProSe direct discovery procedure over PC5 with a different discovery model as specified in clause 6.2.14.2.1.2, clause 6.2.15.2.1.2, clause 8.2.1.2.2.2 and clause 8.2.1.2.4.2.

f) shall pass the resulting PROSE PC5 DISCOVERY message along with the source layer-2 ID and destination layer-2 ID for 5G ProSe direct discovery solicitation and the PLMN ID of the intended announcing PLMN if available in the discovery entry and an indication that the message is for 5G ProSe direct discovery to the lower layers for transmission over the PC5 interface and shall instruct the lower layer to start monitoring.

The UE shall ensure that it keeps on passing the same PROSE PC5 DISCOVERY message to the lower layers for transmission until the validity timer T5070 of the ProSe query code expires, or until the request from upper layers to query the target RPAUID in restricted discovery Model B, associated with both the ProSe query code and the authorised application identity, is not in place. How this is achieved is left up to UE implementation.

NOTE 3: The discoverer UE can stop discoverer UE procedure for 5G ProSe direct discovery for power saving by implementation specific means e.g. an implementation-specific maximum number of 5G ProSe direct links configured in the UE, or an implementation-specific timer expires.

The UE may apply the discovery response filter(s) received from the 5G DDNMF to its monitoring operation. Using the discovery response filter may result in a match event for the target RPAUID the UE is querying for. There is match event when, for any of the masks in a discovery response filter, the output of a bitwise AND operation between the ProSe response code contained in the received PROSE PC5 DISCOVERY message and the mask, matches the output of a bitwise AND operation between the mask and the code contained in the discovery response filter.

Upon reception of a PROSE PC5 DISCOVERY message for direct discovery response, for the target destination layer-2 ID of the direct discovery to be discovered, the UE shall use the associated DUSK, if received from the 5G DDNMF and the UTC-based counter obtained during the monitoring operation to unscramble the PROSE PC5 DISCOVERY message as described in 3GPP TS 33.503 [34]. Then, if a DUCK is received from the 5G DDNMF, the UE shall use the DUCK and the UTC-based counter to decrypt the configured message-specific confidentiality-protected portion, as described in 3GPP TS 33.503 [34]. Finally, if a DUIK is received from the 5G DDNMF, the UE shall use the DUIK and UTC-based counter to verify the MIC field in the unscrambled PROSE PC5 DISCOVERY message for direct discovery response. If a MIC Check Indicator parameter is included instead, the UE shall use the match report procedure described in clause 6.2.10 to trigger checking of the MIC of the PROSE PC5 DISCOVERY message containing the ProSe response code by the 5G DDNMF.

The UE may notify the upper layer application about the match event of restricted 5G ProSe direct discovery model B with the corresponding target RPAUID and metadata, if the RPAUID and metadata are included in the Subquery result element in the DISCOVERY_RESPONSE message from the 5G DDNMF.

6.2.14.2.2.3 Discoverer UE procedure for 5G ProSe direct discovery completion

During the discoverer operation, if

a) the validity timer T5070 for the ProSe query code and corresponding ProSe Response Filter(s) has expired; and

b) the request from upper layers to query the target RPAUID in restricted discovery Model B, associated with both the ProSe query code and the authorised ProSe identifier, is not in place,

NOTE: The discoverer UE can stop discoverer UE procedure for 5G ProSe direct discovery for power saving by implementation specific means e.g. an implementation-specific maximum number of 5G ProSe direct links configured in the UE, or an implementation-specific timer expires.

then the UE may instruct the lower layers to stop the discoverer operation. When the UE stops discoverer operation, if the UE is in 5GMM-CONNECTED mode, the UE shall trigger the corresponding procedure in lower layers as specified in 3GPP TS 38.331 [13].

6.2.14.2.2.4 Discoveree UE procedure for 5G ProSe direct discovery initiation

The UE is authorised to perform the discoveree UE procedure for 5G ProSe direct discovery if:

a) the UE is not served by NG-RAN, is authorised to perform 5G ProSe direct discovery discoveree operation when the UE is not served by NG-RAN and is configured with the radio parameters to be used for 5G ProSe direct discovery when not served by NG-RAN;

b) the UE is served by NG-RAN and is authorised to perform 5G ProSe direct discovery discoverer operation in the PLMN indicated by the serving cell; or

c) the UE is:

1) in 5GMM-IDLE mode, in limited service state as specified in 3GPP TS 23.122 [14] and the reason for the UE being in limited service state is one of the following:

i) the UE is unable to find a suitable cell in the selected PLMN as specified in 3GPP TS 38.304 [15];

ii) the UE received a REGISTRATION REJECT message or a SERVICE REJECT message with the 5GMM cause #11 "PLMN not allowed" as specified in 3GPP TS 24.501 [11]; or

iii) the UE received a REGISTRATION REJECT message or a SERVICE REJECT message with the 5GMM cause #7 "5GS services not allowed" as specified in 3GPP TS 24.501 [11]; and

2) authorised to perform 5G ProSe direct discovery discoverer operation when the UE is not served by NG-RAN; and:

i) configured with the radio parameters to be used for 5G ProSe direct discovery use when not served by NG-RAN; or

ii) the lower layers indicate that the UE does not need to request resources for 5G ProSe direct discovery procedure.

NOTE 1: When the lower layers indicate that the UE does not need to request resources for 5G ProSe direct discovery procedure, the serving cell broadcasts a common radio resources pool for ProSe discovery transmission and the UE can use this common radio resources pool while in limited service state.

otherwise, the UE is not authorised to perform the discoveree UE procedure for 5G ProSe direct discovery.

Figure 6.2.14.2.2.4.1 illustrates the interaction of the UEs in the discoveree UE procedure for 5G ProSe direct discovery.

Figure 6.2.14.2.2.4.1: Discoveree UE procedure for 5G ProSe direct discovery

When the UE is triggered by an upper layer application to perform discoveree operation for the RPAUID associated with an authorized ProSe identifier; and if:

a) the UE is authorised to perform the discoveree UE procedure for 5G ProSe direct discovery;

b) the UE has obtained the ProSe response code and discovery query filter(s) and the respective validity timer T5068 for the corresponding discovery entry has not expired; and

c) the difference between UTC-based counter associated with that discovery slot and UE’s ProSe clock is not greater than the max offset of the monitoring UE’s ProSe clock,

then the UE:

a) if the UE is served by NG-RAN and the UE in 5GMM-IDLE mode needs to request resources for sending PROSE PC5 DISCOVERY messages as specified in 3GPP TS 38.331 [13], shall perform a service request procedure or registration procedure as specified in 3GPP TS 24.501 [11]; and

b) shall instruct the lower layers to start monitoring for PROSE PC5 DISCOVERY messages as specified in 3GPP TS 38.331 [13].

The UE may apply the discovery query filter(s) received from the 5G DDNMF 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 PROSE 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.

Upon reception of a PROSE PC5 DISCOVERY message for direct discovery solicitation for the destination layer-2 ID which the UE is configured to respond for, with applying a discovery query filter to a received PROSE PC5 DISCOVERY message for the above-mentioned bitwise AND operation, the UE shall use the associated DUSK, if received from the 5G DDNMF and the UTC-based counter obtained during the monitoring operation to unscramble the PROSE PC5 DISCOVERY message as described in 3GPP TS 33.503 [34]. Then, if a DUCK is received from the 5G DDNMF, the UE shall use the DUCK and the UTC-based counter to decrypt the configured message-specific confidentiality protected portion, as described in 3GPP TS 33.503 [34]. Finally, if a DUIK is received from the 5G DDNMF, the UE shall use the DUIK and UTC-based counter to verify the MIC field in the unscrambled PROSE PC5 DISCOVERY message for direct discovery solicitation.

NOTE 2: 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.

NOTE 3: The UE needs to verify the MIC field because the match report procedure is not used for checking the MIC of a PROSE PC5 DISCOVERY message containing a ProSe query code by the 5G DDNMF.

NOTE 4: The UE can determine the received PROSE PC5 DISCOVERY message for direct discovery solicitation is for 5G ProSe direct discovery based on an indication from the lower layer.

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 38.331 [13]. If the UE in 5GMM-IDLE mode has to request resources for 5G ProSe direct discovery announcing as specified in 3GPP TS 38.331 [13], the UE shall perform a service request procedure or registration procedure as specified in 3GPP TS 24.501 [11]. The UE shall obtain a valid UTC time for the discovery transmission from the lower layers and generate the UTC-based counter corresponding to this UTC time. 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 from the 5G DDNMF. The UE shall generate a PROSE PC5 DISCOVERY message for 5G ProSe direct discovery response. In the PROSE PC5 DISCOVERY message for 5G ProSe direct discovery response, the UE:

a) shall set the ProSe direct discovery PC5 message type parameter as specified in table 10.2.1.4;

b) shall include ProSe response code;

c) shall include the MIC field computed as described in 3GPP TS 33.503 [34] by using the UTC-based counter and the DUIK contained in the <restricted-discoveree-response> element of the DISCOVERY_RESPONSE message;

d) may include the Metadata IE to provide the application layer metadata information; and

e) shall set the UTC-based counter LSB parameter to the 4 least significant bits of the UTC-based counter.

After generating the PROSE PC5 DISCOVERY message for 5G ProSe direct discovery response, the UE:

a) shall set the destination layer-2 ID to the source layer-2 ID of the received message and self-assign a source layer-2 ID for sending the direct discovery response message;

NOTE 5: The UE implementation ensures that the value of the self-assigned source layer-2 ID is different from any other self-assigned source layer-2 ID(s) in use for 5G ProSe direct communication as specified in clause 7.2 and is different from any other provisioned destination layer-2 ID(s) as specified in clause 5.2.

b) shall apply the DUIK, DUSK, or DUCK with the associated encrypted bitmask, along with the UTC-based counter to the PROSE PC5 DISCOVERY message for whichever security mechanism(s) configured to be applied, e.g., integrity protection, message scrambling or confidentiality protection of one or more above parameters, as specified in 3GPP TS 33.503 [34]; and

c) shall pass the resulting PROSE PC5 DISCOVERY message along with the source layer-2 ID and destination layer-2 ID for 5G ProSe direct discovery response, the PLMN ID of the intended announcing PLMN and an indication that the message is for 5G ProSe direct discovery to the lower layers for transmission over the PC5 interface.

NOTE 6: If the UE is processing a PROSE DIRECT LINK ESTABLISHMENT REQUEST message from the same source layer-2 ID of the received PROSE PC5 DISCOVERY message for direct discovery solicitation, it depends on UE implementation to avoid the conflict of destination layer-2 ID (e.g. send a PROSE DIRECT LINK ESTABLISHMENT REJECT message containing PC5 signalling protocol cause value #3 "conflict of layer-2 ID for unicast communication is detected", or ignore the PROSE DIRECT DISCOVERY message for direct discovery solicitation).

For each match event with the discovery query filter(s), the UE shall at least pass PROSE PC5 DISCOVERY message once to the lower layers for transmission. The UE shall ensure that it keeps on passing PROSE 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 T5068 expires. How this is achieved is left up to UE implementation.

6.2.14.2.2.5 Discoveree UE procedure for 5G ProSe direct discovery completion

During the discoveree operation, if

a) the validity timer T5068 for the ProSe response code and corresponding discovery query filter(s) has expired; and

b) the request from upper layers to perform discoveree operation for the RPAUID associated with an authorized ProSe identifier is not in place, then

the UE may instruct the lower layers to stop monitoring.

When the UE stops monitoring, if the lower layers indicate that the UE is required to send a discovery indication to the NG-RAN and the UE is in 5GMM-CONNECTED mode, the UE shall trigger the corresponding procedure in lower layers as specified in 3GPP TS 38.331 [13].