aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--host/lib/usrp/mpmd/mpmd_prop_tree.cpp8
-rw-r--r--mpm/python/usrp_mpm/periph_manager/base.py7
-rw-r--r--mpm/python/usrp_mpm/periph_manager/n310.py8
3 files changed, 20 insertions, 3 deletions
diff --git a/host/lib/usrp/mpmd/mpmd_prop_tree.cpp b/host/lib/usrp/mpmd/mpmd_prop_tree.cpp
index a087b02dd..9f6fdd1a3 100644
--- a/host/lib/usrp/mpmd/mpmd_prop_tree.cpp
+++ b/host/lib/usrp/mpmd/mpmd_prop_tree.cpp
@@ -94,16 +94,20 @@ void mpmd_impl::init_property_tree(
/*** Device info ****************************************************/
if (not tree->exists("/name")) {
tree->create<std::string>("/name")
- .set(mb->device_info.get("name", "Unknown MPM device"))
+ .set(mb->device_info.get("description", "Unknown MPM device"))
;
}
tree->create<std::string>(mb_path / "name")
- .set(mb->device_info.get("type", "UNKNOWN"));
+ .set(mb->device_info.get("name", "UNKNOWN"));
tree->create<std::string>(mb_path / "serial")
.set(mb->device_info.get("serial", "n/a"));
tree->create<std::string>(mb_path / "connection")
.set(mb->device_info.get("connection", "UNKNOWN"));
tree->create<size_t>(mb_path / "link_max_rate").set(1e9 / 8);
+ tree->create<std::string>(mb_path / "mpm_version")
+ .set(mb->device_info.get("mpm_version", "UNKNOWN"));
+ tree->create<std::string>(mb_path / "fpga_version")
+ .set(mb->device_info.get("fpga_version", "UNKNOWN"));
/*** Clocking *******************************************************/
tree->create<std::string>(mb_path / "clock_source/value")
diff --git a/mpm/python/usrp_mpm/periph_manager/base.py b/mpm/python/usrp_mpm/periph_manager/base.py
index 9d9a293a2..079635bb1 100644
--- a/mpm/python/usrp_mpm/periph_manager/base.py
+++ b/mpm/python/usrp_mpm/periph_manager/base.py
@@ -20,6 +20,7 @@ from usrp_mpm.mpmlog import get_logger
from usrp_mpm.sys_utils.udev import get_eeprom_paths
from usrp_mpm.sys_utils.udev import get_spidev_nodes
from usrp_mpm.sys_utils import dtoverlay
+from usrp_mpm.sys_utils import net
from usrp_mpm import eeprom
from usrp_mpm.rpc_server import no_claim, no_rpc
from usrp_mpm import prefs
@@ -54,6 +55,8 @@ class PeriphManagerBase(object):
# Very important: A list of PIDs that apply to the current device. Must be
# list, even if there's only one entry.
pids = []
+ # A textual description of this device type
+ description = "MPM Device"
# Address of the motherboard EEPROM. This could be something like
# "e0005000.i2c". This value will be passed to get_eeprom_paths() tos
# determine a full path to an EEPROM device.
@@ -447,6 +450,10 @@ class PeriphManagerBase(object):
"""
result = {"claimed": str(self.claimed)}
result.update(self.mboard_info)
+ result.update({
+ 'name': net.get_hostname(),
+ 'description': self.description,
+ })
result.update(self.get_device_info_dyn())
return result
diff --git a/mpm/python/usrp_mpm/periph_manager/n310.py b/mpm/python/usrp_mpm/periph_manager/n310.py
index 07e432278..c491cf472 100644
--- a/mpm/python/usrp_mpm/periph_manager/n310.py
+++ b/mpm/python/usrp_mpm/periph_manager/n310.py
@@ -456,6 +456,7 @@ class n310(PeriphManagerBase):
# See PeriphManagerBase for documentation on these fields
#########################################################################
pids = [0x4242,]
+ description = "N300-Series Device"
mboard_eeprom_addr = "e0005000.i2c"
mboard_eeprom_max_len = 256
mboard_info = {"type": "n3xx",
@@ -782,8 +783,13 @@ class n310(PeriphManagerBase):
"""
Append the device info with current IP addresses.
"""
- return self._xport_mgrs['udp'].get_xport_info() \
+ device_info = self._xport_mgrs['udp'].get_xport_info() \
if self._device_initialized else {}
+ device_info.update({
+ 'fpga_version': "{}.{}".format(
+ *self.mboard_regs_control.get_compat_number())
+ })
+ return device_info
###########################################################################
# Clock/Time API