2.1.10. Streaming

Streaming application enables user to stream data from Red Pitaya to :

  • Local file stored on Red Pitaya SD card

  • Over ethernet to remote computer using UDP or TCP protocol

User is able to set:

  • Sampling frequency

  • Number of input channels

  • Input channel resolution

  • HV/LV mode (for 125-xx need to switch the jumper)

  • Using calibration (For 125-xx, the filter is also calibrated)

  • RAW / Volt

  • Number of samples or unlimited

Streamed data can be stored into:

  • Standard audio WAV file format

  • Technical Data Management Streaming (TDMS) file format

  • Fast and compact binary format (BIN), which can later be converted to CSV format.

Max. streaming speeds are limited to:

2.1.10.1. Start using Red Pitaya streaming feature

  1. ) Run streaming app from Red Pitaya WEB interface

    ../../../_images/redpitaya_main_page.png
  2. ) Stream locally to a file

    1. ) Set app properties & click RUN

      ../../../_images/to_file_settings.png

      Example: streaming on ch1, 8bit resolution 5.208Msps into TDMS file format

    2. ) Press STOP to stop streaming

    3. ) Click Browse to open file browser and download streaming data file

      ../../../_images/capture.png
    4. ) Open file in DIAdem software

      that supports TDMS file reading, visualization & processing.

      ../../../_images/diadem_tdms_file_viewer.png
  3. ) Streaming to remote computer

    1. ) Download streaming client to your computer.

    2. ) Set app properties & click RUN

      ../../../_images/tcp_settings.png

      Example: streaming on ch1, 16bit resolution 5Msps, TCP

    3. ) Run streaming app on remote computer (copy IP from the WEB interface and select required file format)

    rpsa_client.exe -h 192.168.1.29 -p TCP -f ./ -t wav
    
    ../../../_images/tcp_client.png

    Data streaming can be stopped by pressing Ctrl + C

    Created wav file can be read or visualized using Audacity software:

    ../../../_images/audacity.png

2.1.10.2. Console application

The server for streaming can be started not only using the web interface, but also through the command line.

root@rp-f07167:/# streaming-server
Missing parameters: Configuration file
Usage: streaming-server
        -b run service in background
        -c path to config file

To start the server, you need to do 3 steps:

  1. ) Load the FPGA image of streaming

    root@rp-f07167:/# cat /opt/redpitaya/fpga/fpga_streaming.bit > /dev/xdevcfg
    
  2. ) Prepare a configuration file.

  3. ) Launch a console application.

    root@rp-f07167:/# streaming-server -c /root/.streaming_config
    streaming-server started
    Lost rate: 0 / 763 (0 %)
    Lost rate: 0 / 766 (0 %)
    Lost rate: 0 / 766 (0 %)
    Lost rate: 0 / 766 (0 %)
    

The configuration for streaming is automatically created and saved in the file: /root/.streaming_config during editing the parameters in the web application.

Note

Any changes to the web application will automatically modify the configuration file. If you want to save the configuration, then make a copy of the file.

Note

The server can be started in the background. To do this, use the -b parameter. In this mode, the application can be used as a service at system startup. Service information from the application is saved in the syslog file (by default, the syslog is not installed on RP).

Note

Streaming always creates two files:
  • first stores streamed data

  • second data transfer report

Note

Streaming app source are available here: streaming app.