#!/usr/bin/env python
 
import sys
import time
from rflib import *
from struct import *
d = RfCat()
 
d.lowball()
d.setMdmDRate(63995) # (4194 * 1000000) / (2 ** (16 + 5 * 0))
d.setMdmDeviatn(63750)
d.setMdmChanBW(187500) # (63750 * 2) / 187500 = 68% filter bw
d.setEnablePktCRC(0)
d.setMdmSyncWord(0x2DD4) # 0x5555 0x2DD4
d.setMdmSyncMode(SYNCM_16_of_16)
d.setMdmSyncMode(SYNCM_CARRIER_16_of_16)
d.setPktPQT(3)
d.setPktPQT(7)
# The Si1000/HopeRF chip has its own unique whitening
# I've reversed the whitening and we dewhiten in userland
d.setEnablePktDataWhitening(0) 
d.setEnableMdmManchester(0)
d.setMdmModulation(MOD_FORMAT_GFSK)
d.setFreq(921813125) # see sik_map
d.setFreq(916063125) # sik_map - first channel, ch3
d.makePktFLEN(19) # 1 length + 6 netid + 6 crc + 6 first data                   
d.RFlisten()

# Execute 3dr_skyjack.pl for full decoding and channel hopping
