User Tools

Site Tools


experiment_usrp

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
experiment_usrp [2014/03/17 13:36] bguillonexperiment_usrp [2023/12/11 14:02] (current) – [Providing USRP programs] cmorin
Line 1: Line 1:
-====== Connect to the CortexLab server ======+======= Experimenting with the USRPs =======
  
-Note: If you do not have a CorteXlab account yet, please refer to the [[account | account ]] section first.+===== Providing USRP programs =====
  
-Currently the access to the CorteXlab server is done via direct ssh connection to the server named ''pandora'' (that might be refered to as ''airlock'' throughout this wiki)+In CorteXlab, USRPs are programmed using the [[http://gnuradio.org|GNURadio]] toolchain. GNURadio is a free and open-source software development toolkit that provides signal processing blocks to implement software radios. In order to avoid arbitrary changes coming from the GNURadio development community, CorteXlab maintains copy of the GNURadio repository, which contains the exact same version of GNURadio as the one installed on the CorteXlab nodesThis distribution can be downloaded [[https://github.com/CorteXlab/cxlb-build-toolchain|Here]] with some explanation [here](building_a_toolchain)
  
-===== Connecting using Linux/Unix =====+Programming a USRP with GNURadio is not an easy task, the user should be familiar with that, and should refer  
 +to the [[http://gnuradio.org|GNURadio]] website if he is not. A CorteXlab program consists of a number of GNURadio python scripts, executed on the PCs connected to the USRPs (of course several USRPs can share the same GNURadio code). 
  
-On a Linux/Unix host, the SSH connexion to ''pandora'' can be done with the command:  +For instancein the ''ofdm\_p2p'' example present in your examples directory on your airlock home directory, the following script will be executed by the PC connected to the first USRP
-  ssh ---p 2269 pandora.citi.insa-lyon.fr+<code> 
 +benchmark_tx.py --antenna="TX/RX" --tx-amplitude=0.-v -W 2M -f 2.49G 
 +</code>
      
- -X is used for X forwarding (do not forget to execute xhost+ on your own machine)   +The script called as the entry point could be anything, it is up to the user to decide what, the parameters, etc. The only constraint is that it should be able to run with the GNURadio toolchain deployed on CorteXlab. If the user wants to add more packages or libraries, he should put the files in the task directory upon creation of the task. 
- -v is used for verbose mode   +
- -p is used to specify the port through which the SSH connection is opened  +
  
-===== Connecting Windows user ===== +For instance, in the ''ofdm\_p2p'' example, the ''benchmark\_tx.py'' script uses the ''transmit\_path'' class which is defined in the ''transmit\_path.py'' module, which is thus present in the ''ofdm\_p2p'' directory. 
-TBD +
-===== Connecting MacOS user ===== +
-TBD+
  
-===== Once connected ===== +Againusing the ''ofdm\_p2p'' example, this example uses 2 USRPs (one transmitting, the other receiving), the script run on the PC connected to the second USRP is:  
-You should have access to your home directory on ''pandora''on which you should find:  +<code> 
-  - A README file +benchmark_rx.py --antenna="TX/RX" --rx-gain=25 -v -W 2M -f 2.49G 
-  - A directory ''examples'' containing task examples +</code>
-  - A directory ''results'' containing results of you experiments +
- +
-Launching an experiment on the USRP board requires the following steps: +
-  - Reserve a number of USRP nodes (not implemented yet) +
-  - Create a //Task// as a directory (say ''taskFolder'' ), this is explained in the [[experiment_usrp#Create a Task|Create a task]] section. +
-  - Activate the task creation in Minus:  +
-    $ create_task taskFolder +
-  This will result in the creation of a file ''taskFolder.job'' +
-  - Launch the task with minus: +
-    $ submit taskFolder.job +
-  - Analyze the results  +
-====== Create a Task ====== +
- +
-Creating a task for an experiment amounts in:  +
-  - providing the programs targeted to each USRPs included in the experiment (explained in the [[experiment_usrp#Providing USRP programs]] section) +
-  - providing a ''scenarion.desc'' file necessary for minus to launch the task (explained in the [[experiment_usrp#Providing scenario file]] section)  +
- +
-+
-===== Providing USRP programs ===== +
- +
-In CortexLab, USRP are programmed using the [[http://gnuradio.org|GnuRadio]] toolchain. GNU Radio is a free & open-source software development toolkit that provides signal processing blocks to implement software radios. In order to avoid arbitraty changes comming the GnuRadio developpement community, CorteXlab maintain a copy of the GnuRadio repository which contains exactly the same version of GnuRadio package that the one installed on the CorteXlab nodes. This distribution can be downloaded [[http://whereDéjà?|Here]] +
- +
-Programming a USRP with GnuRadio is not an easy task, the user should be familiar with thatand should refer  +
-to the [[http://gnuradio.org|GnuRadio]] website if it is not. A CortexLab program consists of a number of GnuRadio python script executed on the PCs connected to the USRPs (of course many USRPs can share the same GnuRadio code). For instance, on the ''my\_task'' example present on the CortexLab account, the following script should be executed by the PC connected to the USRP1+
-  benchmark_tx.py --antenna="TX/RX" --tx-amplitude=0.2 -v -W 2M -f 2.49G+
      
-The command could be anything, it is up to the user to decide the name of the script, its parameters etc. The only constraints is that it should be able to run with the GnuRadio packages present on CorteXlab. It the user wants to add more packages or libraries, he should put the files in the Task directory. For instance, on the ''my\_task'' example, the ''benchmark\_tx.py'' script uses the ''transmit\_path'' class which is defined in the ''tansmit\_path.py'' package, which is present in the ''my\_task'' directory.  
- 
-Again, using the ''my\_task'' example, this example uses 2 USRPs (one transmiting, the other receiving), the command to be launched on the PC connected to USRP2 is:  
-  $ benchmark_rx.py --antenna="TX/RX" --rx-gain=25 -v -W 2M -f 2.49G 
-   
-Once the programs to be launched on each USRPs are set up, remains to indicate the time duration of the experiment. Minus will stop the experiment after this time duration, and the result will be available for analysis. 
-===== Providing a scenario file ===== 
-The scenario file is the Minus script that indicates to Minus which program will be launch on which USRPs and how long the experiment will last. For each node (i.e. each usrp), it should indicate:  
-  - a command (or //entry//) which is the program executed on the PC connected to the USRP 
-  - a commande line option (or //parameter//) which is the parameter given to the command 
-  - an exit script (optional) which is executed at the end of the experiment 
- 
-In addition with these information, the scenario file should contain the description of the experiment and a duration in minute. The exact syntax of the scenario description file is presented [[http://wheredéjà?|here]].  
-Below is a simple example used for the ''my\_task'' example: 
- 
-  # Example scenario description file 
-  desc base scenario for CorteXlab 
-  # 
-  # Experiment maximum duration  integer (minutes) 
-  durat 3 
-  # 
-  # Node list 
-  # 
-  node2: 
-     entry benchmark_rx.py 
-     params --antenna="TX/RX" --rx-gain=25 -v -W 2M -f 2.49G 
-     exit none 
-  node1: 
-     entry benchmark_tx.py 
-     params --antenna="TX/RX" --tx-amplitude=0.2 -v -W 2M -f 2.49G 
-     exit none 
- 
- 
- 
-====== Launch a Task ====== 
- 
-======= Analyze the results ====== 
experiment_usrp.1395059802.txt.gz · Last modified: 2014/05/21 15:45 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki