Questions about OOK mod and demod

Hi all!

I am a rookie and I am working about OOK mod and demod. I have few
questions
following:

I modify the digital_constellation.cc file as

d_constellation[0]=gr_complex(0,0)
d_constellation[0]=gr_complex(1,0)

like this, I think after re-make, I already achieve OOK mod. However, in
order to build ook demod, I modify as following:

return (real(*sample)>0.5)

I also embed OOK mod and demod into GRC and try to simulation in GRC
whose
flow graph is
File Source->packet Encoder->OOk mod->Channel Model->Throttle->OOk
demod->Packet decoder->File sink.
If there is no noise in channel model, ook mod and demod work perfect,
but
if there is any noise, I can not receive any file.

Anyone can tell me if I did wrong in modifying the code or there are
still
something I need to modify. Thank you for time and help very much!

Linchao

View this message in context:
http://old.nabble.com/Questions-about-OOK-mod-and-demod-tp34180717p34180717.html
Sent from the GnuRadio mailing list archive at Nabble.com.

On Wed, Jul 18, 2012 at 2:49 PM, lliao003 [email protected] wrote:

like this, I think after re-make, I already achieve OOK mod. However, in
order to build ook demod, I modify as following:

return (real(*sample)>0.5)

You really want that to be the magnitude of the sample, not just the
real portion. If you wanted to avoid the sqrt, magnitude squared can
probably work as well.

I also embed OOK mod and demod into GRC and try to simulation in GRC whose
flow graph is
File Source->packet Encoder->OOk mod->Channel Model->Throttle->OOk
demod->Packet decoder->File sink.
If there is no noise in channel model, ook mod and demod work perfect, but
if there is any noise, I can not receive any file.

Anyone can tell me if I did wrong in modifying the code or there are still
something I need to modify. Thank you for time and help very much!

Are you filtering your demodulated OOK signal afterwards? Beforehand?
How many samples/symbol are you running?

So many questions! Good luck!

Brian