srsran / srsRAN_Project

Open source O-RAN 5G CU/DU solution from Software Radio Systems (SRS) https://docs.srsran.com/projects/project
https://www.srsran.com
GNU Affero General Public License v3.0
484 stars 163 forks source link

srsUE attach fails through srsGNB to Open5GS (ZMQ) #309

Closed hs3387 closed 7 months ago

hs3387 commented 10 months ago

Issue Description

I wasn't sure whether to post this in the 4g git or the 5g git, but since it's a 5g core, gnb, and nr band use in srsUE, I'm posting here.

My UE attachment keeps getting rejected. It receives the release command then sits there until I exit the program image

I don't see anything happening in the gnb console during this, it's just blank. image

I see this series of packets flowing between gnb and the core image

UE Sim config image

Core UE config image

Setup Details

srsUE and GNB running on ubuntu 20.04 LTS - connected through ZeroMQ Open5GS running on another Ubuntu 20.04 (was able to attach a UE with a GNB running a USRP B210)

Expected Behavior

UE should attach and authenticate successfully

Actual Behaviour

UE/Core rejects authentication Core logs and pcap don't specify reason for rejection

herlesupreeth commented 10 months ago

Please post a pcap of NGAP interface and all the relevant configuration files.

just by looking at screenshot of pcap I see Authentication Reject so that indicates there is some issue in the UE SIM configuration (either at 5GC or Ki or OPc is wrong)

hs3387 commented 10 months ago

gnbx.yaml.txt uezmq2.conf.txt tail amf.log.txt pcaps.zip

This is the only info i could gather from pcap but no idea what to make of it

image

hs3387 commented 10 months ago

amf.yaml.txt

herlesupreeth commented 10 months ago

image

As mentioned earlier Authentication Reject indicates that there is some issue in the UE SIM configuration (either at 5GC or Ki or OPc is wrong)

I would suggest changing the following parameters in UE configuration file and give it a try (to eliminate the possibility of wrongly generated OPc value from Ki and OP)

opc  = 8E27B6AF0E692E750F32667A3B14605D
k    = 8baf473f2f8fd09487cccbd7097c6862
hs3387 commented 10 months ago

I changed this, still getting auth reject image

hs3387 commented 10 months ago

Actually, buried deep in some logs I found this

[NAS5G ] [E] Registration Reject: PLMN not allowed

However, you can see that the first 6 digits of my IMSI match the MCC MNC

hs3387 commented 10 months ago

@herlesupreeth It looks like srsue is only taking the first 5 digits of my IMSI as the PLMN It needs to take 6? How do I set this?

herlesupreeth commented 10 months ago

Please post the pcap to know better where the issue is. I would suggest changing MNC from 010 to say 100 i.e. non-leading zero number.

pgawlowicz commented 8 months ago

@hs3387 Any update on this issue?

hs3387 commented 8 months ago

Nope, I have tried different official guides and some random thoughts too. Nothing seems to work.

Regardless of whyther Im using a physical sim (pcsc) or typing the usim info in the ue config, I keep getting MAC failures. Even tried a sim that works on a mobile phone with a physical gnb with the same core.

On Wed, Jan 24, 2024, 2:17 AM Piotr @.***> wrote:

@hs3387 https://github.com/hs3387 Any update on this issue?

— Reply to this email directly, view it on GitHub https://github.com/srsran/srsRAN_Project/issues/309#issuecomment-1906891248, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3R3BZBH5JP2OKG43VQVXLDYQAOUTAVCNFSM6AAAAAA7KH5EQGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBWHA4TCMRUHA . You are receiving this because you were mentioned.Message ID: @.***>

pgawlowicz commented 8 months ago

Do you run the dockerized Open5gs provided in srsRAN_Project repo?

azzukky commented 8 months ago

I am facing exactly the same issue when I run an installed open5gs on my desktop. But when I run the dockerized version from srsran, it works. ANY tip to solve this?

azzukky commented 8 months ago

I am facing exactly the same issue when I run an installed open5gs on my desktop. But when I run the dockerized version from srsran, it works. ANY tip to solve this?

pgawlowicz commented 8 months ago

Note that the dockerized version is shipped with configs for each Open5GC service and the UE database is properly populated. You should be able to achieve the same effect with your own installation.