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

srsUE establishes RRC connection and then gets released & clock synchronization doubt #451

Closed
sourya1712 opened this issue Feb 3, 2024 · 36 comments

Comments

@sourya1712
Copy link

sourya1712 commented Feb 3, 2024

I am running the open5gs core and the gNB on the same machine and it connects properly.

I am running the srsUE on a different machine. Each side has a USRP b200 connected to it. So the gNB is running on an USRP b200 and the UE is running on another USRP b200. I am using internal clocks of the USRPs. Each PC is running on Ubuntu 22.04. Performance scripts have been run on both PCs before executing the gNB or UE executables.

Everytime I run the UE, there is an RRC connection made and about 3 seconds later, the RRC connection is released. I have played around with the time_adv_samples and Tx and Rx gain but to no avail. The UE is unable to maintain the communication and is unstable.

I have attached the config files for the UE and gNB and the logs for the UE and gNB as well. Help will really be appreciated.

The following is what I get on running the UE:

lensl-u22@lenslu22-OptiPlex-SFF-Plus-7010:~/srsRAN_Project/configs$ sudo srsue ue_rf.conf
Active RF plugins: libsrsran_rf_uhd.so libsrsran_rf_zmq.so
Inactive RF plugins:
Reading configuration file ue_rf.conf...

Built in Release mode using commit eea87b1d8 on branch master.

Opening 1 channels in RF device=uhd with args=clock=internal
Supported RF device list: UHD zmq file
[INFO] [UHD] linux; GNU C++ version 11.4.0; Boost_107400; UHD_4.6.0.0-0ubuntu1~jammy1
[INFO] [LOGGING] Fastpath logging disabled at runtime.
Opening USRP channels=1, args: type=b200,master_clock_rate=23.04e6
[INFO] [UHD RF] RF UHD Generic instance constructed
[INFO] [B200] Detected Device: B200
[INFO] [B200] Operating over USB 3.
[INFO] [B200] Initialize CODEC control...
[INFO] [B200] Initialize Radio control...
[INFO] [B200] Performing register loopback test...
[INFO] [B200] Register loopback test passed
[INFO] [B200] Asking for clock rate 23.040000 MHz...
[INFO] [B200] Actually got clock rate 23.040000 MHz.
Setting manual TX/RX offset to 260 samples
Waiting PHY to initialize ... done!
Attaching UE...
Random Access Transmission: prach_occasion=0, preamble_index=0, ra-rnti=0x39, tti=8174
Random Access Transmission: prach_occasion=0, preamble_index=0, ra-rnti=0x39, tti=8334
Random Access Transmission: prach_occasion=0, preamble_index=0, ra-rnti=0x39, tti=8494
Random Access Complete. c-rnti=0x4747, ta=8
RRC Connected
RF status: O=1, U=0, L=0
Received RRC Release
^CStopping ..
--- exiting ---

Another Question is: How are the clocks synchronized if no GPSDO is used? srsRAN_Project tutorial page suggests the use of an external LeoBodnar GPSDO. Is it necessary to use one?
ue.log
gnb.log
ue.txt
gnb config.txt

@pgawlowicz
Copy link
Collaborator

Does your setup work if you replace the USRPs with the ZMQ-based RF emulation? Could you provide Open5gs logs?

@sourya1712
Copy link
Author

Does your setup work if you replace the USRPs with the ZMQ-based RF emulation? Could you provide Open5gs logs?

Yes. my setup works with ZMQ. It even establishes a PDU session with ZMQ.
Please find attached all the logs of the modules of Open5gs core.
amf.txt
ausf.txt
bsf.txt
nrf.txt
nssf.txt
pcf.txt
pcrf.txt
scp.txt
smf.txt
udm.txt
udr.txt
upf.txt

@pgawlowicz
Copy link
Collaborator

pgawlowicz commented Feb 3, 2024

In the amf logs you have:

02/03 12:22:47.435: [amf] INFO: InitialUEMessage (../src/amf/ngap-handler.c:401)
02/03 12:22:47.435: [amf] INFO: [Added] Number of gNB-UEs is now 1 (../src/amf/context.c:2550)
02/03 12:22:47.435: [amf] INFO:     RAN_UE_NGAP_ID[1] AMF_UE_NGAP_ID[1] TAC[7] CellID[0x19b0] (../src/amf/ngap-handler.c:562)
02/03 12:22:47.435: [amf] INFO: [suci-0-001-01-0000-0-0-0123456780] Unknown UE by SUCI (../src/amf/context.c:1835)
02/03 12:22:47.435: [amf] INFO: [Added] Number of AMF-UEs is now 1 (../src/amf/context.c:1616)
02/03 12:22:47.435: [gmm] INFO: Registration request (../src/amf/gmm-sm.c:1165)
02/03 12:22:47.435: [gmm] INFO: [suci-0-001-01-0000-0-0-0123456780]    SUCI (../src/amf/gmm-handler.c:166)
02/03 12:22:48.375: [gmm] ERROR: [suci-0-001-01-0000-0-0-0123456780] HTTP response error [500] (../src/amf/gmm-sm.c:1675)
02/03 12:22:48.375: [amf] WARNING: [suci-0-001-01-0000-0-0-0123456780] Registration reject [9] (../src/amf/nas-path.c:219)
02/03 12:22:48.497: [amf] INFO: UE Context Release [Action:3] (../src/amf/ngap-handler.c:1698)

So the core sends the UE context release. Did you installed the Open5gs manualy or do you use the provided dockerized version?

@pgawlowicz
Copy link
Collaborator

On the other hand, the RX and TX gains seems to be very high. Could you try tx 60 and RX 40 for both UE and gnb

@pgawlowicz
Copy link
Collaborator

time_adv_nsamples between 300-320, or you can try auto

@sourya1712
Copy link
Author

In the amf logs you have:

''' 02/03 12:22:47.435: [amf] INFO: InitialUEMessage (../src/amf/ngap-handler.c:401) 02/03 12:22:47.435: [amf] INFO: [Added] Number of gNB-UEs is now 1 (../src/amf/context.c:2550) 02/03 12:22:47.435: [amf] INFO: RAN_UE_NGAP_ID[1] AMF_UE_NGAP_ID[1] TAC[7] CellID[0x19b0] (../src/amf/ngap-handler.c:562) 02/03 12:22:47.435: [amf] INFO: [suci-0-001-01-0000-0-0-0123456780] Unknown UE by SUCI (../src/amf/context.c:1835) 02/03 12:22:47.435: [amf] INFO: [Added] Number of AMF-UEs is now 1 (../src/amf/context.c:1616) 02/03 12:22:47.435: [gmm] INFO: Registration request (../src/amf/gmm-sm.c:1165) 02/03 12:22:47.435: [gmm] INFO: [suci-0-001-01-0000-0-0-0123456780] SUCI (../src/amf/gmm-handler.c:166) 02/03 12:22:48.375: [gmm] ERROR: [suci-0-001-01-0000-0-0-0123456780] HTTP response error [500] (../src/amf/gmm-sm.c:1675) 02/03 12:22:48.375: [amf] WARNING: [suci-0-001-01-0000-0-0-0123456780] Registration reject [9] (../src/amf/nas-path.c:219) 02/03 12:22:48.497: [amf] INFO: UE Context Release [Action:3] (../src/amf/ngap-handler.c:1698) '''

So the core sends the UE context release. Did you installed the Open5gs manualy or do you use the provided dockerized version?

I installed it from Source using the instructions on open5gs page.

@sourya1712
Copy link
Author

On the other hand, the RX and TX gains seems to be very high. Could you try tx 60 and RX 40 for both UE and gnb

I will try and get back to you.

@sourya1712
Copy link
Author

time_adv_nsamples between 300-320, or you can try auto

Is there an option for auto as well?

@sourya1712
Copy link
Author

In the amf logs you have:

''' 02/03 12:22:47.435: [amf] INFO: InitialUEMessage (../src/amf/ngap-handler.c:401) 02/03 12:22:47.435: [amf] INFO: [Added] Number of gNB-UEs is now 1 (../src/amf/context.c:2550) 02/03 12:22:47.435: [amf] INFO: RAN_UE_NGAP_ID[1] AMF_UE_NGAP_ID[1] TAC[7] CellID[0x19b0] (../src/amf/ngap-handler.c:562) 02/03 12:22:47.435: [amf] INFO: [suci-0-001-01-0000-0-0-0123456780] Unknown UE by SUCI (../src/amf/context.c:1835) 02/03 12:22:47.435: [amf] INFO: [Added] Number of AMF-UEs is now 1 (../src/amf/context.c:1616) 02/03 12:22:47.435: [gmm] INFO: Registration request (../src/amf/gmm-sm.c:1165) 02/03 12:22:47.435: [gmm] INFO: [suci-0-001-01-0000-0-0-0123456780] SUCI (../src/amf/gmm-handler.c:166) 02/03 12:22:48.375: [gmm] ERROR: [suci-0-001-01-0000-0-0-0123456780] HTTP response error [500] (../src/amf/gmm-sm.c:1675) 02/03 12:22:48.375: [amf] WARNING: [suci-0-001-01-0000-0-0-0123456780] Registration reject [9] (../src/amf/nas-path.c:219) 02/03 12:22:48.497: [amf] INFO: UE Context Release [Action:3] (../src/amf/ngap-handler.c:1698) '''

So the core sends the UE context release. Did you installed the Open5gs manualy or do you use the provided dockerized version?

Why would the server reject registration?
It is returning code 500. I did not make any changes to the UE data. Why would it reject registration?

@pgawlowicz
Copy link
Collaborator

There is info 'Unknown UE by SUCI' so the UE is not present in the Open5gs subscriber database. You need to add it

@sourya1712
Copy link
Author

There is info 'Unknown UE by SUCI' so the UE is not present in the Open5gs subscriber database. You need to add it

I will add it via the GUI and see if that works.

@sourya1712
Copy link
Author

There is info 'Unknown UE by SUCI' so the UE is not present in the Open5gs subscriber database. You need to add it

Hi. I just noticed that the UE was already present in the database. I removed it and added it again. The following is the info for the UE:
Screenshot from 2024-02-05 11-30-33
The UE still gets an RRC Release and the AMF still signals an unknown UE:
Screenshot from 2024-02-05 11-31-30

@sourya1712
Copy link
Author

@pgawlowicz do you have any solution for the above problem?

@pgawlowicz
Copy link
Collaborator

pgawlowicz commented Feb 7, 2024

gNB connects to the core, and the UE tries to connect, so the RAN part works correctly. It seems that there is some Open5gs related issue. Probably sth is misconfgured there.

I would recommend to use the provided docker version of the open5gs

@sourya1712
Copy link
Author

gNB connects to the core, and the UE tries to connect, so the RAN part works correctly. It seems that there is some Open5gs related issue. Probably sth is misconfgured there.

I would recommend to use the provided docker version of the open5gs

where can I find the docker version?

@pgawlowicz
Copy link
Collaborator

See the tutorial https://docs.srsran.com/projects/project/en/latest/tutorials/source/srsUE/source/index.html

@sourya1712
Copy link
Author

See the tutorial https://docs.srsran.com/projects/project/en/latest/tutorials/source/srsUE/source/index.html

So it is already provided in your srsRAN_Project package as far as I can make out.

@pgawlowicz
Copy link
Collaborator

Yes, you need to start it from srsRAN_Project/docker directory :

cd ./srsRAN_Project/docker
docker compose up --build 5gc

@sourya1712
Copy link
Author

Yes, you need to start it from srsRAN_Project/docker directory :

cd ./srsRAN_Project/docker
docker compose up --build 5gc

I did a fresh install of the entire project. The UE now connects to the gNB and maintains connection for sometime before getting an RRC Release again. I have attached the Core Log below:
amflog.txt

@pgawlowicz
Copy link
Collaborator

@sourya1712 did you have any progress with this issue? Does the UE keep the connection when you start pinging it?

@pgawlowicz
Copy link
Collaborator

you might also check if this solution works for you #135 (reply in thread)

@sourya1712
Copy link
Author

@sourya1712 did you have any progress with this issue? Does the UE keep the connection when you start pinging it?

Unfortunately, No. The UE is not able to maintain a stable connection and is dropped after somrtime.

@sourya1712
Copy link
Author

sourya1712 commented Feb 29, 2024

you might also check if this solution works for you #135 (reply in thread)

I will try changing the apn to srsapn on the UE config file as well as the UE record in the open5gs database. Let me see if that works.

@achkonsa
Copy link

hello, i meet the same question in amf terminal: [gmm] ERROR: [suci-0-001-01-0000-0-0-0123456780] HTTP response error, but my error code is [400], not [500]. I wanna ask if you have any progress :)

@sourya1712
Copy link
Author

hello, i meet the same question in amf terminal: [gmm] ERROR: [suci-0-001-01-0000-0-0-0123456780] HTTP response error, but my error code is [400], not [500]. I wanna ask if you have any progress :)

Hi,
I changed the apn and did everything as instructed. The connection is still unstable. It lasts for around 5 seconds before disconnecting.

@pgawlowicz
Copy link
Collaborator

Could you attach the gnb logs?

@achkonsa
Copy link

Hello @pgawlowicz,

First of all, thank you for sharing this project. I encountered a similar issue as @sourya1712 . I've been following the discussion between you and @sourya1712 regarding the issue we're facing with this project. I saw that you requested the gnb log to further diagnose the problem. I'm encountering a similar issue and thought it might be helpful to share my gnb log as well.

Attached you'll find my gnb log
gnblog.txt
. I hope this can provide some additional insights into this problem. And I have noticed that the gnb log sometimes become too large to open. Now it is over 5M bytes.

Thank you again for your help, and I look forward to your reply.

Best regards,
achkonsa

@pgawlowicz
Copy link
Collaborator

could you run srsran_performance script?

@mohammadih
Copy link

I do have the same issue
Screenshot from 2024-03-28 09-53-52
Screenshot from 2024-03-28 09-54-42

@achkonsa
Copy link

I have run the srsran_performance script, but it is still the same. @pgawlowicz

@achkonsa
Copy link

I recommend that you carefully review the configuration files data or try using an older version of Open5GS, such as 2.6.6 or even earlier version. Yesterday, I rebuilt this project on another computer, and it was successful. However, it remains the same on my original server. @mohammadih

@pgawlowicz
Copy link
Collaborator

@mohammadih could you share gnb logs and ngap pcap file?

@achkonsa
Copy link

achkonsa commented Apr 3, 2024

Hi, sorry to disturb. It still remains the same on my server. I have tried the docker-open5gs and open5gs. UE is always gets released after 5 lines gnb output. I doubt that it is related to the gnb or ue.
ue20240403172744

@pgawlowicz
Copy link
Collaborator

could you add the following to your gnb config:

cu_cp:
  inactivity_timer: 7200            # Sets the UE/PDU Session/DRB inactivity timer to 7200 seconds. Supported: [1 - 7200].

@achkonsa
Copy link

OK!! Thank you soooooo much for caring and asking!!! It works!!

@pgawlowicz
Copy link
Collaborator

pgawlowicz commented Apr 12, 2024

great! Would you be willing to share your final configs and shortly describe the setup tuning you did? It would be very helpful for other users.

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

No branches or pull requests

4 participants