From 5e0cebdc19eecad0cceac2d81bee0405a89cfe5a Mon Sep 17 00:00:00 2001 From: Steve Czabaniuk Date: Mon, 29 Jun 2020 15:43:28 -0500 Subject: mpm: n3xx: bist: Read mboard and dboard eeprom to determine product The routine to identify products currently only reads the motherboard EEPROM. The N310 and N320/N321 use the same motherboard so these devices can't be distinguished using the motherboard EEPROM alone. This change makes get_product_id() read both the motherboard and daughterboard EEPROM in order to determine which N3xx it actually is. --- mpm/python/usrp_mpm/bist.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'mpm/python/usrp_mpm') diff --git a/mpm/python/usrp_mpm/bist.py b/mpm/python/usrp_mpm/bist.py index b20020e1f..2287d79ab 100644 --- a/mpm/python/usrp_mpm/bist.py +++ b/mpm/python/usrp_mpm/bist.py @@ -216,14 +216,13 @@ def filter_results_for_lv(results, lv_compat_format): } return results -def get_product_id_from_eeprom(valid_ids): +def get_product_id_from_eeprom(valid_ids, cmd='eeprom-id'): """Return the mboard product ID Returns something like n300, n310, e320... """ - cmd = ['eeprom-id'] output = subprocess.check_output( - cmd, + [cmd], stderr=subprocess.STDOUT, shell=True, ).decode('utf-8') -- cgit v1.2.3