Re: Help on creating an intermittent beacon transmission using HackRF

2024-02-09 Thread Marcus Müller

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/ 

University of Southern California

4676 Admiralty Way, Suite 1001

Marina del Rey, CA  90292

Office:  310-448-8644

ISI e-mail: barnh...@isi.edu 

USC E-mail: dbarn...@usc.edu 





Re: Help on creating an intermittent beacon transmission using HackRF

2024-02-08 Thread Adrian Musceac
> 
> Another possibility is to write your own source block which reads and stores
> the samples in memory, then outputs them at a specified time until the
> whole buffer is transmitted, then sleeps for a while and repeats. If you
> need to control  actual transmission time more precisely it can be done
> using timestamps at the start of the samples. It also depends on how long
> your transmission is (whether you can store all samples in a memory buffer
> or need to read  and output chunks of it at a time).
> 

Sorry, only now I realized you specified using the HackRF, so please ignore the 
comment about timestamps.

Adrian







Re: Help on creating an intermittent beacon transmission using HackRF

2024-02-08 Thread Adrian Musceac
On Wednesday, 7 February 2024 21:03:11 EET Daniel Estévez wrote:
> 
> Hi David,
> 
> One possible solution would be to make a flowgraph that plays the file 
> once. Then make a bash script that loops, calling the flowgraph and then 
> sleeping for some time.
> 
> Best,
> Daniel.
> 

Another possibility is to write your own source block which reads and stores 
the samples in memory, then outputs them at a specified time until the whole 
buffer is transmitted, then sleeps for a while and repeats. If you need to 
control  actual transmission time more precisely it can be done using 
timestamps at the start of the samples. It also depends on how long your 
transmission is (whether you can store all samples in a memory buffer or need 
to read  and output chunks of it at a time).

Adrian







Re: Help on creating an intermittent beacon transmission using HackRF

2024-02-07 Thread Daniel Estévez

On 07/02/2024 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.


Hi David,

One possible solution would be to make a flowgraph that plays the file 
once. Then make a bash script that loops, calling the flowgraph and then 
sleeping for some time.


Best,
Daniel.



OpenPGP_signature.asc
Description: OpenPGP digital signature