From: travisutk Date: Wed, 26 May 2010 21:15:24 +0000 (+0000) Subject: Comments about checksumming. X-Git-Url: http://git.rot13.org/?p=goodfet;a=commitdiff_plain;h=355ef276d7198118ae9856f4077d85ac98f9b214 Comments about checksumming. Cleaned up mac length. git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@569 12e2690d-a6be-4b82-a7b7-67c4a43b65c8 --- diff --git a/client/GoodFETNRF.py b/client/GoodFETNRF.py index 007ae0f..82cfbb4 100644 --- a/client/GoodFETNRF.py +++ b/client/GoodFETNRF.py @@ -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; diff --git a/client/goodfet.nrf b/client/goodfet.nrf index cf9fb0d..4c2eb0e 100755 --- a/client/goodfet.nrf +++ b/client/goodfet.nrf @@ -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: