I'm trying to use the GNU Radio descrambling blocks. I have a block written by a third party that takes of descrambling. The polynomial used is x17 + x12 + 1.
The code is given below
descrambler_cc_impl::descrambler_cc_impl()
: gr::sync_block("descrambler_cc",
gr::io_signature::make(1, 1, sizeof(unsigned char)),
gr::io_signature::make(1, 1, sizeof(unsigned char)))
{
lsr = 0;
}
/*
* Our virtual destructor.
*/
descrambler_cc_impl::~descrambler_cc_impl()
{
}
int
descrambler_cc_impl::work(int noutput_items,
gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items)
{
const unsigned char *in = (const unsigned char *) input_items[0];
unsigned char *out = (unsigned char *) output_items[0];
int i;
for (i = 0; i < noutput_items; i++) {
out[i] = (lsr & 1) ^ ((lsr >> 12) & 1) ^ ((lsr >> 17) & 1);
lsr = lsr << 1;
lsr = lsr | (in[i] & 1);
}
// Tell runtime system how many output items we produced.
return i;
}
Now I want to use the GNU Radio descrambler block. From
this link, I calculated the descrambling parameters as follows : Mask - 0x0210001 ; seed - 0x00; length - 24.
Unfortunately, it is not working as its counterpart in the code shown above. Could someone provide guidance as to why this is not working?