[Hackrf-dev] Retune time for the hackRF One
Patrick Sathyanathan
wpats at hotmail.com
Wed Apr 27 20:59:03 EDT 2016
Hi Mike,
I have attached the tar/zipped file of my scanner source. It includes a Makefile to build it and a shell script 'run_hackrf' that runs it how I usually do.
To explain the design a bit: There is a SignalSource class of which HackRFSource is a subclass. This class has the rx_callback method invoked by your library. It also has ThreadWorker method running on a separate thread which together with the callback implements a state machine with 3 states: Streaming, DoRetune, Done. The rx_callback queues the received samples if the state is Streaming and then it switches state to DoRetune. The ThreadWorker on state DoRetune does the retune, sets a counter to the number of packets to drop, and changes the state to Streaming. The rx_callback decrements the counter when the state is Streaming until it hits 0 and then enqueues the samples and repeat. It is the discard counter (m_dropPacketCount) that I had to increase from 1 until I hit the value where the spectrum looks OK. The state variable is implemented using std::atomic.
Even if you are not able to build/run it could you please take a look at the initialization, callback, and ThreadWorker methods to see if it is OK.
Thanks much for the help,
--Patrick
> Date: Tue, 26 Apr 2016 19:15:29 -0600
> From: mike at ossmann.com
> To: wpats at hotmail.com
> CC: hackrf-dev at greatscottgadgets.com
> Subject: Re: [Hackrf-dev] Retune time for the hackRF One
>
> On Tue, Apr 26, 2016 at 05:46:01PM -0700, Patrick Sathyanathan wrote:
> >
> > BTW, the ANT500 I received from NooElec does not have the rotating
> > collar I expected from the description.
>
> It can be a bit stiff, especially at first. That is a good thing. It
> means it won't start falling over after you use it for a while.
>
> Try this: Fully collapse the telescopic section. Set the elbow so it is
> at a right angle. Then use one finger near the end of the antenna (so
> you have some leverage) to rotate the antenna clockwise.
>
> Mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist9.pair.net/pipermail/hackrf-dev/attachments/20160427/18fc5038/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: scanner.tar.z
Type: application/x-compressed
Size: 26374 bytes
Desc: not available
URL: <https://pairlist9.pair.net/pipermail/hackrf-dev/attachments/20160427/18fc5038/attachment.bin>
More information about the HackRF-dev
mailing list