== RFNoC Spectrum Sensing == === Description === This tutorial shows how to use the RFNoC Spectrum Sensing block(CE) to plot receive power spectrum from multiple USRP X310s on ORBIT grid. === Set Up === Make a reservation on the [https://www.orbit-lab.org/schedule/ Orbit Scheduler] for using the grid. ==== Prepare Receive Node ==== * Load prasanthi-rfnoc-specsense-9-14.ndz on an ORBIT node. {{{ prasanthi@console.grid:~$ omf load -i prasanthi-rfnoc-specsense.ndz -t node1-19 }}} * Once imaging is done, turn the node on and log in {{{ prasanthi@console.grid:~$ omf tell -a on -t node1-19 prasanthi@console.grid:~$ ssh root@node1-19 }}} ==== Prepare Receive USRPs ==== * Pick USRP X310s from the MIMO racks 23-1...8, 23-11...18 and load spectrum sensing FPGA image on them. {{{ root@node1-19:~# uhd_image_loader --args="addr0=10.10.23.11,addr1=10.10.23.12,addr2=10.10.23.13,addr4=10.10.23.14" --fpga-path="/root/bit/x310_spec_sense_2ddc_1duc_7_14.bit" }}} * Power cycle USRPs so that the new FPGA image is active {{{ prasanthi@console.grid:~$ omf tell -a offh -t node23-11 prasanthi@console.grid:~$ omf tell -a on -t node23-11 }}} * Running uhd_usrp_probe on the X310s with spectrum sensing FPGA image should give the following {{{ | | _____________________________________________________ | | / | | | RFNoC blocks on this device: | | | | | | * DmaFIFO_0 | | | * Radio_0 | | | * Radio_1 | | | * DUC_0 | | | * DDC_0 | | | * DDC_1 | | | * SpecSense_0 | | | * FIFO_0 }}} ==== Prepare Transmit Node ==== Any source can be used to transmit a test waveform. In this tutorial, a spectrum spreader RFNoC block is being used to generate wideband PN signal. * Load prasanthi-channel-sounder.ndz on an ORBIT node. {{{ prasanthi@console.grid:~$ omf load -i prasanthi-channel-sounder.ndz -t node1-20 }}} * Once imaging is done, turn the node on and log in {{{ prasanthi@console.grid:~$ omf tell -a on -t node1-20 prasanthi@console.grid:~$ ssh root@node1-20 }}} ==== Prepare Transmit USRP ==== * Pick a USRP X310 for transmitting, and load the spectrum spreader FPGA image {{{ root@node1-20:~# uhd_image_loader --args="addr=10.10.23.17" --fpga-path="/root/bit/x310_spreader_4_28.bit" }}} * Power cycle the USRP so that the new FPGA image is active {{{ prasanthi@console.grid:~$ omf tell -a offh -t node23-17 prasanthi@console.grid:~$ omf tell -a on -t node23-17 }}} * Running uhd_usrp_probe on the X310 with spectrum spreader FPGA image should give the following {{{ | | _____________________________________________________ | | / | | | RFNoC blocks on this device: | | | | | | * DmaFIFO_0 | | | * Radio_0 | | | * Radio_1 | | | * DUC_0 | | | * Spreader_0 | | | * FIFO_0 | | | * FIFO_1 }}} ==== Set up SSH tunnel from your local port 5100 to grid.orbit-lab.org:5100 ==== {{{ ssh -L 5100:grid.orbit-lab.org:5100 username@grid.orbit-lab.org }}} ==== Set up a web proxy for the receive node ==== Use run-websock command to set up the proxy (this is required for remote web based streaming) {{{ prasanthi@console.grid:~$ run-websock 5100 10.10.1.19:5100 --daemon WARNING: no 'numpy' module, HyBi protocol will be slower WebSocket server settings: - Listen on :5100 - Flash security policy server - No SSL/TLS support (no cert file) - Backgrounding (daemon) }}} === Run the experiment === * Run rfnoc_spec_sense_display on the receive node. The command below starts the application to receive spectrum sensing samples from 4 USRP X310s at 100MSPS. {{{ root@node1-19:~/uhd/host/build/examples# ./rfnoc_spec_sense_display --args="addr0=10.10.23.11,addr1=10.10.23.12,addr2=10.10.23.13,addr3=10.10.23.14,skip_ddc,skip_duc" --freq 5e9 --gain 15 --ddc-args="input_rate=200000000.0,output_rate=100000000.0" --num-usrp 4 --spec-sense-args="avg_size=256" }}} * Run rfnoc_spreader on the transmit node. The command below starts the application to send a 50MHz wide PN signal on node23-17. {{{ root@node1-20:~/uhd/host/build/examples# ./rfnoc_spreader --args="addr=10.10.23.17,skip_ddc,skip_duc" --freq 5e9 --gain 15 --duc-args="input_rate=50000000.0,output_rate=200000000.0" }}} * Download spec_sense_display.html and open it in your browser. Once you click the Start button, you should see power spectrum display as shown below. || [[Image(spec_sense_display.jpg)]]||