Hi Doug,

you may use the source of hackrf-tools as a starting point. The tool
hackrf_transfer does the "reading a file and sending them out" (tx)
mentioned below. It even can do "tune to a frequency and write samples
to file" part (rx) and some more stuff.

The code is, however, not documented, but really short.

So you may start studying the
code at 
https://github.com/mossmann/hackrf/blob/master/host/hackrf-tools/src/hackrf_transfer.c
watching out for hackrf_* calls (hackrf_init(), hackrf_open() and so
on). It may take a few minutes, but its worth doing this. You will
develop some kind of understanding how things work.

There may be other tools worth studying too, but hackrf_transfer was
the first that came in my mind :)

Regards,
Karsten



On Wed, May 27, 2015 at 01:35:14PM +0000, McDonald, J Douglas wrote:
> I have libhackrf. I use plain ordinary C. I have written hundreds of programs 
> in
> Fortran and C. In 1973-4 I was the largest single user of computer cycles on 
> the
> Planet Earth (literally .... 2.5x65 CPU months on the world's largest 
> computer, the Illiac 4,
> which was less than 1/200 the overall power of the I7 I write this on, 65 
> processors, memory 2 MB). 
> 
> Yet libhackrf has me stumped. 
> 
> Al I need is a SIMPLE example written using it, sending settings out to the 
> HackRF and
> then sending out the packets. For example, simply generating a buffer 
> containing
> a vertical line that oscillates back and forth on a TV screen, or just 
> reading a large
> (gigabyte) file of samples at afixed rate and sending them out.
> 
> I just can't seem to figure out the undocumented stuff. All examples are 
> horrendously 
> overcomplicated.
>  
> Doug McDonald
> 
> 
> _______________________________________________
> HackRF-dev mailing list
> [email protected]
> https://pairlist9.pair.net/mailman/listinfo/hackrf-dev
_______________________________________________
HackRF-dev mailing list
[email protected]
https://pairlist9.pair.net/mailman/listinfo/hackrf-dev

Reply via email to