herlesupreeth / docker_open5gs

Docker files to run open5gs + IMS + eNB + gNB + NR-UE in a docker
BSD 2-Clause "Simplified" License
311 stars 169 forks source link

5G-SA network not detected on Fairphone 4. #243

Open r00tb33 opened 11 months ago

r00tb33 commented 11 months ago

Hi,

I am running a SA deployment along with srsgNB but my UE i.e. fairphone 4 5G could not detect the network.

I am using a sysmocom nano SIM and have added the details of the same to database using Open5GS web-UI.

What params do I need to change in order to detect it on the UE?

Thanks!!

herlesupreeth commented 11 months ago

Have you tried manually searching for the 5G network?? And, can you please describe your setup?? which sdr you are using? what band are you testing? etc

Also, it could be that 5G SA i not enabled on that phone by the firmware or the SDR you are using has a drifting clock for which external clock maybe required

herlesupreeth commented 11 months ago

From Fairphone 4 5G webpage I see phone supporting only NSA. Can you confirm with them whether it support 5G SA?

image

r00tb33 commented 11 months ago

Have you tried manually searching for the 5G network?? And, can you please describe your setup?? which sdr you are using? what band are you testing? etc

Also, it could be that 5G SA i not enabled on that phone by the firmware or the SDR you are using has a drifting clock for which external clock maybe required

Yes I've tried manually searching for the network on Fairphone 4 and iPhone 14 using a sysmocom SIM whose details are already in the mongo DB.

My setup consists of an intel 11th Gen i5-1135G7, 32GB RAM, 1TB SSD with Ubuntu 22.04.3 LTS running on top of it. My docker version is 24.0.6 and docker compose version is v2.21.0.

I am using USRP B210 which has an internal clock alternatively, I also have a bladeRF Micro A4.

The srsran is configured to run on band = 78(NR) with dl_arfcn = 632628.

I dunno if 5G NR is enabled on iphone 14 or not is there a way I can test this?

Thanks for the response!!

r00tb33 commented 11 months ago

From Fairphone 4 5G webpage I see phone supporting only NSA. Can you confirm with them whether it support 5G SA?

image

Yes it seems Fairphone 4 5G does not support SA bands.

In that case is there a way I can run a 5G-NSA mode network? What changes do I need to do in the current config? Or do I need to clone another image for NSA?

Please guide.

Thanks!!

herlesupreeth commented 11 months ago

NSA mode is not supported in open5gs so it cant be tested

r00tb33 commented 11 months ago

Hi,

Thanks for the info!!

Also, I tried the SA deployment on iPhone 14 but could not get it detected... What could be the reason?

I've hardly made any changes to the config that came along with the docker image.

Let me know how can I debug this further.

Thanks.

Sent from Outlook for Androidhttps://aka.ms/AAb9ysg


From: Supreeth Herle @.> Sent: Thursday, October 19, 2023 11:11:50 PM To: herlesupreeth/docker_open5gs @.> Cc: Amit Vitekar @.>; Author @.> Subject: Re: [herlesupreeth/docker_open5gs] 5G-SA network not detected on Fairphone 4. (Issue #243)

NSA mode is not supported in open5gs so it cant be tested

— Reply to this email directly, view it on GitHubhttps://github.com/herlesupreeth/docker_open5gs/issues/243#issuecomment-1771712390, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A6IBRLPXXYBH6VPCPTLXDD3YAGJRNAVCNFSM6AAAAAA6FRNIRCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZRG4YTEMZZGA. You are receiving this because you authored the thread.Message ID: @.***>

herlesupreeth commented 11 months ago

For iPhone 14, there is a requirement to have certain 5G files in SIM card to be programmed. For the SIM you can use the following pysim script https://github.com/herlesupreeth/docker_open5gs/blob/master/sim/iphone-private-5g.script file to program your SIM card with relevant files (Dont forget to change the ADM key as per your SIM card in that script before executing). You have to execute as follows:

./pySim-shell.py -p 0 --script scripts/iphone-private-5g.script

In addition to the above requirement, Apple requires following as well:

  1. Enable NAS encryption which can be done with following changes in amf.yaml in amf folder of this repository
    security:
        integrity_order : [ NIA2, NIA1, NIA0 ]
        ciphering_order : [ NEA2, NEA1, NEA0 ]
  1. Enable user plane encryption at gNB which can be done only through code changes in srsRAN_Project gNB

In the file lib/rrc/ue/procedures/rrc_security_mode_command_procedure.cpp you would have to change as following

  security::preferred_ciphering_algorithms ciph_algo_pref_list = {security::ciphering_algorithm::nea2,
                                                                  security::ciphering_algorithm::nea0,
                                                                   security::ciphering_algorithm::nea1,
                                                                   security::ciphering_algorithm::nea3};
  1. Also, you would have to use the PLMN 999 xx assigned for private 5G network

I have tested iPhone 13 Pro but the attach didn't complete due to failure after Security Mode Complete. Its a bug in srsRAN_Project gNB, for which a fix is being worked on.

Here is the webpage outlining the requirements - https://support.apple.com/en-ie/guide/deployment/depac6747317/web