Changes between Initial Version and Version 1 of Workshops/Sig Comm2022/group/labrador


Ignore:
Timestamp:
Aug 10, 2022, 5:23:02 PM (2 years ago)
Author:
jennyshane
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Workshops/Sig Comm2022/group/labrador

    v1 v1  
     1[[Include(WikiToC)]]
     2
     3= !SigComm 2022 Cosmos Testbed Tutorial =
     4
     5== Labrador Group ==
     6In 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.
     7
     8=== Resources Used ===
     9For this example we'll use two USRP b210 SDRs on [https://www.orbit-lab.org/wiki/Hardware/bDomains/aGrid grid]. These SDRs have a USB 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 [https://www.ettus.com/all-products/UB210-KIT/ this page] for more information.
     10
     11=== Tutorial Setup ===
     12 Follow the steps below to gain access to the console and set up your node with an appropriate image.
     13 1. Use ssh to connect to the console for the grid domain:
     14 {{{#!shell
     15 ssh your-username@console.grid.orbit-lab.org
     16 }}}
     17 NOTE: typically when using the testbed, you will have to reserve the domain you wish to use on the [https://www.orbit-lab.org/cPanel/controlPanel/start scheduler page]. We have already made the reservation for you.
     18
     19 2. Use OMF commands to load the baseline-uhd.sdr image on your resources.
     20
     21 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.
     22
     23 In this case, we're loading the "baseline-sdr.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.
     24 {{{#!shell
     25 omf load -i baseline-sdr.ndz -t node3-2,node8-7
     26 }}}
     27 This is a good opportunity to look at the output of the image loading process. At first glance, it can look like a lot of text, but there is some useful information there to help you understand what is going on. Here is the output of running the above command:
     28 
     29 [[Image(image-save.png)]]
     30 
     31 We can see from this output that the image loading process has two phases: the first, noted in red, in which OMF is waiting for the nodes to boot up and load a client which will receive the omf image data and write it to disk; and the second, noted in blue, in which OMF actually performs the imaging process. This output shows a successful imaging process-- we can tell because of the text noted in pink, which says that the imaging process is done and there were two nodes successfully imaged. The filename displayed there will contain a list of all the nodes which were successfully imaged. 
     32
     33 Once in a while, you may see an imaging process where some or all of the nodes fail to image. This can happen because something goes wrong either in the first step (a node fails to boot up and register with the imaging process) or in the second step (the node fails to load the image onto its hard disk). If there is a failure, it will be noted in the output at the end of the imaging process-- there will be additional files listed for nodes that fail to check in, and nodes in which imaging failed.
     34
     35 Always check the output to make sure that your nodes were successfully imaged.
     36
     37 3. Once the nodes are successfully imaged, turn them on and check the status
     38 {{{#!shell
     39 omf tell -a on -t node3-2,node8-7
     40 }}}
     41 {{{#!shell
     42 omf stat -t node3-2,node8-7
     43 }}}
     44 4. After waiting for the nodes to power up and boot, you will be able to ssh to them from the console:
     45 {{{#!shell
     46 ssh root@node3-2
     47 }}}
     48 
     49=== Experiment Execution ===
     50
     51==== Configure and detect the radio ====
     52
     53 1. Use {{{uhd_find_devices}}} to make sure that the onboard b210 SDR is detected:
     54
     55 [[Image(find_devices.png)]]
     56
     57 Notice 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 b210.
     58
     59 2.  Use the {{{uhd_usrp_probe}}} command to get more details on the b210. Specifying {{{type=b200}}} ensures only the directly connected radio is probed, instead of the radios on the network.
     60
     61 [[Image(uhd_probe.png)]]
     62
     63=== Run the experiment ===
     64For 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]
     65 1. ssh to node3-2 and start the rx_ascii_art_dft demo with the following command:
     66 {{{#!shell
     67 /usr/lib/uhd/examples/rx_ascii_art_dft --args "type=b200" --freq 2400e6 --rate 5e6 --frame-rate 10 --gain 10 --ref-lvl -30 --dyn-rng 70
     68 }}}
     69 Note that we are looking at the frequency band around 2.4GHz. You should see an output like this:
     70
     71 [[Image(rx-ascii-no-sig.png, width=1000px)]]
     72
     73 2. ssh to node8-7 and start the tx_waveforms demo with the following command:
     74 {{{#!shell
     75 /usr/lib/uhd/examples/tx_waveforms --args="type=b200" --wave-freq 1e6 --wave-type SINE --freq 2400e6 --rate 5e6 --gain 10 --ampl 0.2
     76 }}}
     77
     78 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:
     79 
     80 [[Image(rx-ascii-sine-sig.png, width=1000px)]]
     81
     82 We can generate a different type of signal by changing the {{{wave-type}}} argument. For instance, if we transmit a square wave:
     83 {{{#!shell
     84 /usr/lib/uhd/examples/tx_waveforms --args="type=b200" --wave-freq 1e6 --wave-type SQUARE --freq 2400e6 --rate 5e6 --gain 10 --ampl 0.2
     85 }}}
     86
     87 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.
     88 
     89 [[Image(rx-ascii-square-sig.png, width=1000px)]]
     90
     91 Both {{{tx_waveforms}}} and {{{rx_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.