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
528 stars 179 forks source link

UE Fales to attach to the 5G Network #612

Closed Moussa-Guemdani closed 5 months ago

Moussa-Guemdani commented 6 months ago

Issue Description

Hello, I have built the End-To-End 5G Network following the tutorial ""https://docs.srsran.com/projects/project/en/latest/tutorials/source/cotsUE/source/index.html"", but I'm still unable to attach the UE.

Setup Details

Hardware: - RF:USRPx310.

                - Ubuntu 24.04.04.
                - Computer: Dell i7 OptiPlex 7060.
                - UE: OnePlus8Pro (supports n78 SA).
                - sysmoISIM-SJA2

Configs:

                - amf:
                    - addr: 127.0.0.5                                             
                    - bind_addr: 127.0.0.1                                    

                - ru_sdr:
                    - device_driver: uhd                                            
                    - device_args: type=x300                                        
                    - clock: internal                                           
                    - sync: default                                                       
                    - srate: 23.04
                    - tx_gain: 23
                    - rx_gain: 20
                - cell_cfg:
                    - dl_arfcn: 627340
                    - #627340
                    - band: 78
                    - channel_bandwidth_MHz: 20
                    - common_scs: 30
                    - plmn: "20870"
                    - tac: 1
                    - pci: 1 

Actual Behaviour

image image

pgawlowicz commented 6 months ago

did you run this script on the gnb PC? https://github.com/srsran/srsRAN_Project/blob/main/scripts/srsran_performance

Also, could you share the details of the PC? (cpu, ram?)

Moussa-Guemdani commented 6 months ago

Hello, I have ran the script, but stil the same issue,

12 x CPU:

RAM(MB): total used free shared buff/cache available Mem: 15Gi 5,1Gi 6,6Gi 269Mi 3,7Gi 9,7Gi Swap: 2,0Gi 0B 2,0Gi

pgawlowicz commented 6 months ago

could you share the configs you use?

Moussa-Guemdani commented 6 months ago

Here you are: image

pgawlowicz commented 6 months ago

could you check whether this works? https://docs.srsran.com/projects/project/en/latest/tutorials/source/srsUE/source/index.html#usrp-x300-x310

Moussa-Guemdani commented 6 months ago

These are the results after the changes image

Configs: image

pgawlowicz commented 6 months ago

how is the x310 connected to the gnb PC?

Moussa-Guemdani commented 6 months ago

It is connected using the 10 Gigabit Ethernet via SFP cable image

pgawlowicz commented 6 months ago

hmm, could you put addr=X.X.X.X, in the device_args? alternatively, could you try a different uhd version, eg. 4.3?

Moussa-Guemdani commented 6 months ago

Hello, When I Try the use another version of uhd, and run the gnb, I asks me to download another version of uhd that is compatible with srsRAN_Project, Then when I do this and follow the steps, still have the same issue

image image

pgawlowicz commented 6 months ago

ok, could you show the cpu load (htop) while running the srsgnb?

Moussa-Guemdani commented 6 months ago

image

s21sm commented 6 months ago

If you use commercial UE, program the USIM with PLMN 00101, due to carrier policy UE may not work with other PLMN. You could try PLMN 00101 both side, UE and core

pgawlowicz commented 6 months ago

Could you try uhd-4.3 or higher?

Moussa-Guemdani commented 6 months ago

Hello, I have changed the version to the last version of UHD, and I used PLMN: 00101, It works very fine now

I would like to point out that when I have changed the UHD version on the host computer, when build the gNB again, it shows that the the variables were not used by the project. Screenshot from 2024-05-21 16-47-42

Also, even though I have a successful atatch, I still see the Late: 0; Underflow: 1; Overflow: 0; issue image

I would like to thank you very much for your help and assistance. @s21sm Thank you very much.

Moussa-Guemdani commented 6 months ago

Hello, after successfully using the project for several days, now the Ue Connects normally, but there is an exclamation mark on the network, and there is no internet access!

I have checked the nat and forwarding rules,

image

s21sm commented 6 months ago

You may try these


sudo sysctl -w net.ipv4.ip_forward=1
sudo iptables -t nat -A POSTROUTING -s 10.45.0.0/16 ! -o ogstun -j MASQUERADE
sudo iptables -I INPUT -i ogstun -j ACCEPT
sudo ip ro add 10.45.0.0/16 via 10.53.1.2
Moussa-Guemdani commented 6 months ago

You may try these


sudo sysctl -w net.ipv4.ip_forward=1
sudo iptables -t nat -A POSTROUTING -s 10.45.0.0/16 ! -o ogstun -j MASQUERADE
sudo iptables -I INPUT -i ogstun -j ACCEPT
sudo ip ro add 10.45.0.0/16 via 10.53.1.2

HEllo,

I have tried, but the issue is not solved

pgawlowicz commented 6 months ago

@Moussa-Guemdani do you run open5gs in docker or manually installed?

Moussa-Guemdani commented 6 months ago

@pgawlowicz I am running open5gsmanually installed

pgawlowicz commented 6 months ago

did you follow this tutorial? https://docs.srsran.com/projects/project/en/latest/tutorials/source/cotsUE/source/index.html

Did you configure APN in your phone? Please check the troubleshooting section.

Moussa-Guemdani commented 5 months ago

Yes, i did, also with the Access Point.

It worked for some time, after re-build, then Same issue.

I am running the Hannover deployment.

pgawlowicz commented 5 months ago

could you try this one:

sudo sysctl -w net.ipv4.ip_forward=1
sudo sysctl -w net.ipv4.conf.all.forwarding=1
sudo sysctl -w net.ipv6.conf.all.forwarding=1
sudo iptables -t nat -A POSTROUTING -o IFNAME_CONNECTED_TO_INTERNET -j MASQUERADE
sudo iptables -t nat -A POSTROUTING -s 10.45.0.0/16 ! -o ogstun -j MASQUERADE
sudo iptables -P FORWARD ACCEPT
sudo ip ro add 10.45.0.0/16 via 10.53.1.2
pgawlowicz commented 5 months ago

@Moussa-Guemdani any update on this issue?

Moussa-Guemdani commented 5 months ago

Hello, It works very fine fine Thank you for your help.