discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help on creating an intermittent beacon transmission using HackRF


From: Marcus Müller
Subject: Re: Help on creating an intermittent beacon transmission using HackRF
Date: Fri, 9 Feb 2024 21:05:55 +0100
User-agent: Mozilla Thunderbird

Hi David!

I'd be very lazy: just pad your pre-recorded signal with zeros, and play it on loop with the file source.

Padding of files is easy, and essentially free in terms of storage space if your file system supports sparse files (and if you're on linux, yes, it almost certainly does).

#!/bin/bash
# or #!/bin/zsh, whatever you prefer

# Calculate the number of bytes a 10 minute long sample file has:
reals_per_complex=2             # complex has real and an imaginary part
bytes_per_real=4                # for float or int32
sample_rate_hz=$(( 8* 10**6 ))  # 8 MS/s
duration_s=$(( 10 * 60 ))       # 10 Minutes

filesize=$(( reals_per_complex * bytes_per_real * sample_rate_hz * duration_s ))

# resize your recording to the calculated length
# This only works because on any computer architecture I can think of, numbers 
consisting
# solely of zero-valued octets are zeros, numerically

fallocate --length ${filesize} yourrecording.cfile

Best,
Marcus


On 07.02.24 17:09, David Barnhart wrote:
Hi all:   I teach a course at USC on satellite ground communications that is a lab-based class.

I would like to setup an intermittent transmission using a recorded beacon that we have used before (in cfile format) to have them practice “catching signals” using lab Spectrum Analyzers and SDRSharp tools in the lab.  I can get the beacon transmitting continuously with its recorded waveform, however am not familiar enough to figure what block structure to use to only intermittently transmit this signal every 10 or 20 seconds.   Might there be some easy way to do this?  Am using osmocom to transmit via bench top HackRF in closed lab room, with a cfile recording.

Thanks so much!    Dave

Research Professor &

Director, Space Engineering Research Center

Department of Astronautical Engineering and Information Sciences Institute

https://www.isi.edu/centers-serc/ <https://www.isi.edu/centers-serc/>

University of Southern California

4676 Admiralty Way, Suite 1001

Marina del Rey, CA  90292

Office:  310-448-8644

ISI e-mail: barnhart@isi.edu <mailto:barnhart@isi.edu>

USC E-mail: dbarnhar@usc.edu <mailto:dbarnhar@usc.edu>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]