Comments (8)
@alvasMan I apologize for the delay in my response. Due to unforeseen circumstances, I was unable to reply to your message earlier. I have been busy with other testing the setup. I'll re-try again on Friday when I have tested it with the setup, and I'll provide the logs. Thanks for the help so far.
from srsran_project.
Hi.
I was able to reproduce the same problem when testing earlier today (using B210 and X300).
Here are the debugging logs:
[2023-03-07T09:17:36.068790] [AMF] [sctp ] [debug] SCTP Association Change event received
[2023-03-07T09:17:36.068810] [AMF] [sctp ] [debug] Add new association with id (17812)
[2023-03-07T09:17:36.068850] [AMF] [ngap ] [debug] Ready to handle new NGAP SCTP association request (id 17812)
[2023-03-07T09:17:36.068853] [AMF] [ngap ] [debug] Create a new gNB context with assoc_id (17812)
[2023-03-07T09:17:36.070346] [AMF] [sctp ] [error] Received data from peer with unsolicited PPID (0),
expecting (60)
from srsran_project.
Thanks for the report.
Something as simple as this should fix the issue:
commit ec07389145175e86f9468363e67e934ca3ff1e44 (HEAD -> sctp_ppid, origin/sctp_ppid)
Author: Pedro Alvarez <[email protected]>
Date: Tue Mar 7 18:48:52 2023 +0000
sctp: fix NGAP ppid
diff --git a/apps/gnb/gnb.cpp b/apps/gnb/gnb.cpp
index ab5b8a00b..fe1a4b295 100644
--- a/apps/gnb/gnb.cpp
+++ b/apps/gnb/gnb.cpp
@@ -92,6 +92,7 @@ static void compute_derived_args(const gnb_appconfig& gnb_params)
ngap_nw_config.connect_address = gnb_params.amf_cfg.ip_addr;
ngap_nw_config.connect_port = gnb_params.amf_cfg.port;
ngap_nw_config.bind_address = gnb_params.amf_cfg.bind_addr;
+ ngap_nw_config.ppid = NGAP_PPID;
}
namespace {
diff --git a/include/srsran/gateways/sctp_network_gateway.h b/include/srsran/gateways/sctp_network_gateway.h
index 2b897c44e..fba94e626 100644
--- a/include/srsran/gateways/sctp_network_gateway.h
+++ b/include/srsran/gateways/sctp_network_gateway.h
@@ -19,10 +19,13 @@
namespace srsran {
+constexpr uint16_t NGAP_PPID = 60; // NGAP PPID, see TS 38.412, section 7.
+
/// \brief Configuration for SCTP network gateway
struct sctp_network_gateway_config : common_network_gateway_config {
std::string connect_address;
int connect_port = 0;
+ int ppid = 0; /// the Payload Protocol Identifier
// TODO add SCTP specific options
};
diff --git a/lib/gateways/sctp_network_gateway_impl.cpp b/lib/gateways/sctp_network_gateway_impl.cpp
index 48e374660..0cb6c0cd1 100644
--- a/lib/gateways/sctp_network_gateway_impl.cpp
+++ b/lib/gateways/sctp_network_gateway_impl.cpp
@@ -546,7 +546,7 @@ void sctp_network_gateway_impl::handle_pdu(const byte_buffer& pdu)
pdu_span.size_bytes(),
(struct sockaddr*)&server_addr,
server_addrlen,
- ppi,
+ htonl(config.ppid),
0,
stream_no,
0,
diff --git a/lib/gateways/sctp_network_gateway_impl.h b/lib/gateways/sctp_network_gateway_impl.h
index 45df3cbe2..4d1b594d6 100644
--- a/lib/gateways/sctp_network_gateway_impl.h
+++ b/lib/gateways/sctp_network_gateway_impl.h
@@ -90,7 +90,6 @@ private:
int server_ai_socktype = 0;
int server_ai_protocol = 0;
- unsigned ppi = 0; /// the Payload Protocol Identifier (e.g. 18 for S1AP)
unsigned stream_no = 0; /// the stream number to use for sending
};
from srsran_project.
Thanks.
Earlier today, I attempted to hard-code the ppid value to 60 in the code, re-tested, and obtained the same error. I have also now just applied the patch you provided here, re-built the project, and re-tested running gNB and 5GC. However, I am still getting the same issue with [2023-03-07T20:00:21.495902] [AMF] [sctp ] [error] Received data from peer with unsolicited PPID (0), expecting (60)
Can you @iman432 confirm this to see if it works for you? I'll have to re-check my setup, I might be doing something wrong somewhere.
from srsran_project.
Hum... strange. I tested it, but only with the NG setup, tough.
I'll test again with the full attach.
Do you have a pcap?
from srsran_project.
@mubk00, just tested again (now with a full attach) and it seems fine to me. Did you apply the patch correctly?
You should be able to just do git am < 0001-sctp-fix-NGAP-ppid.patch.txt
and re-compile.
0001-sctp-fix-NGAP-ppid.patch.txt
If you did apply the patch and are still seeing the error can you capture the traffic between the gNB and the core and attach the PCAP?
from srsran_project.
Confirming patch by @alvasMan is setting `payload protocol identifier correctly:
from srsran_project.
Hi.
I just want to mention I got it to work, thanks for the patch @alvasMan
from srsran_project.
Related Issues (20)
- srsUE cannot connect to gNb HOT 39
- Config file parsing error with pcap enabled for N3 Interface HOT 2
- Illegal instruction? (intel nuc) HOT 1
- Very low throughput with RAN550 HOT 4
- Docker: gNB fails to connect to Open5GS core HOT 6
- RU_Metrics reports static values for average power, peak power, and PAPR.
- Network connectivity issues with docker setup HOT 14
- Cannot see the spectrum of the transmitted signal after the gnb operated HOT 1
- having troubles connecting 3 UEs to the open5gc HOT 3
- srsUE establishes RRC connection gets released HOT 3
- Quectel UE can not ping to Core HOT 2
- Installing srsRAN on Kubuntu 24.04 HOT 1
- UE on usrp b210 not connecting to gNb on x310 HOT 3
- Dynamic MCS adaptation in srsRAN for 5G simulation with ZMQ HOT 1
- Uplink is not implemented in Resource Control RC (Only downlink works)
- Why is only the duration of cp calculated(lib\phy\upper\signal_processors\port_channel_estimator_average_impl.c(initialize_symbol_start_epochs))
- Problem with gNB when modiyfing QoS over N5 -- PduSessionResourceModifyItems failed to setup HOT 2
- Synchronization issues on DU side using kubernetes setup
- gnb: "Error: exceeded maximum number of timed out transmissions" HOT 7
- SrsRAN gnb Will freeze if trying to isolate cpus (commit 4ac5300)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from srsran_project.