summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Foster <nick@ettus.com>2011-06-15 18:58:49 -0700
committerNick Foster <nick@ettus.com>2011-06-15 18:58:49 -0700
commit6dbd79ab34878f2f8d5fa3b9040fd4d2e5854980 (patch)
tree6e63bd244f5c2ca2e45e9f09e027fa05b95b5d78
parentc713f8a4727b140f8524dd38b81ab2a9077859ff (diff)
downloaduhd-6dbd79ab34878f2f8d5fa3b9040fd4d2e5854980.tar.gz
uhd-6dbd79ab34878f2f8d5fa3b9040fd4d2e5854980.tar.bz2
uhd-6dbd79ab34878f2f8d5fa3b9040fd4d2e5854980.zip
fw_updater: decrease discovery timeout, modify win to return bcast instead of ip
-rwxr-xr-xhost/utils/usrp_n2xx_net_burner.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/host/utils/usrp_n2xx_net_burner.py b/host/utils/usrp_n2xx_net_burner.py
index 878b8b28c..ec2454606 100755
--- a/host/utils/usrp_n2xx_net_burner.py
+++ b/host/utils/usrp_n2xx_net_burner.py
@@ -184,7 +184,7 @@ def win_get_interfaces():
for a in adapterList:
adNode = a.ipAddressList
while True:
- ipAddr = adNode.ipAddress
+ ipAddr = (adNode.ipAddress & adNode.ipMask) | ~adNode.ipMask
if ipAddr:
yield ipAddr
adNode = adNode.next
@@ -197,8 +197,7 @@ def enumerate_devices():
for bcast_addr in ifaces:
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
- sock.settimeout(UDP_TIMEOUT)
- print "Sending bcast pkt to %s" % bcast_addr
+ sock.settimeout(0.1)
out_pkt = pack_flash_args_fmt(USRP2_FW_PROTO_VERSION, update_id_t.USRP2_FW_UPDATE_ID_OHAI_LOL, 0, 0, 0)
sock.sendto(out_pkt, (bcast_addr, UDP_FW_UPDATE_PORT))
still_goin = True