Statistics
| Branch: | Tag: | Revision:

root / host / docs / identification.rst @ ae1ebd8a

History | View | Annotate | Download (4.39 KB)

1 f740a51c Josh Blum
========================================================================
2
UHD - Device Identification Notes
3
========================================================================
4
5
.. contents:: Table of Contents
6
7
------------------------------------------------------------------------
8
Identifying USRPs
9
------------------------------------------------------------------------
10 e43b47d6 Josh Blum
Devices are addressed through key/value string pairs.
11
These string pairs can be used to narrow down the search for a specific device or group of devices.
12
Most UHD utility applications and examples have a --args parameter that takes a device address;
13
where the device address is expressed as a delimited string.
14
See the documentation in types/device_addr.hpp for reference.
15 f740a51c Josh Blum
16 e43b47d6 Josh Blum
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
17
Common device identifiers
18
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
19
Every device has several ways of identifying it on the host system:
20 f740a51c Josh Blum
21 e43b47d6 Josh Blum
+------------+------------+--------------------------------------------+
22
| Identifier | Key        | Notes                                      |
23
+============+============+============================================+
24
| Serial     | serial     | globally unique identifier                 |
25
+------------+------------+--------------------------------------------+
26
| Address    | addr       | unique identifier on a network             |
27
+------------+------------+--------------------------------------------+
28
| Name       | name       | optional user-set identifier               |
29
+------------+------------+--------------------------------------------+
30
| Type       | type       | hardware series identifier                 |
31
+------------+------------+--------------------------------------------+
32 f740a51c Josh Blum
33
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
34
Device discovery via command line
35
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
36 e43b47d6 Josh Blum
Devices attached to your system can be discovered using the "uhd_find_devices" program.
37
The find devices program scans your system for supported devices and prints
38
out an enumerated list of discovered devices and their addresses.
39
The list of discovered devices can be narrowed down by specifying device address args.
40 f740a51c Josh Blum
41
::
42
43
    uhd_find_devices
44
45
Device address arguments can be supplied to narrow the scope of the search.
46
47
::
48
49
    uhd_find_devices --args="type=usrp1"
50
51
    -- OR --
52
53
    uhd_find_devices --args="serial=12345678"
54
55
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
56
Device discovery through the API
57
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
58
The device::find() API call searches for devices and returns a list of discovered devices.
59
60
::
61
62
    uhd::device_addr_t hint; //an empty hint discovers all devices
63
    uhd::device_addrs_t dev_addrs = uhd::device::find(hint);
64
65
The hint argument can be populated to narrow the scope of the search.
66
67
::
68
69
    uhd::device_addr_t hint;
70
    hint["type"] = "usrp1";
71
    uhd::device_addrs_t dev_addrs = uhd::device::find(hint);
72
73
    -- OR --
74
75
    uhd::device_addr_t hint;
76
    hint["serial"] = "12345678";
77
    uhd::device_addrs_t dev_addrs = uhd::device::find(hint);
78
79 e43b47d6 Josh Blum
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
80
Device properties
81
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
82
Properties of devices attached to your system can be probed with the "uhd_usrp_probe" program.
83
The usrp probe program constructs an instance of the device and prints out its properties;
84
properties such as detected daughter-boards, frequency range, gain ranges, etc...
85
86
**Usage:**
87
::
88
89
    uhd_usrp_probe --args <device-specific-address-args>
90
91 f740a51c Josh Blum
------------------------------------------------------------------------
92
Naming a USRP
93
------------------------------------------------------------------------
94
For convenience purposes, users may assign a custom name to their USRPs.
95
The USRP can then be identified via name, rather than a difficult to remember serial or address.
96
97
A name has the following properties:
98
99
* is composed of ASCII characters
100
* is between 0 and 20 characters
101
* is not required to be unique
102
103
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
104
Set a custom name
105
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
106
107
Run the following commands:
108
::
109
110 af2ab1c6 Josh Blum
    cd <install-path>/share/uhd/utils
111 f740a51c Josh Blum
    ./usrp_burn_mb_eeprom --args=<optional device args> --key=name --val=lab1_xcvr
112
113
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
114
Discovery via name
115
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
116
117
The keyword "name" can be used to narrow the scope of the search.
118
Example with the find devices utility:
119
::
120
121
    uhd_find_devices --args="name=lab1_xcvr"
122
123
    -- OR --
124
125
    uhd_find_devices --args="type=usrp1, name=lab1_xcvr"