summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--host/CMakeLists.txt4
-rw-r--r--host/cmake/Modules/UHDPackage.cmake7
-rw-r--r--host/cmake/Modules/UHDVersion.cmake12
-rw-r--r--host/docs/build.rst2
-rw-r--r--host/docs/calibration.rst16
-rw-r--r--host/docs/coding.rst6
-rw-r--r--host/docs/dboards.rst12
-rw-r--r--host/docs/general.rst22
-rw-r--r--host/docs/identification.rst8
-rw-r--r--host/docs/images.rst17
-rw-r--r--host/docs/index.rst10
-rw-r--r--host/docs/sync.rst16
-rw-r--r--host/docs/transport.rst6
-rw-r--r--host/docs/usrp1.rst4
-rw-r--r--host/docs/usrp2.rst27
-rw-r--r--host/docs/usrp_b100.rst6
-rw-r--r--host/docs/usrp_e1x0.rst10
-rw-r--r--host/examples/rx_samples_to_udp.cpp4
-rw-r--r--host/include/uhd/types/stream_cmd.hpp10
-rw-r--r--host/lib/transport/udp_zero_copy.cpp18
-rw-r--r--host/lib/usrp/b100/b100_impl.cpp3
-rw-r--r--host/lib/usrp/b100/b100_impl.hpp10
-rw-r--r--host/lib/usrp/common/fx2_ctrl.cpp3
-rw-r--r--host/lib/usrp/common/fx2_ctrl.hpp19
-rw-r--r--host/lib/usrp/dboard/db_wbx_version4.cpp2
-rw-r--r--host/lib/usrp/dboard/db_xcvr2450.cpp13
-rw-r--r--host/lib/usrp/gps_ctrl.cpp2
-rw-r--r--host/lib/usrp/usrp1/dboard_iface.cpp42
-rw-r--r--host/lib/usrp/usrp1/io_impl.cpp23
-rw-r--r--host/lib/usrp/usrp1/usrp1_iface.cpp3
-rw-r--r--host/lib/usrp/usrp1/usrp1_iface.hpp13
-rw-r--r--host/lib/usrp/usrp1/usrp1_impl.cpp5
-rw-r--r--host/lib/usrp/usrp1/usrp1_impl.hpp19
-rw-r--r--host/utils/query_gpsdo_sensors.cpp3
-rw-r--r--host/utils/uhd_cal_rx_iq_balance.cpp5
-rw-r--r--host/utils/uhd_cal_tx_dc_offset.cpp5
-rw-r--r--host/utils/uhd_cal_tx_iq_balance.cpp5
-rw-r--r--host/utils/uhd_images_downloader.py.in115
-rw-r--r--host/utils/usrp_cal_utils.hpp28
-rw-r--r--host/utils/usrp_n2xx_simple_net_burner.cpp8
40 files changed, 378 insertions, 165 deletions
diff --git a/host/CMakeLists.txt b/host/CMakeLists.txt
index 1b709a7bf..5daaf44e0 100644
--- a/host/CMakeLists.txt
+++ b/host/CMakeLists.txt
@@ -71,7 +71,7 @@ ENDIF(NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE "${CMAKE_BUILD_TYPE}" CACHE STRING "")
#force UHD_RELEASE_MODE to be a string for cmake-gui
-SET(UHD_RELEASE_MODE CACHE STRING "${UHD_RELEASE_MODE}" FORCE)
+SET(UHD_RELEASE_MODE "${UHD_RELEASE_MODE}" CACHE STRING "UHD Release Mode")
IF(CMAKE_COMPILER_IS_GNUCXX)
ADD_DEFINITIONS(-Wall)
@@ -198,7 +198,7 @@ INSTALL(FILES
# Images download directory for utils/uhd_images_downloader.py
########################################################################
-SET(UHD_IMAGES_DOWNLOAD_SRC "http://files.ettus.com/binaries/maint_images/archive/uhd-images_003.005.000-release.zip")
+SET(UHD_IMAGES_DOWNLOAD_SRC "http://files.ettus.com/binaries/maint_images/archive/uhd-images_003.005.001-release.zip")
########################################################################
# Register top level components
diff --git a/host/cmake/Modules/UHDPackage.cmake b/host/cmake/Modules/UHDPackage.cmake
index 06e7750b6..0feaf91f3 100644
--- a/host/cmake/Modules/UHDPackage.cmake
+++ b/host/cmake/Modules/UHDPackage.cmake
@@ -96,6 +96,13 @@ SET(CPACK_RESOURCE_FILE_README ${CMAKE_SOURCE_DIR}/AUTHORS.txt)
SET(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/LICENSE.txt)
########################################################################
+# Setup CPack Source
+########################################################################
+
+SET(CPACK_SOURCE_PACKAGE_FILE_NAME "uhd-source_${UHD_VERSION}")
+SET(CPACK_SOURCE_IGNORE_FILES "\\\\.git*")
+
+########################################################################
# Setup CPack Components
########################################################################
SET(CPACK_COMPONENT_LIBRARIES_GROUP "Development")
diff --git a/host/cmake/Modules/UHDVersion.cmake b/host/cmake/Modules/UHDVersion.cmake
index 6b1d84941..74516f105 100644
--- a/host/cmake/Modules/UHDVersion.cmake
+++ b/host/cmake/Modules/UHDVersion.cmake
@@ -27,7 +27,7 @@ FIND_PACKAGE(Git QUIET)
########################################################################
SET(UHD_VERSION_MAJOR 003)
SET(UHD_VERSION_MINOR 005)
-SET(UHD_VERSION_PATCH 000)
+SET(UHD_VERSION_PATCH 001)
########################################################################
# Version information discovery through git log
@@ -65,10 +65,18 @@ ENDIF()
IF(UHD_RELEASE_MODE)
SET(UHD_GIT_HASH ${UHD_RELEASE_MODE})
+
+ #Ignore UHD_GIT_COUNT in UHD_VERSION if the string 'release' is in UHD_RELEASE_MODE
+ EXECUTE_PROCESS(
+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+ COMMAND ${PYTHON_EXECUTABLE} -c "print 'release' in '${UHD_RELEASE_MODE}'"
+ OUTPUT_VARIABLE TRIM_UHD_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE
+ )
ENDIF()
+
########################################################################
-IF(UHD_RELEASE_MODE STREQUAL "release")
+IF(TRIM_UHD_VERSION STREQUAL "True")
SET(UHD_VERSION "${UHD_VERSION_MAJOR}.${UHD_VERSION_MINOR}.${UHD_VERSION_PATCH}-${UHD_GIT_HASH}")
ELSE()
SET(UHD_VERSION "${UHD_VERSION_MAJOR}.${UHD_VERSION_MINOR}.${UHD_VERSION_PATCH}-${UHD_GIT_COUNT}-${UHD_GIT_HASH}")
diff --git a/host/docs/build.rst b/host/docs/build.rst
index 0a18e9e9a..00f79aaaa 100644
--- a/host/docs/build.rst
+++ b/host/docs/build.rst
@@ -1,5 +1,5 @@
========================================================================
-UHD - Build Guide
+UHD Software - Build Guide
========================================================================
.. contents:: Table of Contents
diff --git a/host/docs/calibration.rst b/host/docs/calibration.rst
index c97eebfd5..a24d7cbca 100644
--- a/host/docs/calibration.rst
+++ b/host/docs/calibration.rst
@@ -7,11 +7,11 @@ UHD - Calibration Application Notes
------------------------------------------------------------------------
Self-calibration
------------------------------------------------------------------------
-UHD comes with several self-calibration utilities for minimizing IQ imbalance and DC offset.
+UHD software comes with several self-calibration utilities for minimizing IQ imbalance and DC offset.
These utilities perform calibration sweeps using transmit leakage into the receive path
(special equipment is not required).
The results from a calibration are written to a CSV file in the user's home directory.
-UHD will automatically apply corrections at runtime when the user re-tunes the daughterboard LO.
+UHD software will automatically apply corrections at runtime when the user re-tunes the daughterboard LO.
Calibration results are specific to an individual RF board.
**Note:**
@@ -19,7 +19,7 @@ When a calibration table is present,
and the user wishes to override the calibration settings through the API:
the user should re-apply the desired setting every time the LO is re-tuned.
-UHD comes with the following calibration utilities:
+UHD software comes with the following calibration utilities:
* **uhd_cal_rx_iq_balance:** - mimimizes RX IQ imbalance vs. LO frequency
* **uhd_cal_tx_dc_offset:** - mimimizes TX DC offset vs. LO frequency
@@ -34,7 +34,7 @@ The following RF frontends are supported by the self-calibration utilities:
********************************************
Calibration Utilities
********************************************
-UHD installs the calibration utilities into **<install-path>/bin**.
+UHD software installs the calibration utilities into **<install-path>/bin**.
**Disconnect** any extrernal hardware from the RF antenna ports,
and run the following from the command line.
Each utility will take several minutes to complete.
@@ -47,6 +47,14 @@ Each utility will take several minutes to complete.
See the output given by --help for more advanced options, such as:
manually choosing the frequency range and step size for the sweeps.
+**Note:**
+Your daughterboard needs a serial number to run a calibration utility. Some older daughterboards
+may not have a serial number. If this is the case, run the following command to burn a serial number
+into the daughterboard's EEPROM:
+::
+
+ <install dir>/share/uhd/utils/usrp_burn_db_eeprom --ser=<desired serial> --args=<optional device args>
+
********************************************
Calibration Data
********************************************
diff --git a/host/docs/coding.rst b/host/docs/coding.rst
index ef8cb5fe2..432307cca 100644
--- a/host/docs/coding.rst
+++ b/host/docs/coding.rst
@@ -11,7 +11,7 @@ Various API interfaces
Low-Level: The device API
^^^^^^^^^^^^^^^^^^^^^^^^^^^
A device is an abstraction for hardware that is connected to the host system.
-For a USRP, this means that the motherboard and everything on it would be
+For a USRP device, this means that the motherboard and everything on it would be
considered to be a "device". The device API provides ways to:
* Discover devices that are physically connected to the host system.
@@ -25,6 +25,6 @@ See the documentation in *device.hpp* for reference.
^^^^^^^^^^^^^^^^^^^^^^^^^^^
High-Level: The Multi-USRP
^^^^^^^^^^^^^^^^^^^^^^^^^^^
-The Multi-USRP class provides a fat interface to a single USRP with
-one or more channels, or multiple USRPs in a homogeneous setup.
+The Multi-USRP class provides a fat interface to a single USRP device with
+one or more channels, or multiple USRP devicess in a homogeneous setup.
See the documentation in *usrp/multi_usrp.hpp* for reference.
diff --git a/host/docs/dboards.rst b/host/docs/dboards.rst
index 29812592f..3f4875c4c 100644
--- a/host/docs/dboards.rst
+++ b/host/docs/dboards.rst
@@ -1,5 +1,5 @@
========================================================================
-UHD - Daughterboard Application Notes
+UHD Daughterboard Application Notes
========================================================================
.. contents:: Table of Contents
@@ -335,14 +335,14 @@ With the daughterboard plugged-in, run the following commands:
cd <install-path>/share/uhd/utils
./usrp_burn_db_eeprom --id=0x000d --unit=RX --args=<args> --slot=<slot>
-* **<args>** are device address arguments (optional if only one USRP is on your machine)
-* **<slot>** is the name of the daughterboard slot (optional if the USRP has only one slot)
+* **<args>** are device address arguments (optional if only one USRP device is on your machine)
+* **<slot>** is the name of the daughterboard slot (optional if the USRP device has only one slot)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
RFX - Mod
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Older RFX boards require modifications to use the motherboard oscillator.
-If this is the case, UHD will print a warning about the modification.
+If this is the case, UHD software will print a warning about the modification.
Please follow the modification procedures below:
**Step 1: Disable the daughterboard clocks**
@@ -377,5 +377,5 @@ With the daughterboard plugged-in, run the following commands:
* **RFX1800:** 0x0035
* **RFX1200:** 0x002a
* **RFX2400:** 0x002b
-* **<args>** are device address arguments (optional if only one USRP is on your machine)
-* **<slot>** is the name of the daughterboard slot (optional if the USRP has only one slot)
+* **<args>** are device address arguments (optional if only one USRP device is on your machine)
+* **<slot>** is the name of the daughterboard slot (optional if the USRP device has only one slot)
diff --git a/host/docs/general.rst b/host/docs/general.rst
index fc7caff3c..fc2735c46 100644
--- a/host/docs/general.rst
+++ b/host/docs/general.rst
@@ -23,10 +23,10 @@ frequency and actual frequency. The user may also explicitly control both
stages of tuning through through the **tune_request_t** object, which allows for
more advanced tuning.
-In general, Using UHD's advanced tuning is highly recommended as it makes it
+In general, Using UHD software's advanced tuning is highly recommended as it makes it
easy to move the DC component out of your band-of-interest. This can be done by
-passing your desired LO offset to the **tune_request_t** object, and letting UHD
-handle the rest.
+passing your desired LO offset to the **tune_request_t** object, and letting the UHD
+software handle the rest.
Tuning the receive chain:
::
@@ -125,13 +125,13 @@ Overflow notes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
When receiving, the device produces samples at a constant rate.
Overflows occurs when the host does not consume data fast enough.
-When UHD detects the overflow, it prints an "O" to stdout,
+When UHD software detects the overflow, it prints an "O" to stdout,
and pushes an inline message packet into the receive stream.
**Network-based devices**:
The host does not back-pressure the receive stream.
When the kernel's socket buffer becomes full, it will drop subsequent packets.
-UHD detects the overflow as a discontinuity in the packet's sequence numbers,
+UHD software detects the overflow as a discontinuity in the packet's sequence numbers,
and pushes an inline message packet into the receive stream.
**Other devices**:
@@ -140,14 +140,14 @@ Therefore, overflows always occur in the device itself.
When the device's internal buffers become full, streaming is shut off,
and an inline message packet is sent to the host.
If the device was in continuous streaming mode,
-UHD will automatically restart streaming.
+the UHD software will automatically restart streaming.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Underflow notes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
When transmitting, the device consumes samples at a constant rate.
Underflow occurs when the host does not produce data fast enough.
-When UHD detects underflow, it prints a "U" to stdout,
+When UHD software detects the underflow, it prints a "U" to stdout,
and pushes a message packet into the async message stream.
------------------------------------------------------------------------
@@ -157,7 +157,7 @@ Threading Notes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Thread safety notes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-For the most part, UHD is thread-safe.
+For the most part, UHD software is thread-safe.
Please observe the following limitations:
**Fast-path thread requirements:**
@@ -177,8 +177,8 @@ It is recommended to use at most one thread context for manipulating device sett
Thread priority scheduling
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-When UHD spawns a new thread it may try to boost the thread's scheduling priority.
-When setting the priority fails, UHD prints out an error.
+When UHD software spawns a new thread it may try to boost the thread's scheduling priority.
+When setting the priority fails, the UHD software prints out an error.
This error is harmless; it simply means that the thread will have a normal scheduling priority.
**Linux Notes:**
@@ -211,7 +211,7 @@ Disabling or redirecting prints to stdout
The user can disable the UHD library from printing directly to stdout by registering a custom message handler.
The handler will intercept all messages, which can be dropped or redirected.
Only one handler can be registered at a time.
-Make **register_handler** your first call into UHD:
+Make **register_handler** your first call into the UHD library:
::
diff --git a/host/docs/identification.rst b/host/docs/identification.rst
index a5e60e7f9..ba9b30898 100644
--- a/host/docs/identification.rst
+++ b/host/docs/identification.rst
@@ -5,7 +5,7 @@ UHD - Device Identification Notes
.. contents:: Table of Contents
------------------------------------------------------------------------
-Identifying USRPs
+Identifying USRP Devices
------------------------------------------------------------------------
Devices are addressed through key/value string pairs.
These string pairs can be used to narrow down the search for a specific device or group of devices.
@@ -89,10 +89,10 @@ such as detected daughterboards, frequency range, gain ranges, etc...
uhd_usrp_probe --args <device-specific-address-args>
------------------------------------------------------------------------
-Naming a USRP
+Naming a USRP Device
------------------------------------------------------------------------
-For convenience purposes, users may assign a custom name to their USRPs.
-The USRP can then be identified via name, rather than a difficult to remember serial or address.
+For convenience purposes, users may assign a custom name to their USRP device.
+The USRP device can then be identified via name, rather than a difficult to remember serial or address.
A name has the following properties:
diff --git a/host/docs/images.rst b/host/docs/images.rst
index eaddfdf1d..95e2d96b0 100644
--- a/host/docs/images.rst
+++ b/host/docs/images.rst
@@ -24,16 +24,27 @@ Pre-built images are available for download.
* `Master Branch images <http://files.ettus.com/binaries/master_images/>`_
* `Maint Branch images <http://files.ettus.com/binaries/maint_images/>`_
-* `Next Branch images <http://files.ettus.com/binaries/next_images/>`_
See the UHD wiki for the download link.
The pre-built images come in two forms:
-* bundled with UHD in a platform-specific installer
+* bundled with UHD software in a platform-specific installer
* stand-alone platform-independent archive files
^^^^^^^^^^^^^^^^^^^^^^
+UHD Images Downloader
+^^^^^^^^^^^^^^^^^^^^^^
+
+The UHD Images Downloader is a new feature in UHD 003.005.000. This script downloads UHD images that
+are guaranteed to be compatible with the host code and places them in the default images
+directory.
+
+By default, it can be found at: **<install-path>/share/uhd/utils/uhd_images_downloader.py**
+
+By default, it installs images to: **<install-path>/share/uhd/images**
+
+^^^^^^^^^^^^^^^^^^^^^^
Platform installers
^^^^^^^^^^^^^^^^^^^^^^
The UNIX-based installers will install the images into **/usr/share/uhd/images**.
@@ -48,7 +59,7 @@ When installing images from an archive, there are two options:
**Option 1:**
Unpack the archive into the UHD installation prefix.
-UHD will always search **<install-path>/share/uhd/images** for image files.
+UHD software will always search **<install-path>/share/uhd/images** for image files.
Where **<install-path>** was set by the **CMAKE_INSTALL_PREFIX** at configure-time.
**Option 2:**
diff --git a/host/docs/index.rst b/host/docs/index.rst
index 00b1c9618..5e3d08fb4 100644
--- a/host/docs/index.rst
+++ b/host/docs/index.rst
@@ -2,17 +2,17 @@
UHD - USRP Hardware Driver
========================================================================
-UHD is the "Universal Software Radio Peripheral" hardware driver.
-The goal of UHD is to provide a host driver and API for current and future Ettus Research products.
+UHD software is the "Universal Software Radio Peripheral" Hardware Driver software.
+The goal of UHD software is to provide a host driver and API for current and future Ettus Research products.
Users will be able to use the UHD driver standalone or with third-party applications.
------------------------------------------------------------------------
Contents
------------------------------------------------------------------------
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-Building and Installing UHD
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Building and Installing UHD Software
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
* `Build Guide <./build.html>`_
* `Installation Guide (Linux) <http://code.ettus.com/redmine/ettus/projects/uhd/wiki/UHD_Linux>`_
* `Installation Guide (Windows) <http://code.ettus.com/redmine/ettus/projects/uhd/wiki/UHD_Windows>`_
diff --git a/host/docs/sync.rst b/host/docs/sync.rst
index 8622dc642..a1f6cb7df 100644
--- a/host/docs/sync.rst
+++ b/host/docs/sync.rst
@@ -4,9 +4,9 @@ UHD - Synchronization Application Notes
.. contents:: Table of Contents
-The following application notes explain how to synchronize multiple USRPs
-with the goal of transmitting or receiving time-aligned samples for MIMO
-or other applications requiring multiple USRPs operating synchronously.
+The following application notes explain how to synchronize multiple USRP
+devices with the goal of transmitting or receiving time-aligned samples for MIMO
+or other applications requiring multiple USRP devices operating synchronously.
**Note:** The following synchronization notes do not apply to USRP1,
which does not support the advanced features available in newer products.
@@ -14,7 +14,7 @@ which does not support the advanced features available in newer products.
------------------------------------------------------------------------
Common Reference Signals
------------------------------------------------------------------------
-USRPs take two reference signals in order to synchronize clocks and time:
+USRP devices take two reference signals in order to synchronize clocks and time:
* A 10MHz reference to provide a single frequency reference for both devices.
* A pulse-per-second (PPS) to synchronize the sample time across devices.
@@ -103,16 +103,16 @@ and the user can also parse this string to determine GPS time:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Method 3 - internal GPSDO
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-USRPs with internal GPSDOs properly configured will automatically
+USRP devices with internal GPSDOs properly configured will automatically
configure themselves to set the VITA time to current UTC time.
See the `GPSDO Application Notes <./gpsdo.html>`_ for more details.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Method 4 - MIMO cable
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-A USRP can synchronize its time to another USRP via the MIMO cable.
+A USRP device can synchronize its time to another USRP device via the MIMO cable.
Unlike the other methods, this does not use a real "pulse per second".
-Rather, the USRP sends an encoded time message over the MIMO cable.
+Rather, the USRP device sends an encoded time message over the MIMO cable.
The slave device will automatically synchronize to the time on the master device.
See the `MIMO Cable Application Notes <./usrp2.html#using-the-mimo-cable>`_ for more detail.
@@ -123,7 +123,7 @@ Synchronizing Channel Phase
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Align CORDICs in the DSP
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-In order to achieve phase alignment between USRPs, the CORDICS in both
+In order to achieve phase alignment between USRP devices, the CORDICS in both
devices must be aligned with respect to each other. This is easily achieved
by issuing stream commands with a time spec property, which instructs the
streaming to begin at a specified time. Since the devices are already
diff --git a/host/docs/transport.rst b/host/docs/transport.rst
index 2e39e75d1..db89c8db9 100644
--- a/host/docs/transport.rst
+++ b/host/docs/transport.rst
@@ -14,7 +14,7 @@ These optional parameters control how the transport object allocates memory,
resizes kernel buffers, spawns threads, etc.
When not spcified, the transport layer will use values for these parameters
that are known to perform well on a variety of systems.
-The transport parameters are defined below for the various transports in the UHD:
+The transport parameters are defined below for the various transports in the UHD software:
------------------------------------------------------------------------
UDP Transport (Sockets)
@@ -154,11 +154,11 @@ so that non-root users may access the device:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Install USB driver (Windows)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-A driver package must be installed to use a USB-based product with UHD:
+A driver package must be installed to use a USB-based product with UHD software:
* Download the driver from the UHD wiki page `here <http://files.ettus.com/binaries/misc/erllc_uhd_winusb_driver.zip>`_.
* Unzip the file into a known location. We will refer to this as the **<directory>**.
-* Open the device manager and plug in the USRP. You will see an unrecognized USB device in the device manager.
+* Open the device manager and plug in the USRP device. You will see an unrecognized USB device in the device manager.
* Right click on the unrecognized USB device and select update/install driver software (may vary for your OS).
* In the driver installation wizard, select "browse for driver", browse to the **<directory>**, and select the **.inf** file.
* Continue through the installation wizard until the driver is installed.
diff --git a/host/docs/usrp1.rst b/host/docs/usrp1.rst
index c1fdec146..b6fd24b09 100644
--- a/host/docs/usrp1.rst
+++ b/host/docs/usrp1.rst
@@ -79,7 +79,7 @@ Hardware Setup Notes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
External clock modification
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-The USRP can be modified to accept an external clock reference instead of the 64MHz onboard reference.
+The USRP device can be modified to accept an external clock reference instead of the 64MHz onboard reference.
* Solder SMA (**LTI-SASF54GT**) connector to **J2001**.
* Move 0 ohm 0603 resistor **R2029** to **R2030**.
* Move 0.01uF 0603 capacitor **C925** to **C926**.
@@ -89,7 +89,7 @@ The new external clock needs to be a square wave between +7dBm and +15dBm
After the hardware modification,
the user should burn the setting into the EEPROM,
-so UHD can initialize with the correct clock rate.
+so UHD software can initialize with the correct clock rate.
Run the following commands to record the setting into the EEPROM:
::
diff --git a/host/docs/usrp2.rst b/host/docs/usrp2.rst
index 8e9aa6d50..5f1e51ea9 100644
--- a/host/docs/usrp2.rst
+++ b/host/docs/usrp2.rst
@@ -94,6 +94,17 @@ Use the net burner tool (Windows)
<path_to_python.exe> <install-path>/share/uhd/utils/usrp_n2xx_net_burner_gui.py
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Burning images without Python
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+For users who do not wish to install Python, a new script is available in UHD 003.005.000:
+the USRP N2XX Simple Net Burner. It provides the same functionality as its Python
+counterpart, but by default, it automatically installs the default images without the user needing
+to specify their location on the command line.
+
+The utility can be found at: **<install-path>/share/uhd/utils/usrp_n2xx_simple_net_burner**
+
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Device recovery and bricking
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Its possible to put the device into an unusable state by loading bad images.
@@ -137,7 +148,7 @@ any parameters:
ifconfig -a
**Note:**
-When using UHD, if an IP address for the USRP2 is not specified,
+When using UHD software, if an IP address for the USRP2 is not specified,
the software will use UDP broadcast packets to locate the USRP2.
On some systems, the firewall will block UDP broadcast packets.
It is recommended that you change or disable your firewall settings.
@@ -202,13 +213,13 @@ 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. For
-example, if your network interface is set to **192.168.20.1**, and the USRP is
+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. Instructions for setting your IP address are in the
+subnet as that of your USRP device. Instructions for setting your IP address are in the
previous section of this documentation.
@@ -227,7 +238,7 @@ or create a rule to allow all incoming packets with UDP source port **49152**.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Ping the device
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-The USRP will reply to ICMP echo requests.
+The USRP device will reply to ICMP echo requests.
A successful ping response means that the device has booted properly
and that it is using the expected IP address.
@@ -305,7 +316,7 @@ This device will be referred to as the slave, and the other device, the master.
Shared ethernet mode
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
In shared Ethernet mode,
-only one device in the configuration can be attached to the Tthernet.
+only one device in the configuration can be attached to the Ethernet.
* Clock reference, time reference, and data are communicated over the MIMO cable.
* Master and slave must have different IPv4 addresses in the same subnet.
@@ -335,7 +346,7 @@ the following clock configuration must be set on the slave device:
------------------------------------------------------------------------
Alternative stream destination
------------------------------------------------------------------------
-It is possible to program the USRP to send RX packets to an alternative IP/UDP destination.
+It is possible to program the USRP device to send RX packets to an alternative IP/UDP destination.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Set the subnet and gateway
@@ -418,7 +429,7 @@ Using a PPS signal for timestamp synchronization requires a square wave signal w
Test the PPS input with the following app:
-* **<args>** are device address arguments (optional if only one USRP is on your machine)
+* **<args>** are device address arguments (optional if only one USRP device is on your machine)
::
diff --git a/host/docs/usrp_b100.rst b/host/docs/usrp_b100.rst
index cdb853b61..b5dc79b50 100644
--- a/host/docs/usrp_b100.rst
+++ b/host/docs/usrp_b100.rst
@@ -21,7 +21,7 @@ Comparative features list
------------------------------------------------------------------------
Specify a Non-standard Image
------------------------------------------------------------------------
-UHD will automatically select the USRP B-Series images from the installed images package.
+UHD software will automatically select the USRP B-Series images from the installed images package.
The image selection can be overridden with the **--fpga=** and **--fw=** device address parameters.
Example device address string representations to specify non-standard images:
@@ -54,7 +54,7 @@ and X4 must be populated with a 61.44 MHz oscillator.
* **J15** is a three pin header, move the jumper to (pin1, pin2)
* **357LB3I061M4400** is the recommended oscillator for X4
-**Note:** See instructions below to communicate the desired clock rate into UHD.
+**Note:** See instructions below to communicate the desired clock rate into UHD software.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Set other rates - uses internal VCO
@@ -63,7 +63,7 @@ To use other clock rates, the jumper will need to be in the default position.
* **J15** is a three pin header, move the jumper to (pin2, pin3)
-To communicate the desired clock rate into UHD,
+To communicate the desired clock rate into UHD software,
specify the a special device address argument,
where the key is **master_clock_rate** and the value is a rate in Hz.
Example:
diff --git a/host/docs/usrp_e1x0.rst b/host/docs/usrp_e1x0.rst
index 189cbb86b..fc929e639 100644
--- a/host/docs/usrp_e1x0.rst
+++ b/host/docs/usrp_e1x0.rst
@@ -22,7 +22,7 @@ Comparative features list
------------------------------------------------------------------------
Specify a Non-standard Image
------------------------------------------------------------------------
-UHD will automatically select the USRP-Embedded FPGA image from the
+UHD software will automatically select the USRP-Embedded FPGA image from the
installed images package. The FPGA image selection can be overridden with the
**--fpga=** device address parameter.
@@ -53,7 +53,7 @@ on the device.
* **J16** is a two pin header; remove the jumper (or leave it on pin1 only).
* **J15** is a three pin header; move the jumper to (pin1, pin2).
-**Note:** See instructions below to communicate the desired clock rate UHD.
+**Note:** See instructions below to communicate the desired clock rate to UHD software.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Set other rates - uses internal VCO
@@ -63,7 +63,7 @@ To use other clock rates, the jumpers will need to be in the default position.
* **J16** is a two pin header; move the jumper to (pin1, pin2).
* **J15** is a three pin header; move the jumper to (pin2, pin3).
-To communicate the desired clock rate into UHD,
+To communicate the desired clock rate into UHD software,
specify the a special device address argument,
where the key is **master_clock_rate** and the value is a rate in Hz.
Example:
@@ -103,7 +103,7 @@ a connector.
Test the PPS input with the following app:
-* **<args** are device address arguments (optional if only one USRP is on your machine).
+* **<args** are device address arguments (optional if only one USRP device is on your machine).
::
@@ -116,7 +116,7 @@ Internal GPSDO
Please see the `Internal GPSDO Application Notes <./gpsdo.html>`_
for information on configuring and using the internal GPSDO.
-UHD will always try to detect an installed GPSDO at runtime.
+UHD software will always try to detect an installed GPSDO at runtime.
There is not a special EEPROM value to burn for GPSDO detection.
------------------------------------------------------------------------
diff --git a/host/examples/rx_samples_to_udp.cpp b/host/examples/rx_samples_to_udp.cpp
index 105db0a02..f637f9313 100644
--- a/host/examples/rx_samples_to_udp.cpp
+++ b/host/examples/rx_samples_to_udp.cpp
@@ -1,5 +1,5 @@
//
-// Copyright 2010-2011 Ettus Research LLC
+// Copyright 2010-2012 Ettus Research LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -160,7 +160,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){
}
//send complex single precision floating point samples over udp
- udp_xport->send(boost::asio::buffer(buff, num_rx_samps));
+ udp_xport->send(boost::asio::buffer(buff, num_rx_samps*sizeof(buff.front())));
num_acc_samps += num_rx_samps;
} done_loop:
diff --git a/host/include/uhd/types/stream_cmd.hpp b/host/include/uhd/types/stream_cmd.hpp
index 41708e2e2..3c34c9656 100644
--- a/host/include/uhd/types/stream_cmd.hpp
+++ b/host/include/uhd/types/stream_cmd.hpp
@@ -1,5 +1,5 @@
//
-// Copyright 2010 Ettus Research LLC
+// Copyright 2010-2012 Ettus Research LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -46,10 +46,10 @@ namespace uhd{
struct UHD_API stream_cmd_t{
enum stream_mode_t {
- STREAM_MODE_START_CONTINUOUS = 'a',
- STREAM_MODE_STOP_CONTINUOUS = 'o',
- STREAM_MODE_NUM_SAMPS_AND_DONE = 'd',
- STREAM_MODE_NUM_SAMPS_AND_MORE = 'm'
+ STREAM_MODE_START_CONTINUOUS = int('a'),
+ STREAM_MODE_STOP_CONTINUOUS = int('o'),
+ STREAM_MODE_NUM_SAMPS_AND_DONE = int('d'),
+ STREAM_MODE_NUM_SAMPS_AND_MORE = int('m')
} stream_mode;
size_t num_samps;
diff --git a/host/lib/transport/udp_zero_copy.cpp b/host/lib/transport/udp_zero_copy.cpp
index 9125be53a..166177177 100644
--- a/host/lib/transport/udp_zero_copy.cpp
+++ b/host/lib/transport/udp_zero_copy.cpp
@@ -1,5 +1,5 @@
//
-// Copyright 2010-2012 Ettus Research LLC
+// Copyright 2010-2013 Ettus Research LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -24,6 +24,7 @@
#include <uhd/utils/atomic.hpp>
#include <boost/format.hpp>
#include <boost/make_shared.hpp>
+#include <boost/thread/thread.hpp> //sleep
#include <vector>
using namespace uhd;
@@ -112,7 +113,20 @@ public:
_mem(mem), _sock_fd(sock_fd), _frame_size(frame_size) { /*NOP*/ }
void release(void){
- UHD_ASSERT_THROW(::send(_sock_fd, (const char *)_mem, size(), 0) == ssize_t(size()));
+ //Retry logic because send may fail with ENOBUFS.
+ //This is known to occur at least on some OSX systems.
+ //But it should be safe to always check for the error.
+ while (true)
+ {
+ const ssize_t ret = ::send(_sock_fd, (const char *)_mem, size(), 0);
+ if (ret == ssize_t(size())) break;
+ if (ret == -1 and errno == ENOBUFS)
+ {
+ boost::this_thread::sleep(boost::posix_time::microseconds(1));
+ continue; //try to send again
+ }
+ UHD_ASSERT_THROW(ret == ssize_t(size()));
+ }
_claimer.release();
}
diff --git a/host/lib/usrp/b100/b100_impl.cpp b/host/lib/usrp/b100/b100_impl.cpp
index a5a0ef9b0..c4d050242 100644
--- a/host/lib/usrp/b100/b100_impl.cpp
+++ b/host/lib/usrp/b100/b100_impl.cpp
@@ -18,9 +18,6 @@
#include "apply_corrections.hpp"
#include "b100_impl.hpp"
#include "b100_regs.hpp"
-#include "fpga_regs_standard.h"
-#include "usrp_i2c_addr.h"
-#include "usrp_commands.h"
#include <uhd/transport/usb_control.hpp>
#include <uhd/utils/msg.hpp>
#include <uhd/exception.hpp>
diff --git a/host/lib/usrp/b100/b100_impl.hpp b/host/lib/usrp/b100/b100_impl.hpp
index 250229fb8..68d7043a1 100644
--- a/host/lib/usrp/b100/b100_impl.hpp
+++ b/host/lib/usrp/b100/b100_impl.hpp
@@ -55,6 +55,16 @@ static const double B100_DEFAULT_TICK_RATE = 64e6;
static const size_t B100_MAX_PKT_BYTE_LIMIT = 2048;
static const std::string B100_EEPROM_MAP_KEY = "B100";
+#define I2C_ADDR_TX_A (I2C_DEV_EEPROM | 0x4)
+#define I2C_ADDR_RX_A (I2C_DEV_EEPROM | 0x5)
+#define I2C_ADDR_TX_B (I2C_DEV_EEPROM | 0x6)
+#define I2C_ADDR_RX_B (I2C_DEV_EEPROM | 0x7)
+#define I2C_DEV_EEPROM 0x50
+
+#define VRQ_FW_COMPAT 0x83
+#define VRQ_ENABLE_GPIF 0x0d
+#define VRQ_CLEAR_FPGA_FIFO 0x0e
+
//! Make a b100 dboard interface
uhd::usrp::dboard_iface::sptr make_b100_dboard_iface(
wb_iface::sptr wb_iface,
diff --git a/host/lib/usrp/common/fx2_ctrl.cpp b/host/lib/usrp/common/fx2_ctrl.cpp
index 5cc701eb0..93303542e 100644
--- a/host/lib/usrp/common/fx2_ctrl.cpp
+++ b/host/lib/usrp/common/fx2_ctrl.cpp
@@ -1,5 +1,5 @@
//
-// Copyright 2010-2011 Ettus Research LLC
+// Copyright 2010-2012 Ettus Research LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -16,7 +16,6 @@
//
#include "fx2_ctrl.hpp"
-#include "usrp_commands.h"
#include <uhd/utils/msg.hpp>
#include <uhd/exception.hpp>
#include <uhd/transport/usb_control.hpp>
diff --git a/host/lib/usrp/common/fx2_ctrl.hpp b/host/lib/usrp/common/fx2_ctrl.hpp
index f2e060862..9f8cec296 100644
--- a/host/lib/usrp/common/fx2_ctrl.hpp
+++ b/host/lib/usrp/common/fx2_ctrl.hpp
@@ -1,5 +1,5 @@
//
-// Copyright 2010-2011 Ettus Research LLC
+// Copyright 2010-2012 Ettus Research LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -23,6 +23,23 @@
#include <boost/shared_ptr.hpp>
#include <boost/utility.hpp>
+#define FL_BEGIN 0
+#define FL_END 2
+#define FL_XFER 1
+#define USRP_HASH_SLOT_0_ADDR 0xe1e0
+#define USRP_HASH_SLOT_1_ADDR 0xe1f0
+#define VRQ_FPGA_LOAD 0x02
+#define VRQ_FPGA_SET_RESET 0x04
+#define VRQ_FPGA_SET_TX_ENABLE 0x05
+#define VRQ_FPGA_SET_RX_ENABLE 0x06
+#define VRQ_FPGA_SET_TX_RESET 0x0a
+#define VRQ_FPGA_SET_RX_RESET 0x0b
+#define VRQ_I2C_READ 0x81
+#define VRQ_I2C_WRITE 0x08
+#define VRQ_SET_LED 0x01
+#define VRT_VENDOR_IN 0xC0
+#define VRT_VENDOR_OUT 0x40
+
namespace uhd{ namespace usrp{
class fx2_ctrl : boost::noncopyable, public uhd::i2c_iface{
diff --git a/host/lib/usrp/dboard/db_wbx_version4.cpp b/host/lib/usrp/dboard/db_wbx_version4.cpp
index 17b910de4..1feea2c0b 100644
--- a/host/lib/usrp/dboard/db_wbx_version4.cpp
+++ b/host/lib/usrp/dboard/db_wbx_version4.cpp
@@ -41,7 +41,7 @@ static const uhd::dict<std::string, gain_range_t> wbx_v4_tx_gain_ranges = map_li
("PGA0", gain_range_t(0, 31, 1.0))
;
-static const freq_range_t wbx_v4_freq_range(35.0e6, 2.2e9);
+static const freq_range_t wbx_v4_freq_range(25.0e6, 2.2e9);
/***********************************************************************
diff --git a/host/lib/usrp/dboard/db_xcvr2450.cpp b/host/lib/usrp/dboard/db_xcvr2450.cpp
index 348195a6e..50c67991a 100644
--- a/host/lib/usrp/dboard/db_xcvr2450.cpp
+++ b/host/lib/usrp/dboard/db_xcvr2450.cpp
@@ -190,6 +190,7 @@ static dboard_base::sptr make_xcvr2450(dboard_base::ctor_args_t args){
UHD_STATIC_BLOCK(reg_xcvr2450_dboard){
//register the factory function for the rx and tx dbids
dboard_manager::register_dboard(0x0061, 0x0060, &make_xcvr2450, "XCVR2450");
+ dboard_manager::register_dboard(0x0061, 0x0059, &make_xcvr2450, "XCVR2450 - r2.1");
}
/***********************************************************************
@@ -370,7 +371,7 @@ double xcvr2450::set_lo_freq_core(double target_freq){
//variables used in the calculation below
double scaler = xcvr2450::is_highband(target_freq)? (4.0/5.0) : (4.0/3.0);
- double ref_freq = this->get_iface()->get_clock_rate(dboard_iface::UNIT_TX);
+ double ref_freq = this->get_iface()->get_codec_rate(dboard_iface::UNIT_TX);
int R, intdiv, fracdiv;
//loop through values until we get a match
@@ -410,6 +411,16 @@ double xcvr2450::set_lo_freq_core(double target_freq){
//new band select settings and ad9515 divider
this->update_atr();
+ const bool div_ext(this->get_tx_id() == 0x0059);
+ if (div_ext)
+ {
+ this->get_iface()->set_clock_rate(dboard_iface::UNIT_TX, ref_freq/_ad9515div);
+ }
+ else
+ {
+ this->get_iface()->set_clock_rate(dboard_iface::UNIT_TX, ref_freq);
+ }
+
//load new counters into registers
_max2829_regs.int_div_ratio_word = intdiv;
_max2829_regs.frac_div_ratio_lsb = fracdiv & 0x3;
diff --git a/host/lib/usrp/gps_ctrl.cpp b/host/lib/usrp/gps_ctrl.cpp
index 741e69397..917f115f3 100644
--- a/host/lib/usrp/gps_ctrl.cpp
+++ b/host/lib/usrp/gps_ctrl.cpp
@@ -242,7 +242,7 @@ private:
ptime get_time(void) {
int error_cnt = 0;
ptime gps_time;
- while(error_cnt < 10) {
+ while(error_cnt < 2) {
try {
std::string reply = get_nmea("GPRMC");
diff --git a/host/lib/usrp/usrp1/dboard_iface.cpp b/host/lib/usrp/usrp1/dboard_iface.cpp
index 34bbe1893..39850d5d1 100644
--- a/host/lib/usrp/usrp1/dboard_iface.cpp
+++ b/host/lib/usrp/usrp1/dboard_iface.cpp
@@ -1,5 +1,5 @@
//
-// Copyright 2010-2011 Ettus Research LLC
+// Copyright 2010-2012 Ettus Research LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -17,9 +17,6 @@
#include "usrp1_iface.hpp"
#include "usrp1_impl.hpp"
-#include "fpga_regs_common.h"
-#include "usrp_spi_defs.h"
-#include "fpga_regs_standard.h"
#include "codec_ctrl.hpp"
#include <uhd/usrp/dboard_iface.hpp>
#include <uhd/types/dict.hpp>
@@ -27,6 +24,43 @@
#include <boost/assign/list_of.hpp>
#include <iostream>
+#define FR_OE_0 5
+#define FR_OE_1 6
+#define FR_OE_2 7
+#define FR_OE_3 8
+
+#define FR_ATR_MASK_0 20
+#define FR_ATR_TXVAL_0 21
+#define FR_ATR_RXVAL_0 22
+
+#define FR_ATR_MASK_1 23
+#define FR_ATR_TXVAL_1 24
+#define FR_ATR_RXVAL_1 25
+
+#define FR_ATR_MASK_2 26
+#define FR_ATR_TXVAL_2 27
+#define FR_ATR_RXVAL_2 28
+
+#define FR_ATR_MASK_3 29
+#define FR_ATR_TXVAL_3 30
+#define FR_ATR_RXVAL_3 31
+
+#define FR_RX_A_REFCLK 41
+#define FR_RX_B_REFCLK 43
+
+// i/o registers for pins that go to daughterboards.
+// top 16 is a mask, low 16 is value
+
+#define FR_IO_0 9 // slot 0
+#define FR_IO_1 10
+#define FR_IO_2 11
+#define FR_IO_3 12
+#define SPI_ENABLE_TX_A 0x10 // select d'board TX A
+#define SPI_ENABLE_RX_A 0x20 // select d'board RX A
+#define SPI_ENABLE_TX_B 0x40 // select d'board TX B
+#define SPI_ENABLE_RX_B 0x80 // select d'board RX B
+
+
using namespace uhd;
using namespace uhd::usrp;
using namespace boost::assign;
diff --git a/host/lib/usrp/usrp1/io_impl.cpp b/host/lib/usrp/usrp1/io_impl.cpp
index 1d8b9bd76..8940a92bb 100644
--- a/host/lib/usrp/usrp1/io_impl.cpp
+++ b/host/lib/usrp/usrp1/io_impl.cpp
@@ -21,9 +21,6 @@
#define SSPH_DONT_PAD_TO_ONE
#include "../../transport/super_send_packet_handler.hpp"
#include "usrp1_calc_mux.hpp"
-#include "fpga_regs_standard.h"
-#include "fpga_regs_common.h"
-#include "usrp_commands.h"
#include "usrp1_impl.hpp"
#include <uhd/utils/msg.hpp>
#include <uhd/utils/tasks.hpp>
@@ -36,6 +33,26 @@
#include <boost/format.hpp>
#include <boost/make_shared.hpp>
+#define bmFR_RX_FORMAT_SHIFT_SHIFT 0
+#define bmFR_RX_FORMAT_WIDTH_SHIFT 4
+#define bmFR_TX_FORMAT_16_IQ 0
+#define bmFR_RX_FORMAT_WANT_Q (0x1 << 9)
+#define FR_RX_FREQ_0 34
+#define FR_RX_FREQ_1 35
+#define FR_RX_FREQ_2 36
+#define FR_RX_FREQ_3 37
+#define FR_INTERP_RATE 32
+#define FR_DECIM_RATE 33
+#define FR_RX_MUX 38
+#define FR_TX_MUX 39
+#define FR_TX_FORMAT 48
+#define FR_RX_FORMAT 49
+#define FR_TX_SAMPLE_RATE_DIV 0
+#define FR_RX_SAMPLE_RATE_DIV 1
+#define GS_TX_UNDERRUN 0
+#define GS_RX_OVERRUN 1
+#define VRQ_GET_STATUS 0x80
+
using namespace uhd;
using namespace uhd::usrp;
using namespace uhd::transport;
diff --git a/host/lib/usrp/usrp1/usrp1_iface.cpp b/host/lib/usrp/usrp1/usrp1_iface.cpp
index c790aecb4..16b747e45 100644
--- a/host/lib/usrp/usrp1/usrp1_iface.cpp
+++ b/host/lib/usrp/usrp1/usrp1_iface.cpp
@@ -1,5 +1,5 @@
//
-// Copyright 2010-2011 Ettus Research LLC
+// Copyright 2010-2012 Ettus Research LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -16,7 +16,6 @@
//
#include "usrp1_iface.hpp"
-#include "usrp_commands.h"
#include <uhd/utils/log.hpp>
#include <uhd/exception.hpp>
#include <uhd/utils/byteswap.hpp>
diff --git a/host/lib/usrp/usrp1/usrp1_iface.hpp b/host/lib/usrp/usrp1/usrp1_iface.hpp
index c1ac34f25..4612d7912 100644
--- a/host/lib/usrp/usrp1/usrp1_iface.hpp
+++ b/host/lib/usrp/usrp1/usrp1_iface.hpp
@@ -24,6 +24,19 @@
#include <boost/shared_ptr.hpp>
#include <boost/utility.hpp>
+#define SPI_ENABLE_FPGA 0x01
+#define SPI_FMT_HDR_MASK (3 << 5)
+#define SPI_FMT_HDR_0 (0 << 5)
+#define SPI_FMT_HDR_1 (1 << 5)
+#define SPI_FMT_HDR_2 (2 << 5)
+#define SPI_FMT_LSB (1 << 7)
+#define SPI_FMT_MSB (0 << 7)
+#define SPI_FMT_xSB_MASK (1 << 7)
+#define VRQ_SPI_READ 0x82
+#define VRQ_SPI_WRITE 0x09
+#define VRQ_FW_COMPAT 0x83
+
+
/*!
* The usrp1 interface class:
* Provides a set of functions to implementation layer.
diff --git a/host/lib/usrp/usrp1/usrp1_impl.cpp b/host/lib/usrp/usrp1/usrp1_impl.cpp
index a5e51b7d2..253ac1d6f 100644
--- a/host/lib/usrp/usrp1/usrp1_impl.cpp
+++ b/host/lib/usrp/usrp1/usrp1_impl.cpp
@@ -16,11 +16,6 @@
//
#include "usrp1_impl.hpp"
-#include "usrp_spi_defs.h"
-#include "usrp_commands.h"
-#include "fpga_regs_standard.h"
-#include "fpga_regs_common.h"
-#include "usrp_i2c_addr.h"
#include <uhd/utils/log.hpp>
#include <uhd/utils/safe_call.hpp>
#include <uhd/transport/usb_control.hpp>
diff --git a/host/lib/usrp/usrp1/usrp1_impl.hpp b/host/lib/usrp/usrp1/usrp1_impl.hpp
index 9461f0081..0be8ebca9 100644
--- a/host/lib/usrp/usrp1/usrp1_impl.hpp
+++ b/host/lib/usrp/usrp1/usrp1_impl.hpp
@@ -40,6 +40,25 @@
static const std::string USRP1_EEPROM_MAP_KEY = "B000";
+#define FR_RB_CAPS 3
+#define FR_MODE 13
+#define FR_DEBUG_EN 14
+#define FR_DC_OFFSET_CL_EN 15
+#define FR_ADC_OFFSET_0 16
+#define FR_ADC_OFFSET_1 17
+#define FR_ADC_OFFSET_2 18
+#define FR_ADC_OFFSET_3 19
+
+#define I2C_DEV_EEPROM 0x50
+#define I2C_ADDR_BOOT (I2C_DEV_EEPROM | 0x0)
+#define I2C_ADDR_TX_A (I2C_DEV_EEPROM | 0x4)
+#define I2C_ADDR_RX_A (I2C_DEV_EEPROM | 0x5)
+#define I2C_ADDR_TX_B (I2C_DEV_EEPROM | 0x6)
+#define I2C_ADDR_RX_B (I2C_DEV_EEPROM | 0x7)
+
+#define SPI_ENABLE_CODEC_A 0x02
+#define SPI_ENABLE_CODEC_B 0x04
+
/*!
* USRP1 implementation guts:
* The implementation details are encapsulated here.
diff --git a/host/utils/query_gpsdo_sensors.cpp b/host/utils/query_gpsdo_sensors.cpp
index d459fd0ec..de6bdcd72 100644
--- a/host/utils/query_gpsdo_sensors.cpp
+++ b/host/utils/query_gpsdo_sensors.cpp
@@ -100,13 +100,14 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){
std::cout << boost::format("ref_locked sensor not present on this board.\n");
//Check PPS and compare UHD device time to GPS time
+ boost::this_thread::sleep(boost::posix_time::seconds(1));
uhd::sensor_value_t gps_time = usrp->get_mboard_sensor("gps_time");
const uhd::time_spec_t last_pps_time = usrp->get_time_last_pps();
if (last_pps_time.get_full_secs() == gps_time.to_int()) {
std::cout << boost::format("GPS and UHD Device time are aligned.\n");
} else
std::cout << boost::format("\nGPS and UHD Device time are NOT aligned. Try re-running the program. Double check 1 PPS connection from GPSDO.\n\n");
-
+
//print NMEA strings
std::cout << boost::format("Printing available NMEA strings:\n");
uhd::sensor_value_t gga_string = usrp->get_mboard_sensor("gps_gpgga");
diff --git a/host/utils/uhd_cal_rx_iq_balance.cpp b/host/utils/uhd_cal_rx_iq_balance.cpp
index ab951b754..5fb494114 100644
--- a/host/utils/uhd_cal_rx_iq_balance.cpp
+++ b/host/utils/uhd_cal_rx_iq_balance.cpp
@@ -1,5 +1,5 @@
//
-// Copyright 2010 Ettus Research LLC
+// Copyright 2010,2012 Ettus Research LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -136,6 +136,9 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){
usrp->set_rx_antenna("CAL");
usrp->set_tx_antenna("CAL");
+ //fail if daughterboard has no serial
+ check_for_empty_serial(usrp, "RX", "rx", args);
+
//set optimum defaults
set_optimum_defaults(usrp);
diff --git a/host/utils/uhd_cal_tx_dc_offset.cpp b/host/utils/uhd_cal_tx_dc_offset.cpp
index 152f61918..c9cf757f4 100644
--- a/host/utils/uhd_cal_tx_dc_offset.cpp
+++ b/host/utils/uhd_cal_tx_dc_offset.cpp
@@ -1,5 +1,5 @@
//
-// Copyright 2010 Ettus Research LLC
+// Copyright 2010,2012 Ettus Research LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -138,6 +138,9 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){
usrp->set_rx_antenna("CAL");
usrp->set_tx_antenna("CAL");
+ //fail if daughterboard has no serial
+ check_for_empty_serial(usrp, "TX", "tx", args);
+
//set optimum defaults
set_optimum_defaults(usrp);
diff --git a/host/utils/uhd_cal_tx_iq_balance.cpp b/host/utils/uhd_cal_tx_iq_balance.cpp
index 4c8642660..20d018edf 100644
--- a/host/utils/uhd_cal_tx_iq_balance.cpp
+++ b/host/utils/uhd_cal_tx_iq_balance.cpp
@@ -1,5 +1,5 @@
//
-// Copyright 2010 Ettus Research LLC
+// Copyright 2010,2012 Ettus Research LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -139,6 +139,9 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){
usrp->set_rx_antenna("CAL");
usrp->set_tx_antenna("CAL");
+ //fail if daughterboard has no serial
+ check_for_empty_serial(usrp, "TX", "tx", args);
+
//set optimum defaults
set_optimum_defaults(usrp);
diff --git a/host/utils/uhd_images_downloader.py.in b/host/utils/uhd_images_downloader.py.in
index 59c0fbafe..8c8d2df81 100644
--- a/host/utils/uhd_images_downloader.py.in
+++ b/host/utils/uhd_images_downloader.py.in
@@ -26,11 +26,19 @@ import tempfile
import urllib2
import zipfile
+class temp_dir():
+
+ def __enter__(self):
+ self.name = tempfile.mkdtemp()
+ return self.name
+ def __exit__(self, type, value, traceback):
+ os.removedirs(self.name)
+
if __name__ == "__main__":
#Command line options
parser = OptionParser()
- parser.add_option("--install-location", type="string", default="@CMAKE_INSTALL_PREFIX@/share/uhd/images", help="Set custom install location for images, [default=%default]")
+ parser.add_option("--install-location", type="string", default="", help="Set custom install location for images")
parser.add_option("--buffer-size", type="int", default=8192, help="Set download buffer size, [default=%default]",)
(options, args) = parser.parse_args()
@@ -38,65 +46,64 @@ if __name__ == "__main__":
images_src = "@UHD_IMAGES_DOWNLOAD_SRC@"
filename = images_src.split("/")[-1]
- #Create temporary directory
- download_dir = tempfile.mkdtemp()
- atexit.register(lambda: shutil.rmtree(download_dir))
-
- #Make sure we download into the correct directory
- os.chdir(download_dir)
+ with temp_dir() as dirname:
+ os.chdir(dirname)
- #Configuring image destination
- if options.install_location != "":
- images_dir = options.install_location
- else:
- images_dir = "@CMAKE_INSTALL_PREFIX@/share/uhd/images"
-
- u = urllib2.urlopen(images_src)
- f = open(filename, "wb")
- meta = u.info()
- filesize = float(meta.getheaders("Content-Length")[0])
-
- print "Downloading images from: %s" % images_src
-
- filesize_dl = 0.0
+ #Configuring image destination
+ if options.install_location != "":
+ images_dir = options.install_location
+ elif os.environ.get("UHD_IMAGES_DIR") != "" and os.environ.get("UHD_IMAGES_DIR") != None:
+ images_dir = os.environ.get("UHD_IMAGES_DIR")
+ else:
+ images_dir = "@CMAKE_INSTALL_PREFIX@/share/uhd/images"
+
+ u = urllib2.urlopen(images_src)
+ f = open(filename, "wb")
+ meta = u.info()
+ filesize = float(meta.getheaders("Content-Length")[0])
+
+ print "Downloading images from: %s" % images_src
+
+ filesize_dl = 0.0
- #Downloading file
- while True:
- buffer = u.read(options.buffer_size)
- if not buffer:
- break
-
- filesize_dl -= len(buffer)
- f.write(buffer)
+ #Downloading file
+ while True:
+ buffer = u.read(options.buffer_size)
+ if not buffer:
+ break
+
+ filesize_dl -= len(buffer)
+ f.write(buffer)
- status = r"%2.2f MB/%2.2f MB (%3.2f" % (-filesize_dl/1e6, filesize/1e6, (-filesize_dl*100.)/filesize) + r"%)"
- status += chr(8)*(len(status)+1)
- print status,
-
- f.close()
+ status = r"%2.2f MB/%2.2f MB (%3.2f" % (-filesize_dl/1e6, filesize/1e6, (-filesize_dl*100.)/filesize) + r"%)"
+ status += chr(8)*(len(status)+1)
+ print status,
+
+ f.close()
- #Extracting contents of zip file
- if os.path.exists("tempdir"):
- shutil.rmtree("tempdir")
- os.mkdir("tempdir")
+ #Extracting contents of zip file
+ if os.path.exists("tempdir"):
+ shutil.rmtree("tempdir")
+ os.mkdir("tempdir")
- images_zip = zipfile.ZipFile(filename)
- images_zip.extractall("tempdir")
+ images_zip = zipfile.ZipFile(filename)
+ images_zip.extractall("tempdir")
- #Removing images currently in images_dir
- if os.path.exists(images_dir):
- try:
- shutil.rmtree(images_dir)
- except:
- sys.stderr.write("\nMake sure you have write permissions in the images directory.\n")
- sys.exit(0)
+ #Removing images currently in images_dir
+ if os.path.exists(images_dir):
+ try:
+ shutil.rmtree(images_dir)
+ except:
+ sys.stderr.write("\nMake sure you have write permissions in the images directory.\n")
+ sys.exit(0)
- #Copying downloaded images into images_dir
- shutil.copytree("tempdir/%s/share/uhd/images" % filename[:-4],images_dir)
+ #Copying downloaded images into images_dir
+ shutil.copytree("tempdir/%s/share/uhd/images" % filename[:-4],images_dir)
- #Removing tempdir and zip file
- shutil.rmtree("tempdir")
- images_zip.close()
- os.remove(filename)
+ #Removing tempdir and zip file
+ shutil.rmtree("tempdir")
+ images_zip.close()
+ os.remove(filename)
- print "\nImages successfully installed to: %s" % images_dir
+ os.chdir(images_dir)
+ print "\nImages successfully installed to: %s" % images_dir
diff --git a/host/utils/usrp_cal_utils.hpp b/host/utils/usrp_cal_utils.hpp
index 364b68bbe..4a2303d34 100644
--- a/host/utils/usrp_cal_utils.hpp
+++ b/host/utils/usrp_cal_utils.hpp
@@ -19,11 +19,14 @@
#include <uhd/property_tree.hpp>
#include <uhd/usrp/multi_usrp.hpp>
#include <uhd/usrp/dboard_eeprom.hpp>
+#include <uhd/utils/paths.hpp>
#include <boost/filesystem.hpp>
+#include <boost/format.hpp>
#include <iostream>
#include <vector>
#include <complex>
#include <cmath>
+#include <cstdlib>
#include <fstream>
namespace fs = boost::filesystem;
@@ -99,6 +102,30 @@ static inline void set_optimum_defaults(uhd::usrp::multi_usrp::sptr usrp){
}
/***********************************************************************
+ * Check for empty serial
+ **********************************************************************/
+
+void check_for_empty_serial(
+ uhd::usrp::multi_usrp::sptr usrp,
+ std::string XX,
+ std::string xx,
+ std::string uhd_args
+){
+
+ //extract eeprom
+ uhd::property_tree::sptr tree = usrp->get_device()->get_tree();
+ const uhd::fs_path db_path = "/mboards/0/dboards/A/" + xx + "_eeprom";
+ const uhd::usrp::dboard_eeprom_t db_eeprom = tree->access<uhd::usrp::dboard_eeprom_t>(db_path).get();
+
+ std::string args_str = "";
+ if(uhd_args != "") args_str = str(boost::format(" --args=%s") % uhd_args);
+
+ std::string error_string = str(boost::format("This %s dboard has no serial!\n\nPlease see the Calibration documentation for details on how to fix this.") % XX);
+
+ if (db_eeprom.serial.empty()) throw std::runtime_error(error_string);
+}
+
+/***********************************************************************
* Sinusoid wave table
**********************************************************************/
class wave_table{
@@ -160,7 +187,6 @@ static void store_results(
uhd::property_tree::sptr tree = usrp->get_device()->get_tree();
const uhd::fs_path db_path = "/mboards/0/dboards/A/" + xx + "_eeprom";
const uhd::usrp::dboard_eeprom_t db_eeprom = tree->access<uhd::usrp::dboard_eeprom_t>(db_path).get();
- if (db_eeprom.serial.empty()) throw std::runtime_error(XX + " dboard has empty serial!");
//make the calibration file path
fs::path cal_data_path = fs::path(uhd::get_app_path()) / ".uhd";
diff --git a/host/utils/usrp_n2xx_simple_net_burner.cpp b/host/utils/usrp_n2xx_simple_net_burner.cpp
index ce2e9a9fc..901842538 100644
--- a/host/utils/usrp_n2xx_simple_net_burner.cpp
+++ b/host/utils/usrp_n2xx_simple_net_burner.cpp
@@ -502,13 +502,13 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){
}
//Prompt user to reset USRP
- std::string user_response = "";
+ std::string user_response = "foo";
bool reset = false;
- while(user_response != "yes" and user_response != "no" and user_response != "y" and user_response != "n"){
- std::cout << std::endl << "Image burning successful. Reset USRP (yes/no)? ";
+ while(user_response != "y" and user_response != "" and user_response != "n"){
+ std::cout << std::endl << "Image burning successful. Reset USRP (Y/n)? ";
std::getline(std::cin, user_response);
std::transform(user_response.begin(), user_response.end(), user_response.begin(), ::tolower);
- reset = (user_response == "yes" or user_response == "y");
+ reset = (user_response == "" or user_response == "y");
}
std::cout << std::endl; //Formatting
if(reset) reset_usrp(udp_transport);