From 0ccf345303adea825d175955f979058da4401fbe Mon Sep 17 00:00:00 2001 From: Nicholas Corgan Date: Mon, 17 Sep 2012 14:08:41 -0700 Subject: utils: More descriptive USRP N2XX Net Burner * List option and GUI selection box display hardware revisions of detected units alongside IP addresses --- host/utils/usrp_n2xx_net_burner.py | 14 +++++++++----- host/utils/usrp_n2xx_net_burner_gui.py | 9 +++++++-- 2 files changed, 16 insertions(+), 7 deletions(-) (limited to 'host') diff --git a/host/utils/usrp_n2xx_net_burner.py b/host/utils/usrp_n2xx_net_burner.py index f2cfb8ecf..56aa3aaee 100755 --- a/host/utils/usrp_n2xx_net_burner.py +++ b/host/utils/usrp_n2xx_net_burner.py @@ -222,7 +222,9 @@ def enumerate_devices(): pkt = sock.recv(UDP_MAX_XFER_BYTES) (proto_ver, pktid, rxseq, ip_addr) = unpack_flash_ip_fmt(pkt) if(pktid == update_id_t.USRP2_FW_UPDATE_ID_OHAI_OMG): - yield socket.inet_ntoa(struct.pack(">", self._listbox_cb) + self._hints_addrs_only.bind("<>", self._listbox_cb) + self._reload_cb() self._hints.pack(expand=tkinter.YES, fill=tkinter.X) @@ -112,10 +116,11 @@ class DeviceEntryWidget(tkinter.Frame): self._hints.delete(0, tkinter.END) for hint in usrp_n2xx_net_burner.enumerate_devices(): self._hints.insert(tkinter.END, hint) + self._hints_addrs_only.insert(tkinter.END, hint.split(" (")[0]) def _listbox_cb(self, event): try: - sel = self._hints.get(self._hints.curselection()[0]) + sel = self._hints_addrs_only.get(self._hints.curselection()[0]) self._entry.delete(0, tkinter.END) self._entry.insert(0, sel) except Exception as e: print(e) @@ -196,7 +201,7 @@ class USRPN2XXNetBurnerApp(tkinter.Frame): self._disable_input() try: #make a new burner object and attempt the burner operation - burner = usrp_n2xx_net_burner.burner_socket(addr=addr) + burner = usrp_n2xx_net_burner.burner_socket(addr=addr,quiet=False) for (image_type, fw_img, fpga_img) in (('FPGA', '', fpga), ('Firmware', fw, '')): #setup callbacks that update the gui -- cgit v1.2.3