From 6dbd79ab34878f2f8d5fa3b9040fd4d2e5854980 Mon Sep 17 00:00:00 2001 From: Nick Foster Date: Wed, 15 Jun 2011 18:58:49 -0700 Subject: fw_updater: decrease discovery timeout, modify win to return bcast instead of ip --- host/utils/usrp_n2xx_net_burner.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'host/utils') 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 -- cgit v1.2.3