# OOK Mod and Demod

**URL:** <https://www.ruby-forum.com/t/ook-mod-and-demod/224357>\
**Category:** GNU Radio\
**Created:** [November 8, 2012, 8:25pm UTC](https://www.ruby-forum.com/t/ook-mod-and-demod/224357 "2012-11-08T20:25:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@aris](https://www.ruby-forum.com/u/aris)\
**Post date:** [November 8, 2012, 8:25pm UTC](https://www.ruby-forum.com/t/ook-mod-and-demod/224357/1 "2012-11-08T20:25:05Z")

</div>

Hello,

I am trying to create an ook modulation and demodulation block. So far,  
I  
have created a block similar to the bpsk block. I changed my  
constellations  
points to 1+0j and 0+0j. I want a rectangular pulse to be transmitted  
for a  
1 and nothing for 0. I was told I could do this by changing the  
raise\_root\_cosine filter used in the generic\_mod\_demod.py to a LPF  
filter. I  
am unsure how to do this. Could any one help? I would greatly appreciate  
any  
help. Thank you for your time and help.

Sam

–  
View this message in context:  
[http://gnuradio.4.n7.nabble.com/OOK-Mod-and-Demod-tp38298.html](http://gnuradio.4.n7.nabble.com/OOK-Mod-and-Demod-tp38298.html)  
Sent from the GnuRadio mailing list archive at [Nabble.com](http://Nabble.com).

---

<div class="post-metadata">

**Author:** ![sibar002](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bbce88/32.png) [@sibar002](https://www.ruby-forum.com/u/sibar002)\
**Post date:** [November 9, 2012, 2:31am UTC](https://www.ruby-forum.com/t/ook-mod-and-demod/224357/2 "2012-11-09T02:31:25Z")

</div>

On Thu, Nov 8, 2012 at 2:24 PM, sibar002 [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Sam  
> Line 137 in generic\_mod\_demod.py is where the RRC filter taps are  
> created for the transmitter. Change from using a  
> gr.firdes.root\_raised\_cosine to gr.firdes.low\_pass\_2.

Use this page for details of what the arguments to the low\_pass\_2  
filter generator function are:

> **[GNU Radio Manual and C++ API Reference: gr::filter::firdes Class Reference](https://www.gnuradio.org/doc/doxygen/classgr_1_1filter_1_1firdes.html)**

Tom
