[Hackrf-dev] Retune time for the hackRF One

Patrick Sathyanathan wpats at hotmail.com
Wed Apr 27 21:15:28 EDT 2016


Also, if you have gnuplot installed you can redirect the output of run_hackrf to a file and plot it using the attached perl script.

Thanks,

--Patrick

From: wpats at hotmail.com
To: mike at ossmann.com; hackrf-dev at greatscottgadgets.com
Subject: RE: [Hackrf-dev] Retune time for the hackRF One
Date: Wed, 27 Apr 2016 17:59:03 -0700




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/81d9dc86/attachment.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: plotLog.pl
URL: <https://pairlist9.pair.net/pipermail/hackrf-dev/attachments/20160427/81d9dc86/attachment.pl>


More information about the HackRF-dev mailing list