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;
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();
#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: