[[Include(WikiToC)]] == Spectrum visualization with Fosphor == === Description === This tutorial illustrates use of [https://archive.fosdem.org/2015/schedule/event/rfnocfosphor/attachments/slides/804/export/events/attachments/rfnocfosphor/slides/804/fosdem2015_rfnoc_fosphor.pdf RFNoC Fosphor block for spectrum visualization]. RFNoC Fosphor block is the FPGA accelerated version of [https://projects.osmocom.org/projects/sdr/wiki/Fosphor gr-fosphor (CPU/GPU version)]. As any other RFNoC blocks, RFNoC Fosphor can be instantiated on 3rd generation USRP devices, and can be used in conjunction with gnuradio-companion(GRC) on the host computer. This tutorial demonstrates GRC RFNoC Fosphor application on USRP-2974 in [wiki:Hardware/sdr/usrp2974 COSMOS testbed]. Running a GRC application on a testbed node requires using graphical user interface(GUI) on the node. This tutorial shows how to setup a MobaXterm session with X11 forwarding in order to access the GRC GUI. The node image used in this tutorial also has a desktop environment and chrome remote desktop server installed, enabling platform-independent remote desktop access. === Prerequisites === In order to access the test bed, create a reservation and have it approved by the reservation service. Access to the resources is granted after the reservation is confirmed. Please follow the process shown on the COSMOS [wiki:GettingStarted getting started] page to get started. === Resources required === 1 USRP-2974 (sdr2-md1 or sdr2-s1-lg1) on COSMOS SB1 or COSMOS bed. === Tutorial Setup === Follow the steps below to gain access to the [wiki:/Architecture/Domains/cosmos_sb1 sandbox 1 console] and set up nodes with appropriate images. 1. If you don't have one already, sign up for a [https://www.cosmos-lab.org/portal-2/ COSMOS account] 1. [wiki:/GettingStarted#MakeaReservation Create a resource reservation] on sandbox 1 1. [wiki:/GettingStarted#LogintoyourReservation Login] into sandbox 1 console (console.sb1.cosmos-lab.org) with an SSH session. SSH session for COSMOS SB1 with MobaXterm can be setup as shown, with remote host = console.sb1.cosmos-lab.org, and username = your COSMOS username. X11 forwarding is enabled to access GUI. [[Image(mobaxterm_sb1_session.JPG, width=600px)]] 1. Make sure all the nodes and devices used in the experiment are turned off: {{{#!shell omf tell -a offh -t sdr2-s1-lg1 }}} 1. Load rfnoc_fosphor_uhd4_4.ndz on sdr2-s1-lg1. {{{#!shell omf load -i rfnoc_fosphor_uhd4_4.ndz -t sdr2-s1-lg1 }}} 1. Turn the SDR on and check the status {{{#!shell omf tell -a on -t sdr2-s1-lg1 }}} {{{#!shell omf stat -t sdr2-s1-lg1 }}} 1. Log into the SDR with -Y for X11 forwarding {{{#!shell ssh root@sdr2-s1-lg1 -Y }}} [[CollapsibleStart(Configure MobaXterm for node access)]] Another way to access the SDR is to set up a MobaXterm session directly to the SDR, with the console as the jump host. As shown in the pictures below, for the SSH session, use remote host = sdr2-s1-lg1.sb1.cosmos-lab.org username = root. Enable X11 forwarding in advanced settings. Set up jump host in network settings, with gateway host = console.sb1.cosmos-lab.org, username = your cosmos username. [[Image(nodessh.JPG, width=600px)]] [[Image(jumphost.png, width=600px)]] The following is displayed when this session runs. {{{#!shell ┌────────────────────────────────────────────────────────────────────┐ │ • MobaXterm 20.6 • │ │ (SSH client, X-server and networking tools) │ │ │ │ ➤ SSH session to root@sdr2-s1-lg1.sb1.cosmos-lab.org │ │ • SSH gateway : ✔ (myusername@console.sb1.cosmos-lab.org) │ │ • SSH compression : ✔ │ │ • SSH-browser : ✔ │ │ • X11-forwarding : ✔ (remote display is forwarded through SSH) │ │ • DISPLAY : ✔ (automatically set on remote server) │ │ │ │ ➤ For more info, ctrl+click on help or visit our website │ └────────────────────────────────────────────────────────────────────┘ Last login: Fri Dec 11 04:49:36 2020 from 10.106.0.21 root@sdr2-s1-lg1:~# }}} [[CollapsibleEnd]] === Experiment Execution === ==== Chrome Remote Desktop Setup ==== Setup chrome remote desktop access to the SDR as shown [wiki:UserGuide/RemoteAccess/ChromeRemoteDesktop#ChromeRemoteDesktopSetupPage here]. The following steps can be run in the remote desktop session. ==== RFNoC Fosphor FPGA image ==== Custom USRP-2974 FPGA image /usr/local/share/fosphor_bit/usrp_x310_fpga_XG.lvbitx will be used for this tutorial. This can be verified by looking at the RFNoC blocks as follows. {{{#!shell uhd_usrp_probe --args="resource=RIO0, fpga=XG }}} [[Image(usrp_probe_fosphor.PNG, width=600px)]] ==== Run rfnoc-fosphor GRC application ==== Open the fosphor flowgraph with GNURadio Companion {{{#!shell gnuradio-companion /usr/local/share/gnuradio/examples/uhd/rfnoc_fosphor.grc }}} {{{ native@sdr2-md1:/usr/local/share/fosphor_bit$ gnuradio-companion /usr/local/share/gnuradio/examples/uhd/rfnoc_fosphor.grc <<< Welcome to GNU Radio Companion v3.11.0.0git-848-g6fd69852 >>> Block paths: /home/native/.local/state/gnuradio /usr/local/share/gnuradio/grc/blocks Loading: "/usr/local/share/gnuradio/examples/uhd/rfnoc_fosphor.grc" >>> Done Generating: "/tmp/rfnoc_fosphor.py" Executing: /usr/bin/python3 -u /tmp/rfnoc_fosphor.py }}} [[Image(rfnoc_fosphor_grc.png, width=800px)]] Run the application (by pressing the "Run" button) to view the spectrum display, and adjust the center frequency and bandwidth using the sliders located at the top and bottom of the window. [[BR]] [[Image(rfnoc_fosphor_2_4G.PNG, width=800px)]]