Emulab Tutorial - Using GNU Radio in Emulab

Several GNU Radio Universal Software Radio Peripheral (USRP) hardware devices are connected (via USB2) to Emulab nodes scattered around the Merrill Engineering Building on the University of Utah campus. Each of these nodes also contains one or more wifi interfaces, and the physical distribution of these nodes can be seen via the GNU Radio wireless floormaps page. The colored dots on this page indicate where the wireless nodes are located. If you click on dot, you will get more information about the node it represents, including the types of interfaces available.

Each of the deployed USRP devices is currently outfitted with one RFX900 (flex900) 900MHz band transceiver daughterboard. The RFX900s each have a directly attached 900MHz "rubber duck" antenna. Other daughterboard choices will likely be offered in the future.

Before using a GNU Radio USRP interface in an experiment, please read the following Acceptable Use Policy (AUP) regarding wireless interfaces. By using our GNU Radio USRP nodes, you agree to be bound by this AUP.

Creating Experiments that include USRP-equipped Nodes:

You can currently use the USRP hardware in Emulab in two ways: As "Bare metal" hardware with nothing setup, and as a wireless network interface with full IP connectivity over a prototype CMSA/CD layer 2 MAC.

Allocating a "bare metal" USRP:

Allocating a node outfitted with a USRP is a simple matter of asking for the "usrp" or "flex900" features in your NS file. Here is a small example showing the allocation of a couple of nodes equipped with USRP hardware and RFX900 daughterboards:

       source tb_compat.tcl
       set ns [new Simulator]

       # First, create the node objects
       set gr1 [$ns node]
       set gr2 [$ns node]

       # Currently you must use the FC4-GR (fedora core 4 with gnuradio
       # software and required drivers installed) image to use the USRP 
       # devices.
       tb-set-node-os $gr1 FC4-GR
       tb-set-node-os $gr2 FC4-GR

       # Add a desire for the "usrp" or "flex900" feature.
       # $gr1 add-desire usrp 1.0
       # $gr2 add-desire usrp 1.0
       $gr1 add-desire flex900 1.0
       $gr2 add-desire flex900 1.0

       # Turn on static routing and run.
       $ns rtproto Static
       $ns run              
Some notes on "bare metal" use: Using the USRP as a managed wireless network interface:

To use GNU Radio USRP hardware as interfaces in an Emulab-managed wireless network experiment, you must provide a few Emulab specific NS directives in your NS file, which are illustrated in the following small example:

	source tb_compat.tcl
	set ns [new Simulator]

	# Allocate the nodes.  Their wireless capability is determined later,
	# by the type of networks you request to be set up on them.
	set nodew1 [$ns node]
	set nodew2 [$ns node]
	set nodew3 [$ns node]

	# A wireless lan connecting the three nodes.
        # The lan speed set here (500Kb) is just a placeholder; the rate
        # is actually set below.
	set lan0 [$ns make-lan "$nodew1 $nodew2 $nodew3" 500Kb 0ms]

	# Choose the wireless lan protocol.
	tb-set-lan-protocol $lan0 "flex900"

	# These two wireless lan settings are required for a GNU Radio
        # network lan.
	tb-set-lan-setting $lan0 "frequency" 906M
        tb-set-lan-setting $lan0 "rate" 250k

	# Currently you must use the FC4-GR (fedora core 4 with gnuradio
        # software and required drivers installed) image to use the USRP 
        # devices.
	tb-set-node-os $nodew1 FC4-GR
	tb-set-node-os $nodew2 FC4-GR
	tb-set-node-os $nodew3 FC4-GR

	# Turn on static routing.
	$ns rtproto Static
	$ns run			
Notes on using the GNU Radio USRPs as network interfaces: