I'm building off of the fsk_tx/rx examples and implementing a CSMA/CA-like protocol. I'm trying to implement carrier sensing, and I'm using gr_simple_squelch, as Eric suggest (off-list conversation). However, I'm seeing a very low receive signal (about 2-3 dB). The fsk_rx shows receive signal at 20dB when there's nothing being transmitted (20dB of just noise?) and around 30dB when I fire up fsk_rx. The fsk examples do some extra stuff for displaying, like additional filtering and FFTs, but would that affect the Rx power? Presumably, I should be able to take the gr_complex items given by the USRP, compute power, and pass them along to the demodulator.
Carrier sense just calculates the power using gr_single_pole_filter
(d_iir) with alpha of 0.01 (tried 0.1, 0.001, and a few other values).
I set the threshold to 20dB, but maybe that's too high.
for (int i = 0; i < noutput_items; i++) {
mag_sqrd = in[i].real()*in[i].real() + in[i].imag()*in[i].imag();
f = d_iir.filter(mag_sqrd);
if (f > threshold) {
// handle carrier busy
}
else {
// handle carrier idle
}
}
Does this make sense at all?
Thanks,
-Rahul
--
Rahul Dhar
[EMAIL PROTECTED]
Actually, my goal is to have a sandwich named after me.
pgpIuBi4NTeJc.pgp
Description: PGP signature
_______________________________________________ Discuss-gnuradio mailing list [email protected] http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
