This project is basically an extension for the Ethernet packet generator project I implemented a week ago. My focus is now on Milestone 2, which enhances the payload to include eCPRI headers and O-RAN packets.
This is the last version I made as a part of Siemens 5G Final Project, I made another repository as I do not know the best way to modify the repository I made. Also the project still needs some modifications, so feel free to contribute
The objective of this project is to generate Ethernet packets based on specified configurations and stream IQ samples in compliance with O-RAN standards.
In Milestone 1, the following features were implemented:
- Ethernet Packet Generation: The application generates Ethernet packets and dumps them into a text file.
- Streaming Duration: Packets are generated for a specified streaming duration, defined in a setup file.
- Packet Alignment: Ethernet packets are 4-byte aligned, with Inter-Frame Gaps (IFGs) used as padding.
- Packet Structure: The packet generation process follows these steps:
- Preamble
- Start Frame Delimiter (SFD)
- Destination Address
- Source Address
- Ethernet Type
- Payload
- CRC
- Handling streaming time and IFGs
Milestone 2 focuses on enhancing the Ethernet payload:
- eCPRI and O-RAN Integration: The Ethernet payload now contains eCPRI, with the eCPRI payload including the O-RAN user plane.
- IQ Samples: IQ samples are included in the O-RAN user plane packet, sourced from a specified text file (
iq_file.txt). - File Looping: If more IQ samples are required than available in the input file, the program loops back to the beginning of the file.
- The first byte of eCPRI will be a dummy value.
eCPRI.Message: Set to0x00, representing user plane.eCPRI.PC_RTC: Fixed value0x00.eCPRI.SeqId: Starts from0and increments with each packet, resetting at255.
The setup file includes parameters for the packet generation process:
Eth.LineRate: Transmit rate in Gbps.Eth.CaptureSizeMs: Duration for which frames are generated (e.g., 10 ms).Eth.MinNumOfIFGsPerPacket: Minimum number of IFGs after each packet.Eth.DestAddress: Destination address (e.g.,0x010101010101).Eth.SourceAddress: Source address (e.g.,0x333333333333).Eth.MaxPacketSize: Maximum packet size in bytes.Oran.SCS: Control plane indicator.Oran.MaxNRB: Range from 0 to 255.Oran.NrbPerPacket: Resource blocks in one packet.Oran.PayloadType: Fixed or random payload type.Oran.Payload: Name of the text file for IQ samples.
-
Prepare the setup file with the required configurations.
-
Ensure
iq_file.txtis available in the specified path. -
Open the command prompt and navigate to the project folder path.
-
Compile the program using the following command:
g++ main.cpp EthernetPacket.cpp eCPRIPacket.cpp FileWriter.cpp IQSampleReader.cpp ORANPacket.cpp PacketConfig.cpp Utils.cpp -o program_output
-
Wait for the executable to be created, then run the program with the following command:
program_output.exe <configuration_file_name> <text_file_in_which_the_packets_will_be_dumped>
Documentation: Refer to the O-RAN SC documentation for protocol standards and implementation guidance.