Comments about checksumming.
authortravisutk <travisutk@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Wed, 26 May 2010 21:15:24 +0000 (21:15 +0000)
committertravisutk <travisutk@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Wed, 26 May 2010 21:15:24 +0000 (21:15 +0000)
Cleaned up mac length.

git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@569 12e2690d-a6be-4b82-a7b7-67c4a43b65c8

client/GoodFETNRF.py
client/goodfet.nrf

index 007ae0f..82cfbb4 100644 (file)
@@ -163,7 +163,7 @@ class GoodFETNRF(GoodFET):
     maclen=5;
     def RF_getmaclen(self):
         """Get the number of bytes in the MAC address."""
-        choices=["illegal", 3, 4, 5];
+        choices=[0, 3, 4, 5];
         choice=self.peek(0x03)&3;
         self.maclen=choices[choice];
         return self.maclen;
index cf9fb0d..4c2eb0e 100755 (executable)
@@ -35,7 +35,7 @@ def printconfig():
     print "Freq    %10i MHz" % (client.RF_getfreq()/10**6);
     print "Rate    %10i kbps" % (client.RF_getrate()/1000);
     print "PacketLen %02i bytes" % client.RF_getpacketlen();
-    print "MacLen    %2i bytes" % client.RF_getmaclen();
+    #print "MacLen    %2i bytes" % client.RF_getmaclen();
     print "SMAC  0x%010x" % client.RF_getsmac();
     print "TMAC  0x%010x" % client.RF_gettmac();
 
@@ -146,13 +146,12 @@ if(sys.argv[1]=="sniffob"):
     #Set packet length of 16.
     client.RF_setpacketlen(16);
     
-    #Power radio, prime for RX, checksum.
-    client.poke(0x00,0x70|0x03|0x08);
+    #Power radio, prime for RX, but no checksum.
+    client.poke(0x00,0x70|0x03|0x08); #0x08 for one byte, 0x04 for two.
     
     print "Listening as %010x on %i MHz" % (client.RF_getsmac(),
                                            client.RF_getfreq()/10**6);
     #Now we're ready to get packets.
-    
     while 1:
         packet=None;
         while packet==None: