# rs_iq_player **Repository Path**: peter0755shi/rs_iq_player ## Basic Information - **Project Name**: rs_iq_player - **Description**: No description available - **Primary Language**: Unknown - **License**: LGPL-2.1 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-02-20 - **Last Updated**: 2026-02-20 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Rohde & Schwarz IQ Player ## About the application R&S IQ Player application enables streaming of signals from a user PC to R&S SMW or SMM. The data that is streamed can be a _unicast_ stream (one PC to one R&S SMW/M) or a _multicast_ stream (one PC to multiple R&S SMW/M). Users can control a streaming session, i.e. - start, pause or stop a stream, from the GUI or remotely using SCPI commands. R&S IQ Player supports both Windows and Linux. Architecture wise, in Windows, the application uses legacy socket based communication relying on the native TCP/IP network stack. In Linux, [DPDK](https://www.dpdk.org/) is used to overcome the drawbacks of the legacy TCP/IP network stack, thus achieving much higher transmission data rates compared to Windows. ## Terms used - Host PC: the machine where the R&S IQ Player application runs - Siggen: R&S SMW or SMM ## Installation ### Windows - Install the application with the ```RS_IQPlayer-_YYYYMMDD-win64.exe``` file like a regular Windows installation process ### Linux - Install the dependencies and set up the Linux system as mentioned in [Linux setup](#linux-setup). - Install the ```RS_IQPlayer-_YYYYMMDD-Linux.deb``` file with the command ```sudo dpkg -i RS_IQPlayer-_YYYYMMDD-Linux.deb``` ### Note - ``````: the version of the installer. e.g. - ```1.0.2``` - ```YYYYMMDD```: build date ## Performance The following numbers are based on the results achieved for _unicast_ streaming with the mentioned hardware in the lab at R&S - Windows: 50 Msamples/s signals that translates to an average data transmission rate of 1.6 Gbps - Linux: 1 Gsamples/s signals that translates to an average data transmission rate of 32 Gbps - Hardware - _PC_: Dell OptiPlex Tower Plus 7010 Intel Core i5 (Motherboard - 02J54D). [Reference Product](https://www.dell.com/de-de/shop/desktops-all-in-ones-pcs/optiplex-tower/spd/optiplex-7010-desktop/gctoo7010mtemea_vp?redirectTo=SOC) - _Network Card_: Intel Corporation Ethernet Controller XL710 for 40GbE QSFP+. [Reference Product](https://www.intel.com/content/www/us/en/products/docs/network-io/ethernet/network-adapters/ethernet-xl710-brief.html) - _Data Storage (SSD)_: KXG80ZNV1T02 NVMe KIOXIA 1024GB. [Reference Product](https://europe.kioxia.com/de-de/business/ssd/client-ssd/xg8.html) - _QSFP+ cable_: 56G QSFP+ Optical cable. [Reference Product](https://www.fs.com/de/products/71520.html?attribute=11077&id=3938917) ## GUI The image below shows the user interface of R&S IQ Player ![GUI_Screenshot_w_Wv_File.png](images/GUI_Screenshot_w_Wv_File.png) - Two buttons to select streaming configuration and waveform files respectively. - Streaming configuration selector button is disabled once a valid file is selected - If it is required to be changed, the application needs to be restarted - Waveform selector button is disabled when streaming starts. - To select a new waveform file, the current streaming session needs to be stopped - An information button on the top right that, when clicked, displays the network information and the waveform characteristics of the waveform file - The IP of the signal generator to which the host PC is connected is displayed - The hostname and the SCPI port in the host PC is displayed - The slider shows the current streaming progress - ```Samples``` field, when streaming starts, displays the number of samples that has been sent to the signal generator (in real-time) - Play/pause and stop button to control streaming The image below shows an instance when the streaming process has started. Additionally, the dialog box when the information button is clicked, is also shown. Note that the ```DPDK PCI Addr``` is populated only for Linux. ![GUI_Screenshot_w_NW-&-Wv-Info_Dialog.png](images/GUI_Screenshot_w_NW-%26-Wv-Info_Dialog.png) ## Features The following table mentions the features supported by R&S IQ Player as of now: | # | Feature | Comments | |----|--------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 1 | Windows OS | Tested on Windows 11 | | 2 | Linux OS | Tested on Debian 11 | | 3 | Unicast & Multicast Streaming | Data can be sent to one (_unicast_) or multiple siggens (_multicast_). Multicast streaming is achieved with a L2 switch in between the PC and the siggens, and identical data is streamed to multiple destinations | | 4 | Local controllability | With the **GUI**, the application can be controlled locally | | 5 | Remote controllability | 10 **SCPI** commands to control the application completely remotely. The network configuration file must be passed as a command line argument when the application is started for complete remote control right from the start. | | 6 | File transfer control at the host PC | Starts and stops **FTP** service to enable file transfer to the host PC | | 7 | Continuous streaming | Streams the waveform file in a loop, i.e. - when the streaming file reaches its end, the application automatically streams again from the beginning of the IQ data | | 8 | Pause/Continue | Streaming can be paused. When continued, the stream starts at the point where it was paused | | 9 | Multi-instance | Users can launch the application multiple times to stream different waveform files on different NICs on the PC. _Correct network configuration file must be given as input for the respective network ports._ | | 10 | Real time information | GUI shows the instantaneous number of samples streamed | | 11 | Encrypted waveform files | Application supports streaming of both encrypted and non-encrypted waveform files | | 12 | Command Line Arguments | Application supports three command line arguments
```-p```: scpi server listening port
```-c```: network configuration file
```-w```: waveform file to be streamed | ## RSArbStream Library (and building your own streaming application) With the APIs of ```RSArbStream``` library, it is possible to build user-specific streaming application that requires custom modifications of the IQ data that is streamed. An example of how to consume the API ```RSArbStream rs_arbstream(streaming_data_config, example_buffer_filler)``` is provided in file ```example/example_app.cpp``` ## Setup (Unicast streaming) It is recommended that the PC and the R&S SMW/SMM are point to point connected (without any switch in between the sender and the receiver) to avoid packet re-ordering or drops which hinders streaming. The setup used in the lab is shown below for reference. The orange cable is a QSFP+ cable that directly connects the Host PC to a SMW 200A. ![IQ_Streaming_Setup.jpg](images/IQ_Streaming_Setup.jpg) ## Setup (Multicast streaming) - Multicast streaming is achieved with a L2 switch in between the PC and the siggens, with no addtional configurations in the switch other than operating it in L2 mode. - Switch: [Lancom GS-4530XP](https://www.lancom-systems.de/produkte/switches/fully-managed-access-switches/lancom-gs-4530xp) - Connections - PC to one switch port - _n_ switch ports to _n_ siggens - Check [Multicast streaming configuration](#multicast-streaming-configuration) for configuration details ## Inputs for the application The application requires two inputs 1. **_Configuration file_** - ```Sample_Configuration_File.txt``` is an example file that is present in this repository. It is important that all the fields in the file are correctly mentioned. | Key | Description | |--------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | src_mac | MAC address of the port of the PC that is connected to the SMW/SMM | | dst_mac | **Unicast**: MAC address of the port of the SMW/SMM connected to the PC, e.g. 00:90:b8:dd:ee:ff
**Multicast**: MAC address with the first byte being 01, e.g, 01:90:b8:dd:ee:ff | | num_dst_siggens | **Unicast**: 1; **Multicast**: n, where n is the number of destination siggens | | src_ipv4 | IP4 address of the port of the PC that is connected to the SMW/SMM | | dst_ipv4 | IP4 address of the port of the SMW/SMM that is connected to the PC | | src_udp_port | UDP port number at the PC | | dst_udp_port | UDP port number at the SMW/SMM | | trigger_mode | Triggering mode to start streaming once the buffers at the SMW/SMM are filled initially. Values: ```siggen``` (to trigger from the SMW/SMM), ```user``` (for automatic trigger) | | scpi_listening_port | port on which the SCPI server listens for SCPI commands | | dpdk_port_pci_addr1 | relevant for linux only. e.g. - ```0000:01:00.0```. See note below | 1The command ```sudo lspci``` can be used to find the pci address. Sample output of the command is presented below for a dual port Ethernet Controller ``` $sudo lspci 0000:01:00.0 Ethernet controller: Intel Corporation Ethernet Controller XL710 for 40GbE QSFP+ (rev 02) 0000:01:00.1 Ethernet controller: Intel Corporation Ethernet Controller XL710 for 40GbE QSFP+ (rev 02) ``` 2. **_Waveform File_** - The waveform file in ```.wv``` format that is to be streamed. **Note**: Streaming control buttons, e.g. - the play/pause or stop buttons, are disabled by default. Only when both the files are loaded, the control buttons are enabled in the GUI. ## How to run/operate the application - Configuration of signal generator: pre-requisite for streaming. Once streaming starts, it is NOT possible to change the device configuration. If changed, streaming fails and it is necessary to restart it again with the new configuration, where "configuration" refers to the following parameters: - RF state (switch on/off) - Baseband Offsets (Frequency, Phase or Gain) - RF Frequency and RF Level - Load the two [input files](#inputs-for-the-application), i.e. - network configuration and waveform file. Start/pause/continue/stop streaming. - **It is mandatory** to use different SCPI port numbers in the network configuration file if multiple instances of the application are launched on the same PC. - Streaming can be managed either locally from the GUI, or remotely with the [SCPI commands](#scpi-commands) - Users can stream different waveform files without exiting the application simply by stopping the current streaming and then loading a different waveform file. - **Restriction**: it is not possible to load another network configuration file once it is loaded. To load a different network configuration file, the application needs to be re-run. ## Example Scenario: trigger settings for streaming on two Basebands (A and B) when signal playback shall be synchronous and triggered from the host PC - Baseband A - [Host PC] Streaming configuration file: set ```trigger_mode``` as ```siggen``` - [SMW] In ```Trigger In``` tab set ```Source``` to ```Internal (Baseband B)``` - Baseband B - [Host PC] Streaming configuration file: set ```trigger_mode``` as ```user``` - [SMW] In ```Trigger In``` tab set ```Source``` to ```Internal``` - Now start streaming first on baseband A. When in the CLI it says "Waiting for trigger from Signal Generator...", start streaming on baseband B and baseband A will be triggered as soon as the auto-trigger point is reached while streaming on baseband B. ## Multicast streaming configuration - [Siggen]: Set the same IP addresses for all the siggen ports - [Host PC]: Configuration file - set the field ```num_dst_siggens``` to the number of destination siggens - set the filed ```dst_mac``` to a multicast MAC address, i.e. the first byte is 01 e.g. - 01:90:b8:dd:ee:ff ## SCPI commands - R&S IQ Player responds to the following query and action commands mentioned in the table below. - **Note**: The commands are supported in their long form (as mentioned below) or the short form (only the uppercase parts). A mix of long and short forms is not allowed. - The commands below have been tested using telnet. In the event of undesired responses, from the application, to commands generated using other tools, please contact us. - An example sequence of SCPI commands to stream one file (**NOTE** the double quotes for the file names), stop it and stream another file is given below (in Linux): 1. Run the application: ```sudo rs_iqplayer -p 5025``` 2. ```:IQPLayer:CONFig:LOAD "MyStreamingConfiguration.txt"``` 3. ```:IQPLayer:WAVeform:LOAD "MyWaveFormFile.wv"``` OR (with full path) ```:IQPLayer:WAVeform:LOAD "C:\WaveformFiles\MyWaveFormFile.wv"``` 4. ```:IQPLayer:STATe STARt``` 5. ```:IQPLayer:STATe STOP``` 6. ```:IQPLayer:WAVeform:LOAD MyNewWaveFormFile.wv``` 7. ```:IQPLayer:STATe STARt``` | Type | Command | Explanation | |---------|-------------------------------------------------------------------|------------------------------------------------------------------| | Query | *IDN? | Get the network endpoint information "Machine name:SCPI Port" | | Query | :IQPLayer:CONFig:LOAD? | Get name of streaming configuration file that is loaded | | Query | :IQPLayer:WAVeform:LOAD? | Get name of waveform file that is loaded | | Query | :IQPLayer:STATe? | Get current streaming state (STARt \| PAUSe \| CONTinue \| STOP) | | Action | :IQPLayer:CONFig:LOAD \ | Set/load the streaming configuration file name | | Action | :IQPLayer:WAVeform:LOAD \ | Set/load the waveform file that would be streamed | | Action | :IQPLayer:STATe \ STARt \| PAUSe \| CONTinue \| STOP | Starts/pauses/continues/stops streaming | ## Linux setup ### Install dependencies (DPDK, qt, boost and other packages) - Run the bash script located in the ```scripts``` folder: ```$sudo ./install-dependencies-linux.sh``` ### System configuration for DPDK Run the following commands to prepare your system for R&S IQ Player. The commands have been taken from the official [DPDK documentation](https://doc.dpdk.org/guides/linux_gsg/sys_reqs.html#running-dpdk-applications) 1. sudo ifconfig down - e.g.: ```sudo ifconfig enp1s0np0 down``` 2. sudo modprobe vfio-pci 3. sudo dpdk-devbind.py -b vfio-pci - e.g.: ```sudo dpdk-devbind.py -b vfio-pci 0000:01:00.0``` 4. sudo dpdk-hugepages.py -p 1G --setup 2G Note: It is possible to automate the DPDK configuration step by adapting the bash script ```dpdk-setup-linux.sh``` in the ```scripts``` folder # For the TECH-SAVVY ## Scripts Several bash (.sh files for Linux) and batch (.bat files for Windows) scripts are provided in the ```scripts``` folder with the description as follows | Name | Description | |-----------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------| | dpdk-setup-linux.sh | configures the linux system to execute dpdk applications | | install-dependencies-linux.sh | installs DPDK and other dependencies | | user-setup-build-from-source-linux.sh | - installs all dependencies
- Configures conan and installs libraries for R&S IQ Player.
- Builds the application | | run.sh | runs the application (optional: along with building, or installing conan dependencies) | | ftp-server-setup-linux.sh2 | create a new user "instrument" and sets up a folder that can used for FTP access. Enter the required password when setting up the user | 2If the user ```instrument``` already exists, then comment out the line ```sudo adduser $USERNAME``` in the script and then run it. Further if a folder ```ftp``` exists for a pre-existing user ```instrument``` then comment out the next line and proceed. (goes without saying that, it is assumed that ```files``` folder does not pre-exist). It is IMPORTANT to set the FTP server to this path since the application searches this path, additionally, for files when that a user wants to stream. For waveform files already transferred to the host PC via FTP, the user can just mention the name of the file in the SCPI command. The application automatically looks in the FTP path for the file. In case it is absolutely necessary to setup a FTP default path for another user/path, the same needs to be changed in the variable ```std::string m_ftp_default_path``` in the file ```StreamingManager/StreamingManager.h```. ## Software Architecture The diagram below gives demonstrates of how various components of the R&S IQ Player interact with each other. With the API of the ```RSArbStream``` library, it is possible to build a custom application that would suit the requirements - e.g. - if it is required to stream IQ samples from methods other than a ```.wv``` file ![RSIQPlayer_Architecture.png](images/RSIQPlayer_Architecture.png) ## Building and Running from source - Clone git repo: ```$git clone https://code.rsint.net/1g-siggen/1g-software-products/arb-stream.git``` - Change directory to project root: ```$cd arb-stream``` - The following method uses [conan](https://conan.io/) version 1.66 and assumes that the conan remote is conancenter. For custom remotes, it is necessary to add the necessary lines after the line ```pip install conan==1.66 pyelftools==0.27``` in the ```user-setup-build-from-source-linux.sh``` script - To configure conan with custom remotes, add the command ```conan remote add ``` - [Reference](https://docs.conan.io/1/reference/commands/misc/remote.html) for ```conan add``` command ### Linux - Run the script ```$./scripts/user-setup-build-from-source-linux.sh``` - [Optional] Setup FTP server - run the script ```$./scripts/ftp-server-user-setup-linux.sh``` - Run the application (post installation of conan packages). This will take some time - ```./scripts/run.sh install``` ### Windows Note: In case of custom conan remotes, please add them before running the following commands - ```mkdir build && cd build``` - ```conan install .. -b missing -s build_type=Release -o qt:qtsvg=True``` - ```conan build ..``` - ```.\build\app\Release\rs_iqplayer.exe``` ### [Windows] QT Platform Plugin error In Windows, this error indicates that the environmental variable ```QT_PLUGIN_PATH``` need to be set. In Powershell it can be set using ```$env:QT_PLUGIN_PATH=```. The required plugins for R&S IQ Player are placed in qt_plugins_release folder. These plugins can be using an e.g. command like: ```$env:QT_PLUGIN_PATH="C:/arb-stream/qt_plugins_release"``` (assuming arb-stream folder is in the C: drive) Note: The plugins are taken from the path where ```conan``` puts them during ```qt``` installation. The infomration is present in the ```conanbuildinfo.txt``` file under the ```build``` folder. ### To use command line arguments - The execution commands mentioned above for both Linux and Windows does not start the scpi server. - To start scpi server and use other command line args: ```$sudo ./build/Release/app/rs_iqplayer -p scpi_port -c -w ``` ## Bonus tips (that could save your time) ### Enable debugging of DPDK programs - ```sudo sysctl -w fs.protected_fifos=0``` ### Automatically configure DPDK on system reboot for the local machine 1. create file: ```sudo vi /etc/rc.local``` 2. file permissions: ```chmod 755 /etc/rc.local``` 3. rc.local file content: ``` #!/bin/bash /path/to/dpdk/setup.sh/script exit 0 ``` 4. verify with a reboot that dpdk-devbind.py gives expected output 5. Sample setup script is provided in *Reference*: [Stack Overflow](https://unix.stackexchange.com/questions/473901/execute-script-at-startup) ### When bash scripts are not recognized in Linux - Run this command: ```sed -i -e 's/\r$//' ``` - Then run the bash script as usual ### CLION IDE specific - run DPDK application without root privileges The permissions of the right vfio device are needed to be updated: owned by the respective user [1] 1. Check the vfio device ``` $ls -l /dev/vfio/ total 0 crw------- 1 anindya root 242, 0 Jul 17 15:24 12 crw-rw-rw- 1 root root 10, 196 Jul 17 15:24 vfio ``` In the above output the device is ```12``` 2. Change permissions: ```sudo chown /dev/vfio/12``` Note: This might be needed for remote development (develop and build in a remote linux machine) in CLion. As of 17.07.2024, it is not possible to run/debug the DPDK application (error is thrown by CLion) with the ```Run with root priviledges``` option enabled. [2] *References*: - [1] [Stack Overflow](https://stackoverflow.com/questions/65274122/running-dpdk-c-program-without-root-privileges) - [2] [CLion](https://youtrack.jetbrains.com/issue/CPP-34858/Run-debug-fails-with-Error-running-programCannot-sudo-on-this-system-no-suitable-utils-found)