[Hackrf-dev] Re-tuning frequency

Pierre Talbot pirtalbot at gmail.com
Sun Aug 2 22:47:49 EDT 2015


Is there a way to add the re-tuning code inside an OOT C++ files?

I've tried to add in the xyz_impl.cc the code
     #include "libhackrf/hackrf.h"
and later after the constructor the lines
     result = hackrf_init();
     result = hackrf_open(&device);
     hackrf_set_freq(device, 97700000);
and in the xyz_impl.h the code
     #include "libhackrf/hackrf.h"
and in the private section of xyz_impl.h
     static hackrf_device* device;
It compile ok with the make, sudo make install, and sudo ldconfig
but when execute in GNU Radio Companion, I get AttributeError: 'module'
object has no attribute 'xyz'

I suspect that the osmocom Source block has already opened the hackrf so
some line codes are not needed but even if I use the hackrf_set_freq alone,
I still get the same type of error.


>
> Message: 4
> Date: Thu, 16 Jul 2015 00:44:10 +0100
> From: Paul Connolly <eeipcy at gmail.com>
> To: hackrf-dev at greatscottgadgets.com
> Subject: Re: [Hackrf-dev] Re-tuning frequency
> Message-ID: <55A6F04A.9040108 at gmail.com>
> Content-Type: text/plain; charset="windows-1252"
>
> How long it takes to change frequency from X MHz to Y MHz will vary
> depending on the change involved.
>
> The HackRF One has two analog mixers RFFC5071 (85MHz to 4200MHz LO
> [84MHz to 5400MHz]) and the MAX2837 (2300MHz to 2700MHz IF [2150MHz to
> 2750MHz])
> RF switches to switch in or bypass a low pass filter up to 2.3GHz and a
> high pass filter from 2.7GHz up.
> (And RF switches to change from RX to TX)
> (And selectable baseband filters (inside the MAX2837)).
>
> To change frequemncy will require changes in one or more of the above
> parts.
>
> What you are really asking is how long after a change is requested, will
> the change have happen and everything have settled into a steady state,
> before data being output is valid and not in some unknown intermediate
> state, with bad data.
>
> From what I have read, it could be wrong, if it was done in firmware it
> would be between 100 to 200 microseconds. But if it was being changed
> via USB 2.0 on the host the hardware latency of USB protocol, USB
> drivers, non-realtime OS, needs to be taken into account, so 1 to 2
> milliseconds, or one order of magnitude slower.
>
>
> On 15/07/2015 17:10, Pierre Talbot wrote:
> > How much time is needed to change the frequency of the Hackrf as in an
> > application of scanner or frequency hopping? I'm not planning to change
> the
> > firmware to gain speed but to use gnuradio.
> >
> > Is the re-tuning time the same in Rx and Tx?
> >
> > Is the re-tuning time depends on the frequency difference such as +- 10
> Mhz
> > vs +- 100 Mhz
> >
> >
> >
> > _______________________________________________
> > HackRF-dev mailing list
> > HackRF-dev at greatscottgadgets.com
> > https://pairlist9.pair.net/mailman/listinfo/hackrf-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist9.pair.net/pipermail/hackrf-dev/attachments/20150802/416432bd/attachment.html>


More information about the HackRF-dev mailing list