-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
amf-sim, gnb-cu-up, and ASN.1 CHOICE extensions (#186)
* amf-sim executable * GNB-CU-UP executable * Terminate pending requests when connection dies * Add connection retry * Add BearerContextSetupProcedure and BearerContextModificationRequest * Add StateStore * Supply cell ID on UeContextSetupRequest * Fill in Drbs to setup item * Allow use of XXAP choice extensions * Form CuToDuRrcInformation correctly * BearerContextModificationRequest and CellGroupConfig
- Loading branch information
Showing
56 changed files
with
3,000 additions
and
690 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[package] | ||
name = "amf-sim" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] | ||
mocks = { path = "../mocks" } | ||
slog = "2.7.0" | ||
anyhow = "1.0.52" | ||
async-std = { version = "1.10.0", features = ["attributes"] } | ||
common = { path = "../common" } | ||
hex = "0.4.3" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
// main - acts as an AMF for testing with O-RAN O-DU | ||
|
||
use anyhow::Result; | ||
use mocks::MockAmf; | ||
use slog::info; | ||
|
||
// The purpose of this code is to cause Alsoran GNB-CU to produce the same message sequence as the O-RAN-SC O-DU Cu Stub. | ||
// The required call flow is documented in full at `documentation/odu.md`. | ||
#[async_std::main] | ||
async fn main() -> Result<()> { | ||
let logger = common::logging::init(); | ||
let mut amf = MockAmf::new(&logger).await; | ||
amf.disable_receive_timeouts(); | ||
|
||
// Wait for connection and do NG Setup. | ||
amf.add_endpoint("127.0.0.1").await?; | ||
amf.expect_connection_established().await; | ||
amf.handle_ng_setup().await?; | ||
|
||
// Receive Ngap InitialUeMessage + Nas Registration Request | ||
let ue = amf.receive_initial_ue_message(1).await?; | ||
info!(&logger, ">> Registration request"); | ||
|
||
// Send Nas Authentication Request | ||
info!(&logger, "<< Nas Authentication request"); | ||
let nas = hex::decode( | ||
"7e005602020000217ac1c891b8aba0b2646e9cad34f4a0192010037859caf5e58000d58e09fc227bbf19", | ||
)?; | ||
amf.send_downlink_nas_transport(&ue, nas).await?; | ||
|
||
// Receive Nas Authentication Response | ||
let _nas = amf.receive_uplink_nas_transport(&ue).await?; | ||
info!(&logger, ">> Nas Authentication Response"); | ||
|
||
// Send Nas Security Mode Command | ||
info!(&logger, "<< Nas Security Mode Comamnd"); | ||
let nas = hex::decode("7e03e8e277e4007e005d010204f070f070e1360102")?; | ||
amf.send_downlink_nas_transport(&ue, nas).await?; | ||
|
||
// Receive Nas Security Mode Complete | ||
let _nas = amf.receive_uplink_nas_transport(&ue).await?; | ||
info!(&logger, ">> Nas Security Mode Complete"); | ||
|
||
// Send Ngap InitialContextSetupRequest + Nas Registration Accept | ||
let nas = hex::decode("7e00420101")?; | ||
amf.send_initial_context_setup_request(&ue, nas).await?; | ||
|
||
// Receive Ngap InitialContextSetupResponse | ||
amf.receive_initial_context_setup_response(&ue).await?; | ||
|
||
// Send Nas Registration Accept | ||
//info!(&logger, "<< Nas Registration Accept"); | ||
//amf.send_downlink_nas_transport(&ue, nas).await?; | ||
|
||
// Receive Nas Registration Complete | ||
let _nas = amf.receive_uplink_nas_transport(&ue).await?; | ||
info!(&logger, ">> Nas Registration complete"); | ||
|
||
amf.send_pdu_session_resource_setup(&ue).await?; | ||
amf.receive_pdu_session_resource_setup_response(&ue).await?; | ||
|
||
amf.terminate().await; | ||
|
||
Ok(()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.