X-Git-Url: http://git.rot13.org/?p=goodfet;a=blobdiff_plain;f=client%2Fgoodfet.ccspi;h=28086ec8f2ed923851cd018454b3eb05d991aa2f;hp=ea69da39a5c779c2689598ba5b8e273c6f532587;hb=0921c40dfa9f0b9d47ab6eef38f416a732f56968;hpb=671771f8909b6821de8aef5b90f9390ffb648988 diff --git a/client/goodfet.ccspi b/client/goodfet.ccspi index ea69da3..28086ec 100755 --- a/client/goodfet.ccspi +++ b/client/goodfet.ccspi @@ -26,10 +26,9 @@ if(len(sys.argv)==1): print "%s bsniff [chan]" % sys.argv[0]; print "%s sniffdissect" % sys.argv[0]; - - print; - print "%s txtoscount [-i|-r] TinyOS BlinkToLED" % sys.argv[0]; - + print "\n%s txtoscount [-i|-r] TinyOS BlinkToLED" % sys.argv[0]; + print "%s reflexjam [channel=11] [delay=0]" % sys.argv[0]; + sys.exit(); #Initialize FET and set baud rate @@ -44,7 +43,7 @@ client.setup(); if(sys.argv[1]=="carrier"): if len(sys.argv)>2: client.RF_setfreq(eval(sys.argv[2])); - while 1: + while 1: client.RF_carrier(); while(1): time.sleep(1); @@ -57,6 +56,27 @@ if(sys.argv[1]=="modulated_spectrum"): while(1): time.sleep(1); +if(sys.argv[1]=="reflexjam" or sys.argv[1]=="reflexjamack"): + #Setup the radio to listen promiscously on a frequency + client.RF_promiscuity(1); + client.RF_autocrc(0); + if len(sys.argv)>2: + freq=eval(sys.argv[2]); + if freq>100: + client.RF_setfreq(freq); + else: + client.RF_setchan(freq); + duration=0; + if len(sys.argv)>3: + duration=eval(sys.argv[3]); + client.CC_RFST_RX(); + print "Reflexively jamming on %i MHz" % (client.RF_getfreq()/10**6); + #Now we let the firmware take over, watching for packets and jamming them. + if sys.argv[1]=="reflexjam": + client.RF_reflexjam(duration); + elif sys.argv[1]=="reflexjamack": + client.RF_reflexjam_autoack(); + if(sys.argv[1]=="info"): print "Found %s" % client.identstr(); print "Freq: %05f MHz" % (client.RF_getfreq()/(10**6)); @@ -157,8 +177,9 @@ if(sys.argv[1]=="txtest"): 0xba, 0xbe, 0xc0]); if(sys.argv[1]=="txtoscount"): ''' - Clone of what TinyOS's BlinkToLED demo code does. - Specify a channel a TinyOS mote programmed with BlinkToLED is on, and this will act as the second device. + Clone of what TinyOS's RadioCountToLeds demo code does. Specify a + channel a TinyOS mote programmed with RadioCountToLeds is on, and + this will act as the second device. ''' if (len(sys.argv)<=3): print "Provide -r to work via replays or -i to work via incrementing itself.";