Changes between Initial Version and Version 1 of Tutorials/Wireless/Basic Usage


Ignore:
Timestamp:
Feb 27, 2019, 5:23:04 PM (6 years ago)
Author:
nilanjan
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Tutorials/Wireless/Basic Usage

    v1 v1  
     1== Basic usage ==
     2
     3=== Desciption ===
     4In this tutorial we'll demonstrate how to navigate from the COSMOS sandbox to a single SDR on a node and run an application to read samples from the SDR.
     5
     6=== Prerequisites ===
     7Before getting started you'll need the following:
     8 1. sign up for a [https://cosmos-lab.org/portal-2/ COSMOS account]
     9 2. create a reservation for sandbox 1 using the [https://wiki.cosmos-lab.org/cPanel/controlPanel/start scheduler].
     10 3. some minimal knowledge or interest of Linux
     11
     12=== Set up ===
     13 * After your reservation request has been approved, you'll receive access to the sandbox1 console.
     14Open a terminal into console.sb1.cosmos-lab.org with a tunnel set up from localhost:5000 to srv1-lg1.sb1.cosmos-lab.org:9002
     15{{{
     16                                       Welcome to
     17   _____ ____   _____ __  __  ____   _____      _               ____
     18  / ____/ __ \ / ____|  \/  |/ __ \ / ____|    | |        /\   |  _ \
     19 | |   | |  | | (___ | \  / | |  | | (___ _____| |       /  \  | |_) | ___  _ __ __ _
     20 | |   | |  | |\___ \| |\/| | |  | |\___ \_____| |      / /\ \ |  _ < / _ \| '__/ _` |
     21 | |___| |__| |____) | |  | | |__| |____) |    | |____ / ____ \| |_) | (_) | | | (_| |
     22  \_____\____/|_____/|_|  |_|\____/|_____/     |______/_/    \_\____(_)___/|_|  \__, |
     23                                                                                 __/ |
     24                                                                                |___/
     25 Hostname         : console.sb1.cosmos-lab.org
     26 Operating system : Ubuntu 16.04.5 LTS; Kernel: 4.15.0-45-generic; Arch: x86_64;
     27 CPU              : 6 x Intel(R) Xeon(R) CPU E5-2630 v2 @ 2.60GHz
     28                    1 socket(s) with 6 core(s) per socket and 1 thread(s) per core
     29 Memory           : 3.9G
     30 Uptime           : up 4 days, 14 hours, 15 minutes
     31 Users logged in  : 0
     32Last login: Tue Feb 26 19:06:09 2019 from 165.230.132.125
     33}}}
     34
     35 * We can see the available nodes under this sandbox using the ''omf stat -t all'' command. The nodes list below should coinside with the [https://wiki.cosmos-lab.org/cPanel/controlPanel/start Inventory/Status page].
     36{{{
     37nilanjan@console:~$ omf stat -t all
     38
     39-----------------------------------------------
     40 Node: srv1-lg1.sb1.cosmos-lab.org       State: POWEROFF
     41 Node: srv2-lg1.sb1.cosmos-lab.org       State: POWEROFF
     42-----------------------------------------------
     43}}}
     44
     45 * For this example we'll use the node ''srv1-lg1.sb1.cosmos-lab.org'' and load the ''baseline-sdr.ndz'' image onto it. This image already has the applications pre-compiled and drivers installed.
     46{{{
     47console:~$ omf load -i baseline-sdr.ndz  -t srv1-lg1.sb1.cosmos-lab.org
     48}}}
     49 After the image is successfully loaded turn on the node, give it some time to boot and then ssh into it.
     50{{{
     51console:~$ omf tell -a on -t srv1-lg1.sb1.cosmos-lab.org
     52console:~$ ssh native@srv1-lg1.sb1.cosmos-lab.org
     53}}}
     54
     55 * Once you're in ''srv1-lg1.sb1.cosmos-lab.org'' configure the network interface so it can talk to the N310's data interface.
     56{{{
     57sudo ifconfig enp1s0 192.168.20.1
     58}}}
     59
     60 Run ''uhd_find_devices' and check if the N310 is detected
     61{{{
     62native@localhost:~$ uhd_find_devices
     63
     64[INFO] [UHD] linux; GNU C++ version 7.3.0; Boost_106501; UHD_3.13.1.0-0-unknown
     65--------------------------------------------------
     66-- UHD Device 0
     67--------------------------------------------------
     68Device Address:
     69    serial: 315A35A
     70    addr: 192.168.20.2
     71    claimed: False
     72    mgmt_addr: 10.110.1.3
     73    mgmt_addr: 192.168.20.2
     74    product: n310
     75    type: n3xx
     76}}}
     77
     78 We can also use ''uhd_usrp_probe'' to get more details.
     79{{{
     80native@localhost:~$ uhd_usrp_probe --args="mgmt_addr=10.110.1.3,addr=192.168.20.2"
     81[INFO] [UHD] linux; GNU C++ version 7.3.0; Boost_106501; UHD_3.13.1.0-0-unknown
     82[INFO] [MPMD] Initializing 1 device(s) in parallel with args: mgmt_addr=10.110.1.3,type=n3xx,product=n310,serial=315A35A,claimed=False,addr=192.168.22
     83
     84[INFO] [0/DmaFIFO_0] Initializing block control (NOC ID: 0xF1F0D00000000004)
     85[INFO] [0/DmaFIFO_0] BIST passed (Throughput: 1350 MB/s)
     86[INFO] [0/DmaFIFO_0] BIST passed (Throughput: 1341 MB/s)
     87[INFO] [0/DmaFIFO_0] BIST passed (Throughput: 1340 MB/s)
     88[INFO] [0/DmaFIFO_0] BIST passed (Throughput: 1349 MB/s)
     89[INFO] [MPM.PeriphManager] init() called with device args `mgmt_addr=10.110.1.3,product=n310'.
     90[INFO] [0/Radio_0] Initializing block control (NOC ID: 0x12AD100000011312)
     91[INFO] [0/Radio_1] Initializing block control (NOC ID: 0x12AD100000011312)
     92[INFO] [0/DDC_0] Initializing block control (NOC ID: 0xDDC0000000000000)
     93[INFO] [0/DDC_1] Initializing block control (NOC ID: 0xDDC0000000000000)
     94[INFO] [0/DUC_0] Initializing block control (NOC ID: 0xD0C0000000000002)
     95[INFO] [0/DUC_1] Initializing block control (NOC ID: 0xD0C0000000000002)
     96  _____________________________________________________
     97 /
     98|       Device: N300-Series Device
     99|     _____________________________________________________
     100|    /
     101|   |       Mboard: ni-n3xx-315A35A
     102|   |   eeprom_version: 1
     103|   |   pid: 16962
     104|   |   product: n310
     105|   |   rev: 5
     106|   |   rpc_connection: remote
     107|   |   serial: 315A35A
     108|   |   type: n3xx
     109|   |   MPM Version: 1.2
     110|   |   FPGA Version: 5.2
     111|   |   FPGA git hash: UNKNOWN
     112|   |   RFNoC capable: Yes
     113|   |
     114|   |   Time sources:  internal, external, gpsdo, sfp0
     115|   |   Clock sources: external, internal, gpsdo
     116|   |   Sensors: gps_locked, ref_locked, fan, get_gps_sky_sensor, temp, get_gps_time_sensor, get_gps_tpv_sensor
     117|   |     _____________________________________________________
     118|   |    /
     119|   |   |       RX Dboard: A
     120|   |   |     _____________________________________________________
     121|   |   |    /
     122|   |   |   |       RX Frontend: 0
     123|   |   |   |   Name: Magnesium
     124|   |   |   |   Antennas: TX/RX, RX2, CAL, LOCAL
     125|   |   |   |   Sensors: lo_locked, ad9371_lo_locked, lowband_lo_locked
     126|   |   |   |   Freq range: 1.000 to 6000.000 MHz
     127|   |   |   |   Gain range all: 0.0 to 75.0 step 0.5 dB
     128|   |   |   |   Gain range rfic: 0.0 to 0.0 step 0.0 dB
     129|   |   |   |   Gain range dsa: 0.0 to 0.0 step 0.0 dB
     130|   |   |   |   Gain range amp: 0.0 to 0.0 step 0.0 dB
     131|   |   |   |   Bandwidth range: 20000000.0 to 100000000.0 step 0.0 Hz
     132|   |   |   |   Connection Type: IQ
     133|   |   |   |   Uses LO offset: No
     134|   |   |     _____________________________________________________
     135|   |   |    /
     136|   |   |   |       RX Frontend: 1
     137|   |   |   |   Name: Magnesium
     138|   |   |   |   Antennas: TX/RX, RX2, CAL, LOCAL
     139|   |   |   |   Sensors: lo_locked, ad9371_lo_locked, lowband_lo_locked
     140|   |   |   |   Freq range: 1.000 to 6000.000 MHz
     141|   |   |   |   Gain range all: 0.0 to 75.0 step 0.5 dB
     142|   |   |   |   Gain range rfic: 0.0 to 0.0 step 0.0 dB
     143|   |   |   |   Gain range dsa: 0.0 to 0.0 step 0.0 dB
     144|   |   |   |   Gain range amp: 0.0 to 0.0 step 0.0 dB
     145|   |   |   |   Bandwidth range: 20000000.0 to 100000000.0 step 0.0 Hz
     146|   |   |   |   Connection Type: IQ
     147|   |   |   |   Uses LO offset: No
     148|   |   |     _____________________________________________________
     149|   |   |    /
     150|   |   |   |       RX Codec: A
     151|   |   |   |   Name: AD9371 Dual ADC
     152|   |   |   |   Gain Elements: None
     153|   |     _____________________________________________________
     154|   |    /
     155|   |   |       RX Dboard: B
     156|   |   |     _____________________________________________________
     157|   |   |    /
     158|   |   |   |       RX Frontend: 0
     159|   |   |   |   Name: Magnesium
     160|   |   |   |   Antennas: TX/RX, RX2, CAL, LOCAL
     161|   |   |   |   Sensors: lo_locked, ad9371_lo_locked, lowband_lo_locked
     162|   |   |   |   Freq range: 1.000 to 6000.000 MHz
     163|   |   |   |   Gain range all: 0.0 to 75.0 step 0.5 dB
     164|   |   |   |   Gain range rfic: 0.0 to 0.0 step 0.0 dB
     165|   |   |   |   Gain range dsa: 0.0 to 0.0 step 0.0 dB
     166|   |   |   |   Gain range amp: 0.0 to 0.0 step 0.0 dB
     167|   |   |   |   Bandwidth range: 20000000.0 to 100000000.0 step 0.0 Hz
     168|   |   |   |   Connection Type: IQ
     169|   |   |   |   Uses LO offset: No
     170|   |   |     _____________________________________________________
     171|   |   |    /
     172|   |   |   |       RX Frontend: 1
     173|   |   |   |   Name: Magnesium
     174|   |   |   |   Antennas: TX/RX, RX2, CAL, LOCAL
     175|   |   |   |   Sensors: lo_locked, ad9371_lo_locked, lowband_lo_locked
     176|   |   |   |   Freq range: 1.000 to 6000.000 MHz
     177|   |   |   |   Gain range all: 0.0 to 75.0 step 0.5 dB
     178|   |   |   |   Gain range rfic: 0.0 to 0.0 step 0.0 dB
     179|   |   |   |   Gain range dsa: 0.0 to 0.0 step 0.0 dB
     180|   |   |   |   Gain range amp: 0.0 to 0.0 step 0.0 dB
     181|   |   |   |   Bandwidth range: 20000000.0 to 100000000.0 step 0.0 Hz
     182|   |   |   |   Connection Type: IQ
     183|   |   |   |   Uses LO offset: No
     184|   |   |     _____________________________________________________
     185|   |   |    /
     186|   |   |   |       RX Codec: B
     187|   |   |   |   Name: AD9371 Dual ADC
     188|   |   |   |   Gain Elements: None
     189|   |     _____________________________________________________
     190|   |    /
     191|   |   |       TX Dboard: A
     192|   |   |     _____________________________________________________
     193|   |   |    /
     194|   |   |   |       TX Frontend: 0
     195|   |   |   |   Name: Magnesium
     196|   |   |   |   Antennas: TX/RX
     197|   |   |   |   Sensors: lo_locked, ad9371_lo_locked, lowband_lo_locked
     198|   |   |   |   Freq range: 1.000 to 6000.000 MHz
     199|   |   |   |   Gain range all: 0.0 to 65.0 step 0.5 dB
     200|   |   |   |   Gain range rfic: 0.0 to 0.0 step 0.0 dB
     201|   |   |   |   Gain range dsa: 0.0 to 0.0 step 0.0 dB
     202|   |   |   |   Gain range amp: 0.0 to 0.0 step 0.0 dB
     203|   |   |   |   Bandwidth range: 20000000.0 to 100000000.0 step 0.0 Hz
     204|   |   |   |   Connection Type: IQ
     205|   |   |   |   Uses LO offset: No
     206|   |   |     _____________________________________________________
     207|   |   |    /
     208|   |   |   |       TX Frontend: 1
     209|   |   |   |   Name: Magnesium
     210|   |   |   |   Antennas: TX/RX
     211|   |   |   |   Sensors: lo_locked, ad9371_lo_locked, lowband_lo_locked
     212|   |   |   |   Freq range: 1.000 to 6000.000 MHz
     213|   |   |   |   Gain range all: 0.0 to 65.0 step 0.5 dB
     214|   |   |   |   Gain range rfic: 0.0 to 0.0 step 0.0 dB
     215|   |   |   |   Gain range dsa: 0.0 to 0.0 step 0.0 dB
     216|   |   |   |   Gain range amp: 0.0 to 0.0 step 0.0 dB
     217|   |   |   |   Bandwidth range: 20000000.0 to 100000000.0 step 0.0 Hz
     218|   |   |   |   Connection Type: IQ
     219|   |   |   |   Uses LO offset: No
     220|   |   |     _____________________________________________________
     221|   |   |    /
     222|   |   |   |       TX Codec: A
     223|   |   |   |   Name: AD9371 Dual DAC
     224|   |   |   |   Gain Elements: None
     225|   |     _____________________________________________________
     226|   |    /
     227|   |   |       TX Dboard: B
     228|   |   |     _____________________________________________________
     229|   |   |    /
     230|   |   |   |       TX Frontend: 0
     231|   |   |   |   Name: Magnesium
     232|   |   |   |   Antennas: TX/RX
     233|   |   |   |   Sensors: lo_locked, ad9371_lo_locked, lowband_lo_locked
     234|   |   |   |   Freq range: 1.000 to 6000.000 MHz
     235|   |   |   |   Gain range all: 0.0 to 65.0 step 0.5 dB
     236|   |   |   |   Gain range rfic: 0.0 to 0.0 step 0.0 dB
     237|   |   |   |   Gain range dsa: 0.0 to 0.0 step 0.0 dB
     238|   |   |   |   Gain range amp: 0.0 to 0.0 step 0.0 dB
     239|   |   |   |   Bandwidth range: 20000000.0 to 100000000.0 step 0.0 Hz
     240|   |   |   |   Connection Type: IQ
     241|   |   |   |   Uses LO offset: No
     242|   |   |     _____________________________________________________
     243|   |   |    /
     244|   |   |   |       TX Frontend: 1
     245|   |   |   |   Name: Magnesium
     246|   |   |   |   Antennas: TX/RX
     247|   |   |   |   Sensors: lo_locked, ad9371_lo_locked, lowband_lo_locked
     248|   |   |   |   Freq range: 1.000 to 6000.000 MHz
     249|   |   |   |   Gain range all: 0.0 to 65.0 step 0.5 dB
     250|   |   |   |   Gain range rfic: 0.0 to 0.0 step 0.0 dB
     251|   |   |   |   Gain range dsa: 0.0 to 0.0 step 0.0 dB
     252|   |   |   |   Gain range amp: 0.0 to 0.0 step 0.0 dB
     253|   |   |   |   Bandwidth range: 20000000.0 to 100000000.0 step 0.0 Hz
     254|   |   |   |   Connection Type: IQ
     255|   |   |   |   Uses LO offset: No
     256|   |   |     _____________________________________________________
     257|   |   |    /
     258|   |   |   |       TX Codec: B
     259|   |   |   |   Name: AD9371 Dual DAC
     260|   |   |   |   Gain Elements: None
     261|   |     _____________________________________________________
     262|   |    /
     263|   |   |       RFNoC blocks on this device:
     264|   |   |
     265|   |   |   * DmaFIFO_0
     266|   |   |   * Radio_0
     267|   |   |   * Radio_1
     268|   |   |   * DDC_0
     269|   |   |   * DDC_1
     270|   |   |   * DUC_0
     271|   |   |   * DUC_1
     272
     273
     274}}}
     275
     276=== Run application ===
     277From root/SPECTRUM_VIEW directory run the pre-compiled application that can read samples from the N310.
     278{{{
     279native@localhost:~$ cd SPECTRUM_VIEW/
     280native@localhost:~/SPECTRUM_VIEW$ ./app_read_n310_samples
     281 INFO  11:51:08.262 (main.cpp:623) - Starting command server at 5180
     282 INFO  11:51:08.262 (main.cpp:175) - Starting websock server at 9002
     283...........
     284}}}
     285In short the application runs a server listening for commands. Just to briefly demonstrate the functionality, open the spectrum_view.html file in a Chrome browser, this will issues commands to configure the N310 and display a short spectrum width.
     286When the viewer is first opened, you should see the text CONNECTED below the plot.
     287 || [[Image(basic_usage_spectrum_view_1, width=125px)]] ||
     288
     289Keep the default values for RATE, FREQ, GAIN and click on the HALTED button. This should display the spectrum if all went well.
     290 || [[Image(basic_usage_spectrum_view_2, width=125px)]] ||
     291
     292=== Troubleshooting ===