Version 1 (modified by 19 months ago) ( diff ) | ,
---|
Site Navigation
MERIF 2023 Cosmos Testbed Tutorial
Otter Group
In this tutorial we'll demonstrate how to run a basic wireless experiment using software defined radios in the COSMOS testbed. Two COSMOS nodes will be used: one to transmit a signal, and the other to receive it.
Resources Used
For this example we'll use two USRP x310 SDRs on sb2.orbit. These SDRs have an ethernet connection to a PC, which is the device you're loading the orbit image onto and connecting to over ssh. They also have an fpga connected to the four antennas. We won't have to worry about the specifics of the USRP for this tutorial but you can look at the links on this page for more information.
Tutorial Setup
Follow the steps below to gain access to the console and set up your node with an appropriate image.
- Use ssh to connect to the console for the sb2.orbit domain:
ssh your-username@console.sb2.orbit-lab.org
NOTE: typically when using the testbed, you will have to reserve the domain you wish to use on the scheduler page. We have already made the reservation for you.
- Use OMF commands to load the merif2023-tutorial-image.ndz image on your resources.
OMF is a command line utility that is run from the console in order to manage nodes: turn them on and off, save the contents of the hard disk as an "image", and load saved images back onto them.
In this case, we're loading the "merif2023-tutorial-image.ndz" image, which is a pre-built image provided for researchers to use as a starting point. The image contains UHD 3.15 and Gnuradio 3.8 and uses Ubuntu 18.04.
omf load -i merif2023-tutorial-image.ndz -t node1-1,node1-2The output of this command can be a little intimidating, but make sure you should look for confirmation that both of your nodes were successfully imaged. An example of the output is below, with the outcome of the loading process highlighted in red.
- Once the nodes are successfully imaged, turn them on and check the status
omf tell -a on -t node1-1,node1-2
omf stat -t node1-1,node1-2
- After waiting for the nodes to power up and boot, you will be able to ssh to them from the console:
ssh root@node1-1
ssh root@node1-2
Experiment Execution
Configure and detect the radio on both nodes
- On the nodes, run the following command to configure the network interface to the SDR:
ip addr add 192.168.40.1/24 dev DATA2
- Use
uhd_find_devices
to make sure that the onboard x310 SDR is detected as in the following image:
Note that running this command with no arguments will sometimes detect other SDR resources in the testbed which are reachable over the network. We can ignore those for now and focus just on the onboard x310.
- Use the
uhd_usrp_probe
command to get more details on the x310 as in the following image. Specifying--args="addr=192.168.40.2"
ensures only the directly connected radio is probed, instead of the radios on the network.
Run the experiment
For this demo, we'll be running some of the demo applications that are installed with uhd. Source code for all of the samples can be found here: https://github.com/EttusResearch/uhd/tree/UHD-3.15.LTS/host/examples
- ssh to node1-1 and start the rx_ascii_art_dft demo with the following command:
/usr/lib/uhd/examples/rx_ascii_art_dft --args "addr=192.168.40.2" --freq 2400e6 --rate 5e6 --frame-rate 10 --gain 10 --ref-lvl -30 --dyn-rng 70
Note that we are looking at the frequency band around 2.4GHz. You should see an output similar to this:
- ssh to node1-2 and start the tx_waveforms demo with the following command:
/usr/lib/uhd/examples/tx_waveforms --args="addr=192.168.40.2" --wave-freq 1e6 --wave-type SINE --freq 2400e6 --rate 5e6 --gain 10 --ampl 0.2
As we can see from the arguments passed to the application, we are transmitting a 1MHz sine wave as a signal using 2.4GHz as the carrier frequency. On the DFT visualization on sdr2-md1, you should see a peak representing the transmitted signal:
We can generate a different type of signal by changing the
wave-type
argument. For instance, if we transmit a square wave:/usr/lib/uhd/examples/tx_waveforms --args="addr=192.168.40.2" --wave-freq 1e6 --wave-type SQUARE --freq 2400e6 --rate 5e6 --gain 10 --ampl 0.2
We can see that the spectrum of the received signal now contains multiple peaks. This is the result of the spectral characteristics of a square wave.
Both
tx_waveforms
andrx_ascii_art_dft
can take--help
as a command line argument, which will display the lists of arguments that you can provide and what each argument does. There are also a number of other demo applications in the/usr/lib/uhd/examples
directory, which you can take a look at.