+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.
+ #Standard reflexive jam is done with duration=0.
+ #To selectively jam packets that are above a certain length, set duration
+ # to the number of milliseconds needed to jam frames of that length.
+ # Api-Do project has script available to tune/test this duration.
+ # code.google.com/p/zigbeesecurity (rmspeers)
+ if sys.argv[1]=="reflexjam":
+ client.RF_reflexjam(duration);
+ elif sys.argv[1]=="reflexjamack":
+ client.RF_reflexjam_autoack();
+