#print "'%s'!=\n'%s'" % (self.data,"http://goodfet.sf.net/");
if attemptlimit is not None and attempts >= attemptlimit:
return
- elif attempts==2:
+ elif attempts==2 and os.environ.get("board")!='telosb':
print "See the GoodFET FAQ about missing info flash.";
self.serialport.setTimeout(0.2);
+ elif attempts == 100:
+ print "Tried 100 times to connect and failed."
+ sys.stdout.write("Continuing to try forever.") # No newline
+ sys.stdout.flush()
+ self.verbose=True # Something isn't going right, give the user more info
+ elif attempts > 100 and attempts % 10 == 0:
+ sys.stdout.write('.')
+ sys.stdout.flush()
#self.serialport.flushInput()
#self.serialport.flushOutput()
#TelosB reset, prefer software to I2C SPST Switch.
- if (os.environ.get("platform")=='telosb' or os.environ.get("board")=='telosb'):
+ if (os.environ.get("board")=='telosb'):
#print "TelosB Reset";
self.telosBReset();
- elif (os.environ.get("board")=='zolertiaz1' or os.environ.get("board")=='z1'):
+ elif (os.environ.get("board")=='z1'):
self.bslResetZ1(invokeBSL=0);
elif (os.environ.get("board")=='apimote1') or (os.environ.get("board")=='apimote'):
#Explicitly set RTS and DTR to halt board.
#Here we have a connection, but maybe not a good one.
#print "We have a connection."
connected=1;
+ if attempts >= 100:
+ print "" # Add a newline
olds=self.infostring();
clocking=self.monitorclocking();
for foo in range(1,30):