The hackrf_transfer utility "-p" option can be used to enable antenna power. You can then record the I/Q stream to a file and then source into GRC.
I was partially successful creating a fifo (mkfifo hackrf.raw) and piping output of hackrf_transfer into a file source in GRC. mkfifo ~/hackrf.raw ./hackrf_transfer -r ~/hackrf.raw -f 1575000000 -p 1 -s 8000000 Then in GRC, use a file source, set output to Byte, non repeat mode. Add UChar to Float, followed by DeInterleave block, Float to Complex, throttle block, then into the FFT widget. This sort of worked for me on a macBook Air, however kept getting timeouts in hackrf_transfer which killed the stream; this laptop is just not powerful enough. $ hackrf_transfer -r ~/hackrf.raw -f 1575000000 -p 1 -l 0 -g 20 -a 0 -s 8000000 call hackrf_sample_rate_set(8000000 Hz/8.000 MHz) call hackrf_baseband_filter_bandwidth_set(7000000 Hz/7.000 MHz) call hackrf_set_freq(1575000000 Hz/1575.000 MHz) call hackrf_set_amp_enable(0) call hackrf_set_antenna_enable(1) Stop with Ctrl-C 0.3 MiB / 1.001 sec = 0.3 MiB/second 0.0 MiB / 1.000 sec = 0.0 MiB/second Couldn't transfer any bytes for one second. Exiting... hackrf_is_streaming() result: HACKRF_TRUE (1) Total time: 2.00025 s hackrf_stop_rx() done hackrf_close() done hackrf_exit() done fclose(fd) done exit For fun, modified the hackrf_transfer.c and increased the timeout to 10s just for a quick test and the stream stayed operational, GRC eventually showed an FFT plot. However I would not trust it as I was probably dropping a ton of samples. If you have a faster machine you may have much better luck than I did. --- Doug On Sep 23, 2014, at 7:53 AM, Mike Jameson wrote: > See this post: > > https://pairlist9.pair.net/pipermail/hackrf-dev/2014-September/000632.html > > Mike > > -- > Mike Jameson M0MIK BSc MIET > Email: [email protected] > Web: http://scanoo.com > > On Tue, Sep 23, 2014 at 3:04 PM, Jerzy Wójcik <[email protected]> wrote: > Hi. I want to receive some GPS signals. I have an active antenna, but I don't > know how to enable antenna power in my Hackrf One in GRC. Do I have to change > some settings in osmocom Source block? > Jerzy > > _______________________________________________ > 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
_______________________________________________ HackRF-dev mailing list [email protected] https://pairlist9.pair.net/mailman/listinfo/hackrf-dev
