wiki:Tutorials/k0SDR/Tutorial01a

Simple radio example with GNURADIO benchmark scripts

Table of Contents

  1. SDR Tutorials
    1. Working with USRP2 - Universal Software Radio Peripheral
      1. Description
      2. Hardware / Software Resources utilized
      3. Set up
      4. Usage
      5. Capture waveform and record to file & add time-domain plot of waveform
      6. Troubleshooting
    1. Working with USRP X310
      1. Description
      2. Hardware / Software Resources Utilized
      3. Set Up
        1. Imaging
        2. Accessing the Nodes
        3. Configuring the Network Interface
        4. Setting up GNU Radio
      4. Building the GNU Radio Flowgraphs
        1. Transmitter
        2. Receiver
      5. Running the Experiment
      6. Troubleshooting
        1. xterm Executable Not Found
        2. FPGA Compatibility Mismatch
    1. Simple radio example with GNURADIO benchmark scripts
      1. Description
      2. Hardware / Software Resources utilized
      3. Set up
      4. Running GNU Radio benchmark scripts
      5. Outputs from transmitter and receiver
      6. Troubleshooting
    1. Simple radio example with GNURADIO benchmark scripts (OEDL)
      1. Description
      2. Hardware / Software Resources utilized
      3. Set up
      4. Running OEDL script and viewing results
      5. OEDL script
    1. OFDM radio example with GNURADIO benchmark scripts
      1. Description
      2. Hardware / Software Resources utilized
      3. Set up
      4. Running OEDL script
    1. Spectrum sensing with USRP2 and wiserd
      1. Description
      2. Hardware / Software Resources utilized
      3. Set up
      4. Generate signal source file using octave
      5. Set up transmitting node
      6. Set up receiving node(s)
    1. Spectrum sensing with USRP2 and wiserd (OEDL and OML)
      1. Description
      2. Hardware / Software Resources utilized
      3. Transmit predefined tone
      4. Record spectrum data to an OML file
      5. Performing the experiment using OEDL
    1. Transmitting wideband signals using USRP X310 and wiserd
      1. Description
      2. Transmitting a signal using wiserd
      3. Creating the signal
    1. Running DSC match script from the grid console
    1. Working with GNURadio and Nutaq ZeptoSDR
      1. Description
      2. Set up
      3. Run the GRC scripts
    1. Realtek 2832 EZCap - A Frugal SDR
      1. Prereqs
      2. A cheap spectrum analyzer
    1. MacSwitch (Obsolete)
      1. Prerequisites
      2. Start Mac Switch
    1. Zynq-based WISER platform - Start-up test
      1. Description
      2. Hardware / Software Resources utilized
      3. Set up
      4. Loading the Zedboard
      5. Running a start up test
    1. Zynq-based WISER platform - Spectrum Sensing
      1. Description
      2. Hardware / Software Resources utilized
      3. Set up
      4. Start spectrum sensing
    1. Zynq-based WISER platform - Spectrum sensing with multiple nodes (OEDL)
      1. Description
      2. Hardware / Software Resources utilized
      3. Spectrum sensing with an OEDL script
    1. Zynq-based WISER platform - Building the Firmware
      1. Description
      2. Getting the FPGA source code
      3. Building the FPGA design
      4. Building ARM core software
    1. Nutaq - PicoSDR start-up and configuration
      1. Description
      2. Set up
      3. Launch demo scripts
    1. Multi channel sample collection with x310
      1. Description
      2. Set up
      3. Collect samples
    1. Getting started with RFNoC X310
      1. Description
      2. Set up
      3. Find USRP X310s
      4. Program the FPGA
    1. Multi Channel Sample Processing & Visualization
      1. Hardware / software resources utilized
      2. Receive multi channel signal for processing and plotting
      3. Transmit a signal using a single usrp
    2. Plot the IQ Constellation of received signal
      1. Multi-channel Uhd STreamer (MUST)
      2. Description
      3. How it works (without going into the source-code :-D
      4. Source code & compilation
      5. Hardware interface application
      6. XML file
      7. Command server
      8. Usage Example
      9. Signal handler applications
      10. Tutorials
    1. Using two RFNoC streams simultaneously on a single USRP device
      1. Description
      2. Set Up
      3. Running the Simulation
    1. Using 2 transmit or 2 receive antennas simultaneously
      1. Description
      2. Set Up
      3. Running the Experiment
    1. Generate random transmissions emulating Primary Transmitters
      1. Description
      2. Set Up
      3. Running the Experiment
    1. RFNoC Spectrum Sensing
      1. Description
      2. Set Up
        1. Prepare Receive Node
        2. Prepare Receive USRPs
        3. Prepare Transmit Node
        4. Prepare Transmit USRP
        5. Set up SSH tunnel from your local port 5100 to grid.orbit-lab.org:5100
        6. Set up a web proxy for the receive node
      3. Run the experiment
    1. Full-Duplex Wireless using USRP N210
      1. Description
        1. Technical Report
        2. Updates
      2. Hardware / Software Resources Utilized
      3. Set Up
      4. Run the Experiments
      5. Example Experiment 1: A Real-Time Full-Duplex Radio with OFDM PHY (GNU …
      6. Example Experiment 2: A Simple Full-Duplex Radio Experiment (Terminal …
        1. In Terminal 1
          1. In Terminal 2 (SUB-20)
        2. A Secondary Transmitter Using Node13-8
        3. Acknowledgements
    1. LTE Traffic Trace Collection
      1. Description
      2. Setup OAI emulation framework
      3. Connecting UE to LTE network
      4. Connecting Multiple UEs
      5. Enabling OAI logging Module
      6. Application Design
      7. Running OAI using scripts
    1. Simple Radio Example with USRP X310 on ORBIT Sandbox 2
      1. Description
      2. Set Up
        1. Prepare the nodes
        2. Prepare network setup for USRP access
      3. Run the experiment
    1. Wideband Channel Sounding with USRP X310s
      1. Description
      2. Set Up
        1. Prepare Receive Node
        2. Prepare Receive USRPs
        3. Prepare Transmit Node
        4. Prepare Transmit USRP
        5. Set up SSH tunnel from your local port 5100 to grid.orbit-lab.org:5100
        6. Set up a web proxy for the receive node
      3. Run the experiment

Description

This short example will utilize GNU Radio benchmarks scripts to transfer packets over a radio link between two nodes.

Hardware / Software Resources utilized

  1. Grid nodes with a USRP2 connect via Ethernet.
  2. baseline-sdr.ndz: disk image loaded onto nodes. This image has all the precompiled - software required to configure the USRP2s and all the required GNU Radio software libraries. The USRP2's interface with the node is already configured.
  3. GNU Radio - software library to create SDR. Click here for additional info.
  4. USRP2 - hardware platform for SDR. Click here for more info.

Set up

Running GNU Radio benchmark scripts

  • From two different terminals ssh into node19-19 and node20-20. Then change to the benchmark script's directory. For this example use node19-19 as the receiver and node20-20 as the transmitter.
    username@console.grid:~$ ssh root@node19-19
    root@node19-19:~# cd gnuradio/gr-digital/examples/narrowband
    
  • Start the receiver benchmark script
    root@node19-19:~/gnuradio/gr-digital/examples/narrowband# ./benchmark_rx.py -f 2.41G -m bpsk --rx-gain 10 -r .250M
    
    The parameters passed to the receiving script are as follows:

'-f 2.41G' ———> the carrier frequency to 2.41GHz

'-m bpsk' ———> the modulation mode to binary phase shift keying.

'-r .250M' ———> the bitrate to 250000 bits /sec

'—rx-gain 10' —> receiver front end gain to 10dB.

  • Start the transmitter benchmark script
    root@node20-20:~/gnuradio/gr-digital/examples/narrowband# ./benchmark_tx.py -f 2.41G -m bpsk --tx-gain 10 -r .250M --tx-amplitude .5
    
    The values passed to the transmitting script must be similar to the receiver script with the exception of radio specific parameters.

'—tx-gain 10' —> transmitter front end gain to 10dB.

Outputs from transmitter and receiver

  • Once a successful radio link has been established, the transmitted packets are received, decoded and verify by the gnu scripts. A sample output of the receiver is shown below.
    root@node19-19:~/gnuradio/gr-digital/examples/narrowband# ./benchmark_rx.py -f 2.41G -m bpsk --rx-gain 10 -r .250M
    linux; GNU C++ version 4.8.2; Boost_105400; UHD_003.008.002-86-g566dbc2b
    
    Using Volk machine: avx_64_mmx_orc
    -- Opening a USRP2/N-Series device...
    -- Current recv frame size: 1472 bytes
    -- Current send frame size: 1472 bytes
    ok =  True  pktno =    1  n_rcvd =    1  n_right =    1
    ok =  True  pktno =    2  n_rcvd =    2  n_right =    2
    ok =  True  pktno =    3  n_rcvd =    3  n_right =    3
    ok =  True  pktno =    4  n_rcvd =    4  n_right =    4
    ok =  True  pktno =    5  n_rcvd =    5  n_right =    5
    ok =  True  pktno =    6  n_rcvd =    6  n_right =    6
    ok =  True  pktno =    7  n_rcvd =    7  n_right =    7
    ok =  True  pktno =    8  n_rcvd =    8  n_right =    8
    ok =  True  pktno =    9  n_rcvd =    9  n_right =    9
    ok =  True  pktno =   10  n_rcvd =   10  n_right =   10
    ok =  True  pktno =   11  n_rcvd =   11  n_right =   11
    ok =  True  pktno =   12  n_rcvd =   12  n_right =   12
    ok =  True  pktno =   13  n_rcvd =   13  n_right =   13
    ok =  True  pktno =   14  n_rcvd =   14  n_right =   14
    ok =  True  pktno =   15  n_rcvd =   15  n_right =   15
    ok =  True  pktno =   16  n_rcvd =   16  n_right =   16
    ok =  True  pktno =   17  n_rcvd =   17  n_right =   17
    ok = False  pktno =   18  n_rcvd =   18  n_right =   17
    ^C
    

For the transmitter output should be similar to this:

root@node20-20:~/gnuradio/gr-digital/examples/narrowband# ./benchmark_tx.py -f 2.41G -m bpsk --tx-gain 10 -r .250M --tx-amplitude .5
linux; GNU C++ version 4.8.2; Boost_105400; UHD_003.008.002-86-g566dbc2b

Using Volk machine: sse4_2_64_orc
-- Opening a USRP2/N-Series device...
-- Current recv frame size: 1472 bytes
-- Current send frame size: 1472 bytes
................................................................................................................................................................................................................................................................................................................................................................................................................................................^C

Troubleshooting

  • If the receiving script is not showing any activity, it most likely the script parameters need to be tweaked. USRP radios (any radio in general) are not made the same due to variations in HW component quality and tolerances. Each radio has it's own sweet spot for best transmission and reception. For different USRPs on the grid (or other sandboxes) raising or lowering gains, amplitude, and/or other parameters is required to establish a solid radio link.

As an example if the gains are set too hi, signal can become saturated, clipped and distort at the analog-digital interface. If the gains are set too low, the signal will just blend in to the noise floor especially for simple modulation schemes. For a description of other parameters, use the —help command get a listing.

root@node19-19:~/gnuradio/gr-digital/examples/narrowband# ./benchmark_rx.py --help
  • To check the signal at the receiver, use the 'rx_ascii_art_dft' utility provided by UHD to view the spectrum:
    root@node19-19:~/gnuradio/gr-digital/examples/narrowband# /root/uhd/host/build/examples/rx_ascii_art_dft --freq 2.41e9 --rate 5e6 --gain 5 --ref-lvl -40
    
Last modified 8 years ago Last modified on Jun 12, 2017, 9:02:56 PM
Note: See TracWiki for help on using the wiki.