X-Git-Url: http://git.rot13.org/?p=goodfet;a=blobdiff_plain;f=client%2FGoodFETCCSPI.py;h=0e2d787b1a216477cebb9fe8036f4940724fb43e;hp=4a507d28f373dc1a3871a59e5272c542d0f1f03a;hb=a5b5dc2e02ec49f9fc9164e0e5cd70b18e48f635;hpb=3d7ed4a7b57e5ea5738a3d8c5abab22fd697505f diff --git a/client/GoodFETCCSPI.py b/client/GoodFETCCSPI.py index 4a507d2..0e2d787 100644 --- a/client/GoodFETCCSPI.py +++ b/client/GoodFETCCSPI.py @@ -89,7 +89,8 @@ class GoodFETCCSPI(GoodFET): reg, val, self.peek(reg,bytes)); - return; + return False; + return True; def status(self): """Read the status byte.""" @@ -188,9 +189,10 @@ class GoodFETCCSPI(GoodFET): #self.strobe(0x09); return; - def RF_reflexjam(self): + def RF_reflexjam(self,duration=0): """Place the device into reflexive jamming mode.""" - data = ""; + data = [duration&0xff, + (duration>>8)&0xff]; self.writecmd(self.CCSPIAPP,0xA0,len(data),data); return; @@ -199,7 +201,7 @@ class GoodFETCCSPI(GoodFET): and that also sends a forged ACK if needed.""" data = ""; self.writecmd(self.CCSPIAPP,0xA1,len(data),data); - time.sleep(30); + print "Got:", data, "and", self.data return; def RF_modulated_spectrum(self):