Skip to content

Baldomo/comnetsemu-srsran

Repository files navigation

comnetsemu + srsRAN

This project aims to integrate a source build of srsRAN in comnetsemu. Radio packets are exchanged through ZeroMQ instead of a physical radio device (see srsRAN documentation for more information).

Knowledge base

  • srsENB supports only one UE per channel (each channel is a ZeroMQ rx/tx pair) as per official documentation. Since the rx/tx is implemented as a simple REQ/REP pair, either:
    • a custom broker based on something like zeromq/Malamute has to be used
    • some tricks can be done by changing tx_type and rx_type to PUB-SUB in rf.device_args like this: --rf.device_args="tx_type=pub,rx_type=sub" (this is an undocumented feature of srsRAN's ZeroMQ radio implementation, found in the source code here)
    • the ZeroMQ implementation inside srsRAN must be refactored to support more complex patterns (which will probably never be done since it's outside the scope of the project)
  • A single UE can use multiple channels for things like 5G NSA mode (implemented in this project).
  • Multiple cells can be emulated via S1 handover.

Development

This project uses a custom build script written in Bash (make.sh). The script serves as a replacement for Makefiles (it provides useful command line help and other functionalities) and is self-documenting. For more information see:

$ ./make.sh --help

Updating comnetsemu

If a new version of comnetsemu is available, just run

$ ./make.sh git_submodules

or (basically the same):

$ git submodule update --recursive --remote

Notes on local development (on the host)

Note: running topology code on the host is kinda useless, so don't do it

To enable code completion in editors and general testing, a Python virtualenv is recommended. It can be automatically setup using ./make.sh virtualenv.

Project structure

The root directory contains the following files (generally):

Filename Description
comnetsemu/ Git submodule linked to the comnetsemu repository
comnetsemu-docs/ HTML documentation compiled from comnetsemu
config/ srsRAN configuration files. Used as a Docker volume inside the VM
docker docker-compose versions of the network stacks and srsRAN build file
logs/ Will be mounted as a volume inside the srsRAN containers and store logs
slides/ Slides and assets
src/ Python scripts with network implementations
utils/ Contains extra utility files and bash functions for make.sh
README.md This file
make.sh Build script for this project
Vagrantfile comnetsemu-compatible VM, extend from the original Vagrantfile

All other directories/files are either temporary or self-explanatory, e.g.:

  • build/: contains build artifacts (archives, binaries, whatever's needed at runtime)
  • env/: Python virtualenv (see section above)