USRP Hardware Driver and USRP Manual  Version: 003.008.001-0-g2474ac32
UHD and USRP Manual
USRP-E3x0 Series

Comparative features list - E310

  • Hardware Capabilities: Integrated RF frontend (70 MHz - 6 GHz)
    • External PPS reference input
    • External 10 MHz reference input
    • Configurable clock rate
    • Internal GPIO connector with UHD API control
    • 2 USB 2.0 Host ports
    • Internal GPSDO
    • Soundcard mono input / stereo output
    • USB UART
    • Zynq-7020 FPGA
  • FPGA Capabilities:
    • 2 RX DDC chains in FPGA
    • 2 TX DUC chain in FPGA
    • Timed commands in FPGA
    • Timed sampling in FPGA
    • 16-bit fixed point sample mode (sc16)
    • Up to 10 MHz of RF bandwidth with 16-bit samples

Getting started

This will run you through the first steps relevant to get your USRP E310 up and running.

First boot

There are two different methods to connect to the device

  • using the onboard serial to usb connector
  • using the gigabit ethernet connector and a ssh client on your host computer

For the first boot, booting with the serial cable connected to the device is recommended, as it allows to review and modify the network configuration, and allows to enter the bootloader in case of issues during the boot.

Serial connection

To use the serial connection together with a Linux or OSX machine (most other UNIX variants come with a version of screen, too) a terminal emulator such as screen can be used:

$ sudo screen /dev/ttyUSB0 115200

The exact device node /dev/ttyUSB0 depends on your operating system's driver and other USB devices that might be already connected. It can be usually found by perusing the output of dmesg or journalctl, after connecting the USRP E310 device to your host computer.

An example of a dmesg output for the serial to usb converter:

924.102764] usb 1-1: FTDI USB Serial Device converter now attached to ttyUSB0

On Microsoft Windows the serial connection can be established using a tool such as Putty by selecting a baudrate of 115200 and the corresponding serial port for the serial to usb converter.

In both cases you should see boot messages fly by and finally end up with a login prompt similar to the following:

ettus-e300 login:

Note: The username is 'root' and the default password is empty.

You should be presented with a shell similar to the following

root@ettus-e300:~#

SSH connection

The USRP E310 device relies on the DHCP protocol to automatically obtain an IP address. In case your network setup does not include a DHCP server, refer to the section Serial connection or configure a DHCP server to hand out IP addresses on your network.

After the device obtained an IP address you can log in from a Linux or OSX machine by typing:

$ ssh [email protected]

where the IP address depends on your local network setup.

On Microsoft Windows again the connection can be established using a tool such as Putty, by selecting a username of root without password.

You should be presented with a shell similar to the following

root@ettus-e300:~#

Using the SDK

In order to facilitate software development for the integrated ARM Cortex-A9 processor, a Yocto Project based SDK is provided in the download section of our website. This SDK contains a cross-compiler, a cross-linker as well as a cross-debugger and can be used to develop your user space applications for the Ettus USRP-E310 devices.

Installation

The following section will guide you through the installation of the provided SDK on a Linux development machine.

Obtaining the correct SDK

It is necessary for the SDK version and the image version to match, to ensure the versions of the software installed on the device and the version of the software the SDK will build against match.

If you are not sure which image is installed on your device, upgrading to the latest stable version is recommended. See the appropriate section for details on upgrading.

Obtaining the right toolchain

To install the toolchain you downloaded type:

$ ./oecore-${TCLIBC}-${SDK_ARCH}-${IMAGE_BASENAME}-${TUNE_PKGARCH}.sh

This will prompt you for an installation path. Please ensure you have sufficient disk space, as each of the SDKs may require several gigabytes of disk space (depends on the image flavor selected).

This will allow you to compile UHD as well as (depending on the image flavor) other software.

Please note, that while several toolchains can be installed in parallel, they have to be installed to different directories.

Usage

Having installed the toolchain in the last step, in order to build software for your device open a new shell and type:

$ . <yoursdkinstallpath>/environment-setup-armv7ahf-vfp-neon-oe-linux-gnueabi

This will modifiy the PATH, CC, CXX etc, environment variables and allow you to compile software for your USRP E310 device. To verify all went well you can try:

$ $CC -dumpmachine

which should return 'arm-oe-linux-gnueabi'.

Building UHD

  1. Obtain the UHD source code via git or tarball
  2. Setup your environment as described in Usage
  3. Type the following in the build directory (assuming a build in host/build):
     $ cmake -DCMAKE_TOOLCHAIN_FILE=<youruhdsrc>/host/cmake/Toolchains/oe-sdk_cross.cmake -DENABLE_E300 ..
     $ make
    

Building GNU Radio

  1. Obtain the gnuradio source code via git.
  2. Setup the environment as described in Usage
  3. Use the following commands to create a build directory, configure and compile gnuradio. You only need create the build directory once.
$ mkdir build-arm
$ cmake -Wno-dev -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchains/oe-sdk_cross.cmake \-DCMAKE_INSTALL_PREFIX=/usr -DENABLE_GR_VOCODER=OFF -DGR_ENABLE_ATSC=OFF \
-DENABLE_GR_DTV=OFF -DENABLE_DOXYGEN=OFF ../

Several GNU Radio components depend on running binaries built for the build machine during compile. These binaries can be built and used for cross compiling, but this is an advanced topic.

Rebuilding the file system

The file system images are built using OpenEmbedded Core. The repo tool is used to manage the versions of the various layers that supply recipes for building the image. For more documentation see http://www.yoctoproject.org. These notes will show you how to rebuild the files used to create the SD card included with the E310. These instructions assume you ahve a working knowledge of Linux.

  1. Install repo.
    $ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > repo
    $ chmod a+x repo
    $ sudo mv repo /usr/local/bin
  2. Configure the repo manifest that controls the build.
    $ mkdir e300-oe-build
    $ cd e300-oe-build
    $ repo init -u git://github.com/EttusResearch/e300-manifest.git -b release1
  3. Initialize the environment. This will take a little while.
    $ repo sync
    $ TEMPLATECONF=`pwd`/meta-ettus/conf source ./oe-core/oe-init-build-env ./build ./bitbake

At this point you should review the file in conf/local.conf and make sure path names make sense for your machine.

  1. Build an image. This will take a few hours, especially the first run since it will download all the required sources. (These are saved locally for future builds)
    $ export MACHINE="ettus-e300"
    $ bitbake gnuradio-dev-image

When this completes, the files needed to create the sd card are in tmp-glibc/deploy/images/ettus-e300

  1. Build the toolchain.
    $ bitbake -c populate_sdk gnuradio-dev-image

The sdk is in tmp-glibc/deploy/sdk

Note that you can set the MACHINE variable in `local.conf so that you no longer need to set it from the command line.

When you log back in, you will need to setup the OpenEmbedded environment again by:

$ cd e300-oe-build/oe-core
$ . oe-core/oe-init-build-env ./build ./bitbake

Specifying a Non-standard FPGA Image

Using UHD to load FPGA images

UHD software will automatically select the USRP E310 images from the installed images package. The image selection can be overridden with the fpga device address parameter.

Example device address string representations to specify non-standard image:

$ uhd_usrp_probe --args='fpga=usrp_e310_fpga.bit'

Using JTAG to load FPGA images

The USRP-E Series device features an on-board JTAG connector (see Debugging custom FPGA designs with Xilinx Chipscope) that can be accessed on the PCB of the device. The iMPACT tool in the Xilinx Programming Tools (ISE, iMPACT) package can be used to load an image over the JTAG interface.

If you have iMPACT installed, you can use the impact_jtag_programmer.sh tool to install images. Make sure your e3x0 is powered on and connected to your computer using the internal JTAG connector. Then run the tool:

<path_to_uhd_tools>/impact_jtag_programmer.sh --fpga-path=<fpga_image_path>

Change the USRP's IP address

You may need to change the USRP's IP address for several reasons:

  • to satisfy your particular network configuration
  • to use multiple USRP-E Series devices with the same host computer
  • to set a known IP address into USRP (in case you forgot)

Hardware Notes

Front Panel

e3x0_fp_overlay.png
USRP E310 Front panel
  • RF A Group
    • TX/RX LED: Indicates that data is streaming on the TX/RX channel on frontend side A
    • RX2 LED: Indicates that data is streaming on the RX2 channel on frontend side A
  • RF B Group
    • TX/RX LED: Indicates that data is streaming on the TX/RX channel on frontend B
    • RX2 LED: Indicates that data is streaming on the RX2 channel on frontend B
  • PWR: Power switch
  • SYNC: Input port for external PPS signal
  • GPS: Connection for the GPS antenna
  • AUDIO: Audio input / output

Rear Panel

e3x0_rp_overlay.png
USRP E310 Rear Panel
  • PWR: Locking connector for the USRP-E Series power supply
  • 1G ETH: RJ45 port for Ethernet interfaces
  • USB: USB 2.0 Port
  • SERIAL: Micro USB connection for serial uart console

PPS - Pulse Per Second

Using a PPS signal for timestamp synchronization requires a square wave signal with the following a 5Vpp amplitude.

To test the PPS input, you can use the following tool from the UHD examples:

  • <args> are device address arguments (optional if only one USRP device is on your machine)

    cd <install-path>/lib/uhd/examples ./test_pps_input –args=<args>

Internal GPSDO

Your USRP-E Series device comes with an internal GPSDO. In order to get a lock on a satellite an external GPS antenna is required.

The device provides a 3.3V supply voltage to an external antenna connected to the GPS port of your device. Note that this supply voltage is turned off in order to safe power upon destruction of the software object.

Internal GPIO

Connector

e3x0_gpio_conn.png
E3x0 GPIO Connector

Pin Mapping

  • Pin 1: +3.3V
  • Pin 2: Reserved
  • Pin 3: Data[5]
  • Pin 4: Reserved
  • Pin 5: Data[4]
  • Pin 6: Data[0]
  • Pin 7: Data[3]
  • Pin 8: Data[1]
  • Pin 9: 0V
  • Pin 10: Data[2]

Please see the E3x0/X3x0 GPIO API for information on configuring and using the GPIO bus.

Audio connectors

Debugging custom FPGA designs with Xilinx Chipscope

Connector

e3x0_jtag_conn.png
E3x0 JTAG Connector

Pin Mapping

  • Pin 1: TDO
  • Pin 2: 3.3V
  • Pin 3: TCK
  • Pin 4: TDI
  • Pin 5: 0V
  • Pin 6: TMS

Xilinx chipscope allows for debugging custom FPGA designs similar to a logic analyzer. USRP-E series devices can be used with Xilinx chipscope using the internal JTAG connector.

Further information on how to use Chipscope can be found in the Xilinx Chipscope Pro Software and Cores User Guide (UG029).

Daughterboard notes

E310 MIMO XCVR board

The USRP E310 MIMO XCVR daughterboard features an integrated MIMO capable RF frontend.

Frontend tuning

The RF frontend has individually tunable receive and transmit chains. Both transmit and receive can be used in a MIMO configuration. For the MIMO case, both receive frontends share the RX LO, and both transmit frontends share the TX LO. Each LO is tunable between 50 MHz and 6 GHz.

Frontend gain

All frontends have individual analog gain controls. The receive frontends have 73 dB of available gain; and the transmit frontends have 89.5 dB of available gain. Gain settings are application specific, but it is recommended that users consider using at least half of the available gain to get reasonable dynamic range.

Frontend LO lock status

The frontends provide a lo-locked sensor that can be queried through the UHD API.

// assumes 'usrp' is a valid uhd::usrp::multi_usrp::sptr instance
// get status for rx frontend
usrp->get_rx_sensor("lo-locked");
// get status for tx frontend
usrp->get_tx_sensor("lo-locked");

Miscellaneous

Multiple RX channels

There are two complete DDC and DUC DSP chains in the FPGA. In the single channel case, only one chain is ever used. To receive / transmit from both channels, the user must set the RX or TX subdevice specification.

In the following example, a E310 MIMO XCVR is installed. Channel 0 is sourced from subdevice A, and channel 1 is sourced from subdevice B

// assumes 'usrp' is a valid uhd::usrp::multi_usrp::sptr instance
usrp->set_rx_subdev_spec("A:A A:B");

Available Sensors

The following sensors are available for the USRP-E Series motherboards; they can be queried through the API.

  • fe_locked - rx / tx frontend pll locked
  • temp - processor temperature value
  • gps_time and gps_locked sensors are added when the GPSDO is found

Network Mode

Your USRP-E series device can be used in network mode for narrow band signal observation, evaluation and debugging purposes.

Please note that when compared with normal operation as a standalone device the usable bandwidth is limited and therefore Network Mode is not the recommended mode of operation.

In order to use the device in network mode it is necessary to start the usrp_e3x0_network_mode executable on the device. In order to start the executable please log into your device either via SSH or serial console(see First boot) and type

$ usrp_e3x0_network_mode

Your device should now be discoverable by your host computer via the usual UHD tools. If you are having trouble communicating with your device see the Communication Problems section.

Addressing the Device

Single device configuration

In a single-device configuration, the USRP device must have a unique IPv4 address on the host computer. The USRP can be identified through its IPv4 address or resolvable hostname. See the application notes on Device Identification. Use this addressing scheme with the uhd::usrp::multi_usrp interface (not a typo!).

Example device address string representation for a USRP-E Series device with IPv4 address 192.168.10.2:

addr=192.168.10.2

Multiple device configuration

In a multi-device configuration, each USRP device must have a unique IPv4 address on the host computer. The device address parameter keys must be suffixed with the device index. Each parameter key should be of the format <key><index>. Use this addressing scheme with the uhd::usrp::multi_usrp interface.

  • The order in which devices are indexed corresponds to the indexing of the transmit and receive channels.
  • The key indexing provides the same granularity of device identification as in the single device case.

Example device address string representation for 2 USRPs with IPv4 addresses 192.168.10.2 and 192.168.20.2:

addr0=192.168.10.2, addr1=192.168.20.2

Communication Problems

When setting up a development machine for the first time, you may have various difficulties communicating with the USRP device. The following tips are designed to help narrow down and diagnose the problem.

RuntimeError: no control response

This is a common error that occurs when you have set the subnet of your network interface to a different subnet than the network interface of the USRP device. For example, if your network interface is set to 192.168.20.1, and the USRP device is 192.168.10.2 (note the difference in the third numbers of the IP addresses), you will likely see a 'no control response' error message.

Fixing this is simple - just set the your host PC's IP address to the same subnet as that of your USRP device. Instructions for setting your IP address are in the previous section of this documentation.

Firewall issues

When the IP address is not specified, the device discovery broadcasts UDP packets from each Ethernet interface. Many firewalls will block the replies to these broadcast packets. If disabling your system's firewall or specifying the IP address yields a discovered device, then your firewall may be blocking replies to UDP broadcast packets. If this is the case, we recommend that you disable the firewall or create a rule to allow all incoming packets with UDP source port 49152.

Ping the device

The USRP device will reply to ICMP echo requests ("ping"). A successful ping response means that the device has booted properly and that it is using the expected IP address.

ping 192.168.10.2

Monitor the host network traffic

Use Wireshark to monitor packets sent to and received from the device.

Observe Ethernet port LEDs

When there is network traffic arriving at the Ethernet port, LEDs will light up. You can use this to make sure the network connection is correctly set up, e.g. by pinging the USRP and making sure the LEDs start to blink.

Frequently Asked Questions

  • Communication
    1. How do I enable X forwarding so I can run X apps on the e3x0?
      In the file /etc/ssh/sshd_config, unmcomment the line #X11Forwarding no and change "no" to "yes".

Applications

GSM Base Station

OpenBTS allows the USRP E310 to serve as a GSM base station capable of providing voice and messaging services to standard GSM handsets. General information on the OpenBTS project can be found at the official webpage.

http://www.openbts.org

Special instructions to install OpenBTS on the E310 can be found on the OpenBTS wiki.

http://openbts.org/w/index.php/E3x0