Skip to content
This repository has been archived by the owner on May 18, 2022. It is now read-only.

How to send a signal just once? #21

Open
probonopd opened this issue Dec 17, 2016 · 4 comments
Open

How to send a signal just once? #21

probonopd opened this issue Dec 17, 2016 · 4 comments

Comments

@probonopd
Copy link
Contributor

probonopd commented Dec 17, 2016

I can successfully send this signal, with "+" being "27.145 MHz on", and "-" = off/other frequency:

+9024 -4512 +564 -564 +564 -1692 +564 -564 +564 -1692 +564 -1692 +564 -1692 +564 -564 +564 -1692 +564 -1692 +564 -564 +564 -1692 +564 -564 +564 -1692 +564 -564 +564 -1692 +564 -564 +564 -1692 +564 -564 +564 -564 +564 -564 +564 -564 +564 -564 +564 -564 +564 -564 +564 -564 +564 -1692 +564 -1692 +564 -1692 +564 -1692 +564 -1692 +564 -1692 +564 -1692 +564 -38628

I translated the above to

[
    {
        "frequency": 27.145,
        "dead_frequency": 49.830,
        "burst_us": 9024,
        "spacing_us": 4512,
        "repeats": 1
    },
    {
        "frequency": 27.145,
        "dead_frequency": 49.830,
        "burst_us": 564,
        "spacing_us": 564,
        "repeats": 1
    },
    {
        "frequency": 27.145,
        "dead_frequency": 49.830,
        "burst_us": 564,
        "spacing_us": 1692,
        "repeats": 1
    },
    {
        "frequency": 27.145,
        "dead_frequency": 49.830,
        "burst_us": 564,
        "spacing_us": 564,
        "repeats": 1
    },
    {
        "frequency": 27.145,
        "dead_frequency": 49.830,
        "burst_us": 564,
        "spacing_us": 1692,
        "repeats": 3
    },
    {
        "frequency": 27.145,
        "dead_frequency": 49.830,
        "burst_us": 564,
        "spacing_us": 564,
        "repeats": 1
    },
    {
        "frequency": 27.145,
        "dead_frequency": 49.830,
        "burst_us": 564,
        "spacing_us": 1692,
        "repeats": 2
    },
    {
        "frequency": 27.145,
        "dead_frequency": 49.830,
        "burst_us": 564,
        "spacing_us": 564,
        "repeats": 1
    },
    {
        "frequency": 27.145,
        "dead_frequency": 49.830,
        "burst_us": 564,
        "spacing_us": 1692,
        "repeats": 1
    },
    {
        "frequency": 27.145,
        "dead_frequency": 49.830,
        "burst_us": 564,
        "spacing_us": 564,
        "repeats": 1
    },
    {
        "frequency": 27.145,
        "dead_frequency": 49.830,
        "burst_us": 564,
        "spacing_us": 1692,
        "repeats": 1
    },
    {
        "frequency": 27.145,
        "dead_frequency": 49.830,
        "burst_us": 564,
        "spacing_us": 564,
        "repeats": 1
    },
    {
        "frequency": 27.145,
        "dead_frequency": 49.830,
        "burst_us": 564,
        "spacing_us": 1692,
        "repeats": 1
    },
    {
        "frequency": 27.145,
        "dead_frequency": 49.830,
        "burst_us": 564,
        "spacing_us": 564,
        "repeats": 1
    },
    {
        "frequency": 27.145,
        "dead_frequency": 49.830,
        "burst_us": 564,
        "spacing_us": 1692,
        "repeats": 1
    },
    {
        "frequency": 27.145,
        "dead_frequency": 49.830,
        "burst_us": 564,
        "spacing_us": 564,
        "repeats": 8
    },
    {
        "frequency": 27.145,
        "dead_frequency": 49.830,
        "burst_us": 564,
        "spacing_us": 1692,
        "repeats": 7
    },
    {
        "frequency": 27.145,
        "dead_frequency": 49.830,
        "burst_us": 564,
        "spacing_us": 1692000, 
        "repeats": 1
    }
]

I can successfully send the signal with:

sudo ./pi_pcm -v

# In another terminal:
cat mute.json > /dev/udp/127.0.0.1/12345

But it keeps repeating over and over. How can I make it send the signal just once? (Sending something all the time is not something I want to do.)

mute

@probonopd
Copy link
Contributor Author

To be clear, I just want to send the signal once without repeats.

@probonopd
Copy link
Contributor Author

"frequency": 27.145,

@probonopd probonopd changed the title How to send this signal? How to send a signal just once? Dec 17, 2016
@probonopd
Copy link
Contributor Author

Updated the original post.

@bskari
Copy link
Owner

bskari commented Mar 20, 2017

Hello, I looked through your gist. Looks like a cool project! I think that gqrx can record samples to IQ files (under the tools menu), and you could use rpitx to replay that IQ file once on a Raspberry Pi. My repository here is more set up for broadcasting signals repeatedly for radio control stuff, and rpitx is the better choice for broadcasting single signals. rpitx also supports FT files, which I think you could convert the above signal specification into, although I don't know how to do it off hand.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants