aligungr / UERANSIM

Open source 5G UE and RAN (gNodeB) implementation.
GNU General Public License v3.0
793 stars 322 forks source link

executing ./nr-ue and ./nr-gnb #241

Closed mimo123-code closed 3 years ago

mimo123-code commented 3 years ago

hello for executing gnb and UE what specific command we have to use.

aligungr commented 3 years ago

@mimo123-code

You can basically run:

'./nr-ue -c myconfig.yaml'

etc.

For example

'./nr-gnb -c ../config/open5gs-gnb.yaml'

Fore more details you can run with '--help'

And don't forget to set IP addresses

fhsetup commented 3 years ago

hello, gnb is connected but nr-ue UERANSIM v3.0.1 [2021-01-28 10:47:35.083] [nas] [debug] NAS layer started [2021-01-28 10:47:35.084] [rrc] [debug] RRC layer started [2021-01-28 10:47:35.086] [nas] [info] UE switches to state: MM-DEREGISTERED/PLMN-SEARCH [2021-01-28 10:47:35.587] [mr] [error] PLMN search failed [SETUP_TIMEOUT]

mcc and mnc are same on ue and amf ..

aligungr commented 3 years ago

@fhsetup

It means that UE is unable to connect to the gNB. Please double check linkIp and gnbSearchList parameters in ue and gnb config files.

Please let me know if this solves your problem.

fhsetup commented 3 years ago

Hi ok. this step are solved. but now : ./nr-ue -c ../config/open5gs-ue.yaml UERANSIM v3.0.1 [2021-01-28 11:36:38.116] [nas] [debug] NAS layer started [2021-01-28 11:36:38.117] [rrc] [debug] RRC layer started [2021-01-28 11:36:38.118] [nas] [info] UE switches to state: MM-DEREGISTERED/PLMN-SEARCH [2021-01-28 11:36:38.120] [nas] [info] UE connected to gNB [2021-01-28 11:36:38.120] [nas] [info] UE switches to state: MM-DEREGISTERED/NORMAL-SERVICE [2021-01-28 11:36:38.121] [nas] [info] UE switches to state: MM-REGISTERED-INITIATED/NA [2021-01-28 11:36:38.121] [nas] [debug] T3519 is not running, new SUCI generated. [2021-01-28 11:36:38.127] [nas] [debug] Received rand[EBDBD19B17A499C2B7F28835CB893F1A] autn[B29ADA629ABF800000AE6CCE8D51E8CE] [2021-01-28 11:36:38.127] [nas] [debug] Calculated res[07A45408ECD167D6] ck[E13613B4259ED79DB2AFC7C3010BCA15] ik[C52FBA6F1F3AE6349C8D449F3BA91C59] ak[A52FC4D33D7F] mac_a[C133D66630C4367E] [2021-01-28 11:36:38.128] [nas] [debug] Used snn[5G:mnc070.mcc901.3gppnetwork.org] sqn[17B51EB1A7C0] [2021-01-28 11:36:38.128] [nas] [error] AUTN validation MAC mismatch. expected: C133D66630C4367E received: 00AE6CCE8D51E8CE [2021-01-28 11:36:38.131] [nas] [error] Authentication Reject received.

fhsetup commented 3 years ago

and in the amf log at open5gs server: 01/28 11:36:38.123: [amf] INFO: [Added] Number of AMF-UEs is now 1 (../src/amf/context.c:1127) 01/28 11:36:38.123: [gmm] INFO: Registration request (../src/amf/gmm-sm.c:131) 01/28 11:36:38.123: [gmm] INFO: [suci-0-901-70-0000-0-0-0000000003] SUCI (../src/amf/gmm-handler.c:72) 01/28 11:36:38.130: [gmm] WARNING: Authentication failure(MAC failure) (../src/amf/gmm-sm.c:474) 01/28 11:36:38.130: [amf] WARNING: [suci-0-901-70-0000-0-0-0000000003] Authentication reject (../src/amf/nas-path.c:264) 01/28 11:36:38.131: [amf] INFO: UE Context Release [Action:3] (../src/amf/ngap-handler.c:1190) 01/28 11:36:38.131: [amf] INFO: RAN_UE_NGAP_ID[3] AMF_UE_NGAP_ID[3] (../src/amf/ngap-handler.c:1192) 01/28 11:36:38.131: [amf] INFO: SUCI[suci-0-901-70-0000-0-0-0000000003] (../src/amf/ngap-handler.c:1194) 01/28 11:36:38.131: [amf] INFO: [Removed] Number of gNB-UEs is now 0 (../src/amf/context.c:1794) 01/28 11:36:38.131: [amf] INFO: [Removed] Number of AMF-UEs is now 0 (../src/amf/context.c:1207)

aligungr commented 3 years ago

@fhsetup Authentication failure is a well known problem. Please make sure that UE parameters match wirh core network side.

Please double check the following parameters:

Especially many people are confused about OP type. You should also check and set OP type. (It is either OP or OPC)

fhsetup commented 3 years ago

ah, ok thanks. opc was selected on core network now it's works

thanks

mimo123-code commented 3 years ago

As the rrc packets partially implemented ,will some rrc packets will be visible now In wireshark in version 3.0

aligungr commented 3 years ago

@mimo123-code

As the rrc packets partially implemented ,will some rrc packets will be visible now In wireshark in version 3.0

Yes, you can see RRC packets in binary form. But wireshark cannot decode them automatically. Some 3rd party plugin may be required but currently I don't know how to do it.

mimo123-code commented 3 years ago

@aligungr during my initial capture in wireshark along with the 5G packets , i am also getting 4G(S1AP) PACKETS. i have not run any using and 4G setup. Initially i was sending a registration reject of N1 mode not allowed is these might be the reason?

mimo123-code commented 3 years ago

recent ue.zip Here is the pcap file please look at it

aligungr commented 3 years ago

@mimo123-code I don't know your setup and environment, but UERANSIM never send 4G packets in any case. I think there is another mistake in your environment.

mimo123-code commented 3 years ago

Ok thanks @aligungr