[Hackrf-dev] Using hackrf as CCA noise generator

Ben Greear greearb at candelatech.com
Wed Apr 17 18:02:28 EDT 2019


Hello,

I am guessing that the primary difference between what this tool does and my current
python script is the 'uniform noise' part.

But, I have searched all over and cannot find any description of how I might
set that API from my python script.

I think the pertinent block of my code is:

         ##################################################
         # Blocks
         ##################################################
         self.osmosdr_sink_0 = osmosdr.sink( args="numchan=" + str(1) + " " + "" )
         self.osmosdr_sink_0.set_sample_rate(1e6 * sample_mod)
         self.osmosdr_sink_0.set_center_freq(freq, 0)
         self.osmosdr_sink_0.set_freq_corr(0, 0)
         self.osmosdr_sink_0.set_gain(14, 0)
         self.osmosdr_sink_0.set_if_gain(47, 0)
         self.osmosdr_sink_0.set_bb_gain(20, 0)
         self.osmosdr_sink_0.set_antenna("", 0)
         self.osmosdr_sink_0.set_bandwidth(20e6, 0)

Do you know how I can set the waveform to uniform noise?  And for
that matter, do you know what the default is, since I guess that is
what I am using currently?

Thanks,
Ben


On 4/17/19 6:21 AM, Mike Walters wrote:
> Hi Ben,
> 
> The HackRF should be quite capable of doing that. I recommend using the `osmocom_siggen` command-line tool that comes with gr-osmosdr. Run `osmocom-siggen -s 
> 20M` for full sample-rate, pick your frequency, set to uniform noise, set whatever bandwidth you want, and raise the gains.
> 
> I've just tested it out here, here are a couple of pictures of my setup so you know roughly what to expect: https://imgur.com/a/DcgIZPl
> 
> Cheers,
> Mike
> 
> On Wed, 17 Apr 2019 at 14:04, Ben Greear <greearb at candelatech.com <mailto:greearb at candelatech.com>> wrote:
> 
>     Hello,
> 
>     We are trying to use a hackrf to generate noise to test
>     that our wifi radio properly does CCA and quits transmitting
>     when the on-channel noise is above a certain threshold (about -70dB)
> 
>     In initial testing, however, our radio appears to totally ignore
>     the RF noise from the hackrf.  One reason might be that the hackrf
>     is outputting a very narrow band of noise (about 500Khz), where we might
>     need a full 20Mhz of noise to make CCA work reliably.  Is there
>     a good way to make the hackrf output a wider band of noise?
> 
>     Another thought I had is that maybe pure RF noise is not enough
>     and there has to be some sort of wifi-like modulation to make CCA work?
> 
>     (And of course, our AP implementation could be busted...we will
>     continue to try to tie-break that.)
> 
>     And, does anyone have any experience with doing this type of testing
>     that they can share?
> 
>     Thanks,
>     Ben
> 
>     -- 
>     Ben Greear <greearb at candelatech.com <mailto:greearb at candelatech.com>>
>     Candela Technologies Inc http://www.candelatech.com
> 
>     _______________________________________________
>     HackRF-dev mailing list
>     HackRF-dev at greatscottgadgets.com <mailto:HackRF-dev at greatscottgadgets.com>
>     https://pairlist9.pair.net/mailman/listinfo/hackrf-dev
> 


-- 
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc  http://www.candelatech.com



More information about the HackRF-dev mailing list