'goodfet.ccspi txtest' is now documented.
[goodfet] / client / goodfet.ccspi
index 63fc5e0..d0b4246 100755 (executable)
@@ -27,6 +27,7 @@ if(len(sys.argv)==1):
     print "%s test" % sys.argv[0];
     print "%s peek 0x$start [0x$stop]" % sys.argv[0];
     print "%s poke 0x$adr 0x$val" % sys.argv[0];
+    print "%s txtest" % sys.argv[0];
     
     print "\n%s rssi" % sys.argv[0];
     print "%s sniff" % sys.argv[0];
@@ -43,6 +44,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));
@@ -102,17 +119,16 @@ if(sys.argv[1]=="txtest"):
             client.RF_setfreq(freq);
         else:
             print "Channels not yet supported."
-    print "Transmitting as %010x on %i MHz" % (
+    print "Transmitting DEADBEEF 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,
-                            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;