# How to put a break between packets

**URL:** <https://discourse.myriadrf.org/t/how-to-put-a-break-between-packets/5855>\
**Category:** Applications\
**Created:** [9 March 2020 14:02 UTC](https://discourse.myriadrf.org/t/how-to-put-a-break-between-packets/5855 "2020-03-09T14:02:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rush84](https://avatars.discourse-cdn.com/v4/letter/r/4491bb/32.png) [@rush84](https://discourse.myriadrf.org/u/rush84)\
**Post date:** [9 March 2020 14:02 UTC](https://discourse.myriadrf.org/t/how-to-put-a-break-between-packets/5855/1 "2020-03-09T14:02:09Z")

</div>

I am new to gnuradio and all the SDR-stuff and would like to make a simple OOK transmitter for my remote power plugs. According to this pages

> **[On-Off Keying (ASK) with SDR](https://zeta-two.com/radio/2015/06/23/ook-ask-sdr.html)**
>
> About a year ago I bought a HackRF from Great Scott Gadgets with the goal to learn more about radio and in particular software defined radio, SDR.Michael Oss...

[https://www.w1gx.us/](https://www.w1gx.us/)

I made the flowgraph that is basically working. All looks fine. Only the breaks between the block are to long.

 ![Compare](https://canada1.discourse-cdn.com/flex034/uploads/myriadrf/original/2X/5/5b57513b093a81ec1b3dbe928ee1d70b870ca2a2.jpeg)

Top: original signal recorded by RTl-SDR  
Buttom: generated and transmitted Signal via LimeSDRmini and recorded with RTL-Stick

As you can see, the breaks between the packets are to long.  
So my question is: How can I add n samples between the blocks?

This is my transmitter flowgraph:

 ![flowgraph_ook_transmitter](https://canada1.discourse-cdn.com/flex034/uploads/myriadrf/original/2X/2/2d622ea1113844ad9bff3d30fb85dd62a50e367f.png)

At the moment I use the Interleave-Block like shown in the second link. I have 5 symbols per bit and 25 bits per block. That means 125 symbols per block. The interleaver is configured to a blocksize of 125.-blocks. That means that after every block follows a 0-block of 125 symbols, wich is as long as the data-block (about 32ms).

For my configuration I only need a blocksize of 125/3 (a break of 10ms).

I tried different things: putting in a Repeat-Block configured to125/3 between Constant Source and interleaver. No success.

trying to throttle the constant 0 to interleaver: No success.

putting in a 6th vector into the patterned interleaver with a few zeros to check if I can control the breaks between packets: No success.

I think a block similar to the Interleave-Block could solve my problem.  
For example a block with two inputs where I can set how many items will be interleaved for every single input. Some kind of:

connections = 2  
blocksize\_0 = 2  
blocksize\_1 = 4  
input[0] = [a, b, e, f, g, h, i, j, k, l, m, n]  
input[1] = [o, p, q, r, s, t, u, v, w, x, y, z]  
output = [a, b, o, p, q, r, e, f, s, t, u, v]

Hope someone can help me since I am sitting on this problem since 3 days…

---

<div class="post-metadata">

**Author:** ![rush84](https://avatars.discourse-cdn.com/v4/letter/r/4491bb/32.png) [@rush84](https://discourse.myriadrf.org/u/rush84)\
**Post date:** [9 March 2020 14:46 UTC](https://discourse.myriadrf.org/t/how-to-put-a-break-between-packets/5855/2 "2020-03-09T14:46:43Z")

</div>

Well, I found the block that I have described and it actually solved my problem. Just replaced the interleave-block with the “Stream Mux-Block”.

But according to this flowgraph I have another question. The graph seems to stop operation after a few packets has been send. When I bypass the “Stream Mux”-block and connect the patterned interleaver directly to the repeat block, the graph is working continuously. What could it make stopping ?
