User Tools

Site Tools


cortexlab102

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
cortexlab102 [2018/03/26 11:18] – [Creating a flow graph on your PC] trissetcortexlab102 [2018/11/19 19:59] (current) – [Sending the task to airlock] ooubejja
Line 38: Line 38:
 </code> </code>
  
-Some of these files as ''benchmark\_tx.py'' are already known to you. Some other are new, the only one that we will use is  ''usrp\_fft.py''. This script is used to configure the ''fft\_web'' bloc with all the necessary parameter: on which frequency it should listen, on which UDP port it should send its spectrum etc. +Some of these files as ''benchmark\_tx.py'' are already known to you. Some other are new, the only one that we will use is  ''usrp\_fft.py''. This script is used to configure the ''fft\_web'' GNU radio block with all the necessary parameter: on which frequency it should listen, on which UDP port it should send its spectrum etc. 
  
 The command line in the scenario.yaml file lists all these parameters, see below, and do not forget to change the number of the nodes corresponding to your tutorial. On can see below that the UDP port used here is 6663, please change it with the one associated with your tuto in the table above. The command line in the scenario.yaml file lists all these parameters, see below, and do not forget to change the number of the nodes corresponding to your tutorial. On can see below that the UDP port used here is 6663, please change it with the one associated with your tuto in the table above.
Line 74: Line 74:
  
 As it is not very convenient to work on CorteXlab server, we will explain here how to create flow graphs with GNUradio on your machine and export them to CorteXlab. We are going to create a new flowgraph called ''spectrum_analyzer.grc''. As it is not very convenient to work on CorteXlab server, we will explain here how to create flow graphs with GNUradio on your machine and export them to CorteXlab. We are going to create a new flowgraph called ''spectrum_analyzer.grc''.
 +
 +### Cloning the example task
 +
 +An example task is provided in the FIT/CorteXlab GitHub repositories. It is kept up-to-date and well prepared to run. First let us prepare to clone the example task.
 +
 +Let us start by erasing any previous (and possibly outdated) version of the example task already present in your home dir:
 +
 +<code>
 +cxlbusr@debian-jessie-cortexlab:~$ rm -rf examples
 +</code>
 +
 +Now let us retrieve the examples repository on GitHub :
 +
 +<code>
 +cxlbusr@debian-jessie-cortexlab:~$ git clone https://github.com/CorteXlab/examples.git
 +cxlbusr@debian-jessie-cortexlab:~$ cd examples
 +cxlbusr@debian-jessie-cortexlab:~/examples$ cd my_task
 +</code>
 +
 +### Creating our flow graph
  
 Launch, on your virtual machine, the ''gnuradio-companion'' tool Launch, on your virtual machine, the ''gnuradio-companion'' tool
Line 87: Line 107:
    * Generate Options -> No GUI     * Generate Options -> No GUI 
    * Run Options -> run to completion    * Run Options -> run to completion
- * Change the sample rate fot this flowgraph (double click on the “samp_rate” variable block):+ 
 + 
 + * Change the sample rate fot this flowgraph (double click on the “samp\_rate” variable block):
     set value to 2e6 (2Mhz)      set value to 2e6 (2Mhz) 
-  
  
 Now we are going to add two blocks to the flowgraph: Now we are going to add two blocks to the flowgraph:
Line 101: Line 122:
   * for USRP Source:    * for USRP Source: 
     * Sample rate -> samp\_rate (variable)     * Sample rate -> samp\_rate (variable)
-    * Center frequency -> 2.49e9+    * Center frequency -> your frequency! (for example: 2.49e9)
     * Gain -> 20 dB     * Gain -> 20 dB
     * Antenna -> TX/RX     * Antenna -> TX/RX
Line 107: Line 128:
     * fft size -> 256     * fft size -> 256
     * power max -> -50     * power max -> -50
-    * power min -> -10 +    * power min -> -100 
-    * port -> your port!+    * port -> your port! (for example: 6663)
     * frame rate -> 5     * frame rate -> 5
     * sample rate -> samp_rate (variable)     * sample rate -> samp_rate (variable)
Line 118: Line 139:
  
 Generate the flowgraph, a spectrum_analyzer.py should have appeared in the directory.  Generate the flowgraph, a spectrum_analyzer.py should have appeared in the directory. 
- 
- 
  
  
Line 127: Line 146:
 <code> <code>
 cxlbusr@debian-jessie-cortexlab:~/my_fft_web$ cd .. cxlbusr@debian-jessie-cortexlab:~/my_fft_web$ cd ..
-cxlbusr@debian-jessie-cortexlab:~/$ scp -P 2269 -r my_fft_web/ tuto#@gw.cortexlab.fr:~+cxlbusr@debian-jessie-cortexlab:~/$ scp -P 22 -r my_fft_web/ tuto#@gw.cortexlab.fr:~
 </code> </code>
  
Line 133: Line 152:
  
 <code> <code>
-you@srvairlock:~/my_fft_web$ cp ~/examples/fft_web/benchmark_tx.py ./ +you@srvairlock:~/my_fft_web$ cp ~/examples/test_fft_web/benchmark_tx.py ./ 
-you@srvairlock:~/my_fft_web$ cp ~/examples/fft_web/uhd_interface.py ./ +you@srvairlock:~/my_fft_web$ cp ~/examples/test_fft_web/uhd_interface.py ./ 
-you@srvairlock:~/my_fft_web$ cp ~/examples/fft_web/transmit_path.py ./ +you@srvairlock:~/my_fft_web$ cp ~/examples/test_fft_web/transmit_path.py ./ 
-you@srvairlock:~/my_fft_web$ cp ~/examples/fft_web/scenario.yaml ./+you@srvairlock:~/my_fft_web$ cp ~/examples/test_fft_web/scenario.yaml ./
 </code> </code>
  
Line 155: Line 174:
  
   node3:   node3:
-    command: ./spectrum_analyzer +    command: ./spectrum_analyzer.py
     passive: true     passive: true
 </code> </code>
cortexlab102.1522055923.txt.gz · Last modified: 2018/03/26 11:18 by trisset

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki