CCSPI stuff.
authortravisutk <travisutk@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Thu, 24 Feb 2011 01:11:03 +0000 (01:11 +0000)
committertravisutk <travisutk@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Thu, 24 Feb 2011 01:11:03 +0000 (01:11 +0000)
git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@949 12e2690d-a6be-4b82-a7b7-67c4a43b65c8

client/GoodFETCCSPI.py
client/goodfet.ccspi

index 5ea56be..e205811 100644 (file)
@@ -133,7 +133,7 @@ class GoodFETCCSPI(GoodFET):
         mhz=2048+(fsctrl&0x3ff)
         return mhz*1000000;
     def RF_setchan(self,channel):
-        if channel < 11 and channel > 26:
+        if channel < 11 or channel > 26:
             print "Only 802.15.4 channels 11 to 26 are currently supported.";
         else:
             self.RF_setfreq( ( (channel-11)*5 + 2405 ) * 1000000 );
index d5b869c..359f2c4 100755 (executable)
@@ -163,13 +163,18 @@ if(sys.argv[1]=="txpiptest"):
         client.RF_getfreq()/10**6);
     
     while 1:
-        client.RF_txpacket([0x2f, 0x01, 0x08, 0x82,
-                            0xff, 0xff, 0xff, 0xff,
+        client.RF_txpacket([0x3f, 0x01, 0x08, 0x82,
+                            0xDE, 0xff, 0xff, 0xff,
                             0xde, 0xad, 0xbe, 0xef,
                             0xba, 0xbe, 0xc0,
                             
-                            0x00, 0x00, 0x00, 0x00,
-                            0x7a,
+                            0x00, 0x00, 0x00,
+                            0x00, 0x00, 0x00,
+                            0x00, 0x00, 0x00,
+                            0x00, 0x00, 0x00,
+                            
+                            #0x00, 0xA7,  #CC2420 SFD
+                            
                             0x0f, 0x01, 0x08, 0x82,
                             0xff, 0xff, 0xff, 0xff,
                             0xde, 0xad, 0xbe, 0xef,