carrier and modulated_spectrum test modes added to GoodFETCCSPI for CC2420
[goodfet] / client / goodfet.ccspi
index 63fc5e0..f780f20 100755 (executable)
@@ -43,6 +43,22 @@ client.setup();
 #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:   %05f MHz" % (client.RF_getfreq()/(10**6));
@@ -106,13 +122,12 @@ if(sys.argv[1]=="txtest"):
         client.RF_getsmac(),
         client.RF_getfreq()/10**6);
     
+    
     while 1:
         client.RF_txpacket([0x0f, 0x01, 0x08, 0x82,
                             0xff, 0xff, 0xff, 0xff,
-                            0x4d, 0x7d, 0x09, 0x00,
-                            0x1f, 0x00, 0xc0]);
-        print client.status();
-        print;
+                            0xde, 0xad, 0xbe, 0xef,
+                            0xba, 0xbe, 0xc0]);
 
 if(sys.argv[1]=="peek"):
     start=0x0000;