X-Git-Url: http://git.rot13.org/?p=goodfet;a=blobdiff_plain;f=client%2FGoodFETNRF.py;h=3b3a4986ed13e64d72e200167bc0260d90999f37;hp=c21ae2b5112d40d4e644be3da2297a760c01c1ca;hb=f3c669a459fc7c9469b29e0bfd160590c4747f9a;hpb=392ee268f518dbd4fa8d5e3dd65752823188f65d diff --git a/client/GoodFETNRF.py b/client/GoodFETNRF.py index c21ae2b..3b3a498 100644 --- a/client/GoodFETNRF.py +++ b/client/GoodFETNRF.py @@ -26,6 +26,18 @@ class GoodFETNRF(GoodFET): self.writecmd(self.NRFAPP,0x00,len(data),data); return self.data; + def tune(self,tuning="aa,c78c65805e,14,09"): + """Tune the radio.""" + #MAC,rA,r5,r6 + fields=tuning.split(","); + ra=int(fields[1],16); + r5=int(fields[2],16); + r6=int(fields[3],16); + self.poke(0x0a,ra,5); + self.poke(0x05,r5,1); + self.poke(0x06,r6,1); + self.RF_setmaclen(3); + return; def peek(self,reg,bytes=-1): """Read an NRF Register. For long regs, result is flipped.""" data=[reg,0,0,0,0,0];