Hi,
In the gmskframe example, at the receiving side gmskframesync is initialized but no header and fec information is passed so how callback function at the
receiver is able to provide data and headler validity .
Following code is from example. I have used it along with soapysdr to transmit frames from one sdr to other at a distance of a feet and I get 50% error in packets. I have not introduced error in packets as done in code.
// create frame generator and assemble
gmskframegen fg = gmskframegen_create_set(k, m, BT);
gmskframegen_assemble(fg, header, payload, payload_len, check, fec0, fec1);
// create frame synchronizer
gmskframesync fs = gmskframesync_create_set(k, m, BT, callback, NULL);
// allocate buffer for storing entire frame
unsigned int num_samples = gmskframegen_getframelen(fg) + 800;
float complex buf[num_samples];
memset(buf, 0x00, num_samples*sizeof(float complex));
// generate frame in one shot with sample offset
gmskframegen_write(fg, buf+250, num_samples-250);
// add channel gain and noise
for (i=0; i<num_samples; i++)
buf[i] = 0.3*buf[i] + 0.01f*(randnf() + randnf()*_Complex_I)*M_SQRT1_2;
// push samples through synchronizer
gmskframesync_execute(fs, buf, num_samples);
gmskframesync_print(fs);
// destroy objects
gmskframegen_destroy(fg);
gmskframesync_destroy(fs);
Hi, In the gmskframe example, at the receiving side gmskframesync is initialized but no header and fec information is passed so how callback function at the receiver is able to provide data and headler validity . Following code is from example. I have used it along with soapysdr to transmit frames from one sdr to other at a distance of a feet and I get 50% error in packets. I have not introduced error in packets as done in code.
Thanks