diff --git a/packetdemod.py b/packetdemod.py index 1825c64..bdaf828 100644 --- a/packetdemod.py +++ b/packetdemod.py @@ -126,7 +126,7 @@ def parsepacket(bits): invalid_packets += 1 return syncword = (ord(bytes[0])<<8) + ord(bytes[1]) - if(syncword != 0x2d21): + if(syncword != 0x2dd4): print("Invalid packet") invalid_packets += 1 return @@ -192,7 +192,7 @@ def decode(values = []): # Align to sync word for beginning of packet for i in range(1,50): - syncword = [0,0,1,0,1,1,0,1,0,0,1,0,0,0,0,1] + syncword = [0,0,1,0,1,1,0,1,1,1,0,1,0,1,0,0] tmpbits = bits[i:] if(cmp(syncword,tmpbits[:16].tolist()) == 0): bits = bits[i:] diff --git a/radio.py b/radio.py index df67922..25e366f 100644 --- a/radio.py +++ b/radio.py @@ -81,7 +81,7 @@ def parsepacket(bits): invalid_packets += 1 return syncword = (ord(bytes[0])<<8) + ord(bytes[1]) - if(syncword != 0x2d21): + if(syncword != 0x2dd4): print("Invalid packet") invalid_packets += 1 return @@ -147,7 +147,7 @@ def decode(values = []): # Align to sync word for beginning of packet for i in range(1,50): - syncword = [0,0,1,0,1,1,0,1,0,0,1,0,0,0,0,1] + syncword = [0,0,1,0,1,1,0,1,1,1,0,1,0,1,0,0] tmpbits = bits[i:] if(cmp(syncword,tmpbits[:16].tolist()) == 0): bits = bits[i:]