Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ASN and NGAP files to 3GPP Release 17 #739

Merged
merged 2 commits into from
Dec 10, 2024

Conversation

nie-off
Copy link

@nie-off nie-off commented Nov 26, 2024

Hi,

there are issues with UERANSim and one 5G core of Ericsson with a 3GPP Release 17 due to decoding failures described in #684 . Potentially, more 5G cores with a 3GPP Release greater than 15 are affected.
This MR

  • bundles the generic ASN1 files and the NGAP specific ASN1 files for Release 17 into one file. The files have been retrieved from https://obj-sys.com/products/asn1apis/lte_3gpp_apis.php
  • replaces the compiled .C and .H files of the ASN1 bundle file of Release 15 with the Release 17 compiled files

The RRC files have been intentionally not updated to Release 17 as the communication between the gNB and UE share the same ASN files, so no decoding issues are to be expected and have yet been observed.

The PR has been tested with an Ericsson core and open5gs.

The PR can be reproduced with the following script:

#!/bin/bash

# Paths to adjust
UERANSIM_DIR="~/git/UERANSIM/"
NGAP_SPEC_DIR="~/specs/NGAP_REL_17/"
NGAP_ASN_FILE="ngap-17.9.asn"

if [ -z "$UERANSIM_DIR" ] || [ -z "$NGAP_SPEC_DIR" ]; then
  echo "Error: UERANSIM_DIR and NGAP_SPEC_DIR must be set"
  exit 1
fi

if [! -f "$NGAP_SPEC_DIR/$NGAP_ASN_FILE" ]; then
  echo "Error: ASN file not found in $NGAP_SPEC_DIR"
  exit 1
fi

# Clone the ASN1C repository with a prefix feature
git clone https://github.com/OPENAIRINTERFACE/asn1c.git
cd asn1c
git checkout velichkov_s1ap_plus_option_group_plus_adding_trailing_ull

# Configure and build the repository
test -f configure || autoreconf -iv
./configure
make
sudo make install

# Run ASN1C.
cd ${NGAP_SPEC_DIR}
ASN1C_PREFIX=ASN_NGAP_ asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -gen-PER -D ngap ${NGAP_ASN_FILE}

# Remove unnecessary convert example to avoid compilation errors
rm ngap/converter-example.c

# Move files to the UERANSIM directory
mv ngap/ASN_NGAP_* ${UERANSIM_DIR}/src/asn/ngap
mv ngap/* ${UERANSIM_DIR}/src/asn/asn1c

# Enable OER Decoder to avoid compilation errors
sed -i '/^target_compile_options(asn-asn1c PUBLIC -DASN_DISABLE_OER_SUPPORT)/d' ${UERANSIM_DIR}/src/asn/asn1c/CMakeLists.txt

# Finally, compile UERANSIM
cd ${UERANSIM_DIR}
make

I am curious what you think. At least, I wanted to give a concrete solution for the aforementioned issue.

@aligungr
Copy link
Owner

aligungr commented Dec 10, 2024

Thanks @nie-off

@aligungr aligungr merged commit 01e3785 into aligungr:master Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants