#Dummy read.
#Might read as all ones if chip has a startup delay.
+if(sys.argv[1]=="carrier"):
+ if len(sys.argv)>2:
+ client.RF_setfreq(eval(sys.argv[2]));
+ while 1:
+ client.RF_carrier();
+ while(1):
+ time.sleep(1);
+
+if(sys.argv[1]=="modulated_spectrum"):
+ if len(sys.argv)>2:
+ client.RF_setfreq(eval(sys.argv[2]));
+ while 1:
+ client.RF_modulated_spectrum();
+ while(1):
+ time.sleep(1);
+
if(sys.argv[1]=="info"):
- print "Found %s" % client.identstr();
- print "Freq: %05.05f MHz" % (client.RF_getfreq()/(10**6));
+ print "Found %s" % client.identstr();
+ print "Freq: %05f MHz" % (client.RF_getfreq()/(10**6));
+ print "Status: %s" % client.status();
if(sys.argv[1]=="regs"):
for adr in range(0x10,0x40): #*1024):
val=client.peek(adr);
string=("%s."%string);
print "%02x %04i %s" % (rssi,rssi, string);
if(sys.argv[1]=="sniff"):
+ #Promiscuous mode.
+ client.RF_promiscuity(1);
+
if len(sys.argv)>2:
freq=eval(sys.argv[2]);
if freq>100:
while 1:
packet=None;
while packet==None:
- #time.sleep(0.1);
packet=client.RF_rxpacket();
printpacket(packet);
sys.stdout.flush();
+if(sys.argv[1]=="txtest"):
+ if len(sys.argv)>2:
+ freq=eval(sys.argv[2]);
+ if freq>100:
+ client.RF_setfreq(freq);
+ else:
+ print "Channels not yet supported."
+ print "Transmitting as %010x on %i MHz" % (
+ client.RF_getsmac(),
+ client.RF_getfreq()/10**6);
+
+
+ while 1:
+ client.RF_txpacket([0x0f, 0x01, 0x08, 0x82,
+ 0xff, 0xff, 0xff, 0xff,
+ 0xde, 0xad, 0xbe, 0xef,
+ 0xba, 0xbe, 0xc0]);
+
if(sys.argv[1]=="peek"):
start=0x0000;
if(len(sys.argv)>2):