如何利用HackRF进行实时广播

小龙 2017-7-14 HACK 0 0

什么是HackRF?

HackRF是一个开源硬件工程,由Mike Ossmann发起且被美国国防部高级研究计划局(DRAPA)赞助。由于这是一个开源项目,某些中国厂商现在也在生产和销售HackRF one,这里先不予讨论。

背部介绍:

HackRF进行实时广播

unbox后:

HackRF进行实时广播

如何理解HackRF?

将HackRF类比为电脑的声卡是理解HackRF最简单的方法,声卡可以将从麦克风等设备输入的原始声音转换为数字信号,然后以文件形式存储在电脑中,最后从数字信号还原成模拟波形,放大后通过扬声器发声。而HackRF也一样,不过后者接收的是无线电信号。

另附HackRF的原理图

HackRF进行实时广播HackRF进行实时广播HackRF进行实时广播

目前较为知名的三款设备分别是USRP, BladeRF和HackRF(点击这里查看所有软件无线电设备),下图为这三款设备的详细参数对比。由图可见,HackRF的频率覆盖范围广,价格也相对便宜,美中不足的是仅为半双工(要不可以做一个雷达),且为USB2.0接口。

HackRF进行实时广播

利用HackRF实现实时广播

系统:Kali linux   //如果你只想在Windows系统下玩转HackRF(我觉得玩不转),点击下载驱动

所需工具:gnuradio,hackrf_transfer

使用HackRF广播时务必注意”-x”参数的大小,并留意当地无线电法规!

现在从最简单的重放广播开始吧,Kali linux中似乎已经预装了hackrf和gnuradio,如果你发现你的机器上没有,那么先安装hackrf及其依赖(固件版本已经有2017.2版本,如需更新固件,可以参考这里

apt-get install hackrf

打开收音机,调到你所在地区的任意广播频道,记下频率,如98.0Mhz。(你也可以用gqrx来操作,不过由于HackRF为半双工的原因,所以本文没有使用gqrx)

接下来需要使用 hackrf_transfer录制和发送。下面是一些参数说明

Usage:
	-h # this help
	[-d serial_number] # Serial number of desired HackRF.
	-r <filename> # Receive data into file (use '-' for stdout).
	-t <filename> # Transmit data from file (use '-' for stdin).
	-w # Receive data into file with WAV header and automatic name.
	   # This is for SDR# compatibility and may not work with other software.
	[-f freq_hz] # Frequency in Hz [0MHz to 7250MHz].
	[-i if_freq_hz] # Intermediate Frequency (IF) in Hz [2150MHz to 2750MHz].
	[-o lo_freq_hz] # Front-end Local Oscillator (LO) frequency in Hz [84MHz to 5400MHz].
	[-m image_reject] # Image rejection filter selection, 0=bypass, 1=low pass, 2=high pass.
	[-a amp_enable] # RX/TX RF amplifier 1=Enable, 0=Disable.
	[-p antenna_enable] # Antenna port power, 1=Enable, 0=Disable.
	[-l gain_db] # RX LNA (IF) gain, 0-40dB, 8dB steps
	[-g gain_db] # RX VGA (baseband) gain, 0-62dB, 2dB steps
	[-x gain_db] # TX VGA (IF) gain, 0-47dB, 1dB steps
	[-s sample_rate_hz] # Sample rate in Hz (4/8/10/12.5/16/20MHz, default 10MHz).
	[-n num_samples] # Number of samples to transfer (default is unlimited).
	[-S buf_size] # Enable receive streaming with buffer size buf_size.
	[-c amplitude] # CW signal source mode, amplitude 0-127 (DC value to DAC).
	[-R] # Repeat TX mode (default is off) 
	[-b baseband_filter_bw_hz] # Set baseband filter bandwidth in Hz.
	Possible values: 1.75/2.5/3.5/5/5.5/6/7/8/9/10/12/14/15/20/24/28MHz, default <= 0.75 * sample_rate_hz.
	[-C ppm] # Set Internal crystal clock error in ppm.
	[-H hw_sync_enable] # Synchronise USB transfer using GPIO pins.

开始录制:

hackrf_transfer -r 1.raw -f 98000000 -g 30 -l 24 -a 1 -p 1 -s 8000000 -b 4000000

ctrl+c停止录制之后/root中会有一个1.raw文件,这时使用hackrf_transfer进行发射:

hackrf_transfer -t 1.raw -f 98000000 -x 32 -a 1 -p 1 -s 8000000 -b 4000000 -R

这时收音机里会重复播放你刚刚录制的那一段声音。

拓展:小区的升降门,汽车的远程开门甚至是GPS信号等等都在HackRF的频率覆盖范围内,重放?各位亲们自己体会。

进阶:使用gnuradio播放自己的音乐

创建一个grc文件,将以下代码粘贴进去

<?xml version='1.0' encoding='utf-8'?>
<?grc format='1' created='3.7.10'?>
<flow_graph>
  <timestamp>Tue May  6 16:27:36 2014</timestamp>
  <block>
    <key>options</key>
    <param>
      <key>author</key>
      <value></value>
    </param>
    <param>
      <key>window_size</key>
      <value>1280, 1024</value>
    </param>
    <param>
      <key>category</key>
      <value>Custom</value>
    </param>
    <param>
      <key>comment</key>
      <value></value>
    </param>
    <param>
      <key>description</key>
      <value></value>
    </param>
    <param>
      <key>_enabled</key>
      <value>True</value>
    </param>
    <param>
      <key>_coordinate</key>
      <value>(186, 53)</value>
    </param>
    <param>
      <key>_rotation</key>
      <value>0</value>
    </param>
    <param>
      <key>generate_options</key>
      <value>wx_gui</value>
    </param>
    <param>
      <key>hier_block_src_path</key>
      <value>.:</value>
    </param>
    <param>
      <key>id</key>
      <value>wbfm_tx_hackrf</value>
    </param>
    <param>
      <key>max_nouts</key>
      <value>0</value>
    </param>
    <param>
      <key>qt_qss_theme</key>
      <value></value>
    </param>
    <param>
      <key>realtime_scheduling</key>
      <value></value>
    </param>
    <param>
      <key>run_command</key>
      <value>{python} -u {filename}</value>
    </param>
    <param>
      <key>run_options</key>
      <value>prompt</value>
    </param>
    <param>
      <key>run</key>
      <value>True</value>
    </param>
    <param>
      <key>thread_safe_setters</key>
      <value></value>
    </param>
    <param>
      <key>title</key>
      <value></value>
    </param>
  </block>
  <block>
    <key>analog_wfm_tx</key>
    <param>
      <key>audio_rate</key>
      <value>32000</value>
    </param>
    <param>
      <key>alias</key>
      <value></value>
    </param>
    <param>
      <key>comment</key>
      <value></value>
    </param>
    <param>
      <key>affinity</key>
      <value></value>
    </param>
    <param>
      <key>_enabled</key>
      <value>True</value>
    </param>
    <param>
      <key>_coordinate</key>
      <value>(281, 374)</value>
    </param>
    <param>
      <key>_rotation</key>
      <value>0</value>
    </param>
    <param>
      <key>id</key>
      <value>analog_wfm_tx_0</value>
    </param>
    <param>
      <key>max_dev</key>
      <value>75e3</value>
    </param>
    <param>
      <key>maxoutbuf</key>
      <value>0</value>
    </param>
    <param>
      <key>minoutbuf</key>
      <value>0</value>
    </param>
    <param>
      <key>fh</key>
      <value>5</value>
    </param>
    <param>
      <key>quad_rate</key>
      <value>320000</value>
    </param>
    <param>
      <key>tau</key>
      <value>300e-6</value>
    </param>
  </block>
  <block>
    <key>blocks_stream_mux</key>
    <param>
      <key>alias</key>
      <value></value>
    </param>
    <param>
      <key>comment</key>
      <value></value>
    </param>
    <param>
      <key>affinity</key>
      <value></value>
    </param>
    <param>
      <key>_enabled</key>
      <value>True</value>
    </param>
    <param>
      <key>_coordinate</key>
      <value>(423, 184)</value>
    </param>
    <param>
      <key>_rotation</key>
      <value>0</value>
    </param>
    <param>
      <key>id</key>
      <value>blocks_stream_mux_0</value>
    </param>
    <param>
      <key>lengths</key>
      <value>1, 1</value>
    </param>
    <param>
      <key>maxoutbuf</key>
      <value>0</value>
    </param>
    <param>
      <key>minoutbuf</key>
      <value>0</value>
    </param>
    <param>
      <key>num_inputs</key>
      <value>2</value>
    </param>
    <param>
      <key>type</key>
      <value>float</value>
    </param>
    <param>
      <key>vlen</key>
      <value>1</value>
    </param>
  </block>
  <block>
    <key>blocks_wavfile_source</key>
    <param>
      <key>alias</key>
      <value></value>
    </param>
    <param>
      <key>comment</key>
      <value></value>
    </param>
    <param>
      <key>affinity</key>
      <value></value>
    </param>
    <param>
      <key>_enabled</key>
      <value>True</value>
    </param>
    <param>
      <key>file</key>
      <value>/root/WBFM/1.wav</value>
    </param>
    <param>
      <key>_coordinate</key>
      <value>(211, 184)</value>
    </param>
    <param>
      <key>_rotation</key>
      <value>0</value>
    </param>
    <param>
      <key>id</key>
      <value>blocks_wavfile_source_0</value>
    </param>
    <param>
      <key>maxoutbuf</key>
      <value>0</value>
    </param>
    <param>
      <key>minoutbuf</key>
      <value>0</value>
    </param>
    <param>
      <key>nchan</key>
      <value>2</value>
    </param>
    <param>
      <key>repeat</key>
      <value>True</value>
    </param>
  </block>
  <block>
    <key>fractional_interpolator_xx</key>
    <param>
      <key>alias</key>
      <value></value>
    </param>
    <param>
      <key>comment</key>
      <value></value>
    </param>
    <param>
      <key>affinity</key>
      <value></value>
    </param>
    <param>
      <key>_enabled</key>
      <value>True</value>
    </param>
    <param>
      <key>_coordinate</key>
      <value>(662, 189)</value>
    </param>
    <param>
      <key>_rotation</key>
      <value>0</value>
    </param>
    <param>
      <key>id</key>
      <value>fractional_interpolator_xx_0</value>
    </param>
    <param>
      <key>interp_ratio</key>
      <value>875e-3</value>
    </param>
    <param>
      <key>maxoutbuf</key>
      <value>0</value>
    </param>
    <param>
      <key>minoutbuf</key>
      <value>0</value>
    </param>
    <param>
      <key>phase_shift</key>
      <value>1</value>
    </param>
    <param>
      <key>type</key>
      <value>float</value>
    </param>
  </block>
  <block>
    <key>parameter</key>
    <param>
      <key>alias</key>
      <value></value>
    </param>
    <param>
      <key>comment</key>
      <value></value>
    </param>
    <param>
      <key>_enabled</key>
      <value>True</value>
    </param>
    <param>
      <key>_coordinate</key>
      <value>(659, 49)</value>
    </param>
    <param>
      <key>_rotation</key>
      <value>0</value>
    </param>
    <param>
      <key>id</key>
      <value>freq</value>
    </param>
    <param>
      <key>label</key>
      <value></value>
    </param>
    <param>
      <key>short_id</key>
      <value>f</value>
    </param>
    <param>
      <key>type</key>
      <value>eng_float</value>
    </param>
    <param>
      <key>value</key>
      <value>98e6</value>
    </param>
  </block>
  <block>
    <key>parameter</key>
    <param>
      <key>alias</key>
      <value></value>
    </param>
    <param>
      <key>comment</key>
      <value></value>
    </param>
    <param>
      <key>_enabled</key>
      <value>True</value>
    </param>
    <param>
      <key>_coordinate</key>
      <value>(466, 54)</value>
    </param>
    <param>
      <key>_rotation</key>
      <value>0</value>
    </param>
    <param>
      <key>id</key>
      <value>inputfile</value>
    </param>
    <param>
      <key>label</key>
      <value></value>
    </param>
    <param>
      <key>short_id</key>
      <value>i</value>
    </param>
    <param>
      <key>type</key>
      <value>string</value>
    </param>
    <param>
      <key>value</key>
      <value>jen_ai_marre.wav</value>
    </param>
  </block>
  <block>
    <key>osmosdr_sink</key>
    <param>
      <key>alias</key>
      <value></value>
    </param>
    <param>
      <key>ant0</key>
      <value></value>
    </param>
    <param>
      <key>bb_gain0</key>
      <value>20</value>
    </param>
    <param>
      <key>bw0</key>
      <value>250e3</value>
    </param>
    <param>
      <key>corr0</key>
      <value>0</value>
    </param>
    <param>
      <key>freq0</key>
      <value>freq</value>
    </param>
    <param>
      <key>if_gain0</key>
      <value>40</value>
    </param>
    <param>
      <key>gain0</key>
      <value>14</value>
    </param>
    <param>
      <key>ant10</key>
      <value></value>
    </param>
    <param>
      <key>bb_gain10</key>
      <value>20</value>
    </param>
    <param>
      <key>bw10</key>
      <value>0</value>
    </param>
    <param>
      <key>corr10</key>
      <value>0</value>
    </param>
    <param>
      <key>freq10</key>
      <value>100e6</value>
    </param>
    <param>
      <key>if_gain10</key>
      <value>20</value>
    </param>
    <param>
      <key>gain10</key>
      <value>10</value>
    </param>
    <param>
      <key>ant11</key>
      <value></value>
    </param>
    <param>
      <key>bb_gain11</key>
      <value>20</value>
    </param>
    <param>
      <key>bw11</key>
      <value>0</value>
    </param>
    <param>
      <key>corr11</key>
      <value>0</value>
    </param>
    <param>
      <key>freq11</key>
      <value>100e6</value>
    </param>
    <param>
      <key>if_gain11</key>
      <value>20</value>
    </param>
    <param>
      <key>gain11</key>
      <value>10</value>
    </param>
    <param>
      <key>ant12</key>
      <value></value>
    </param>
    <param>
      <key>bb_gain12</key>
      <value>20</value>
    </param>
    <param>
      <key>bw12</key>
      <value>0</value>
    </param>
    <param>
      <key>corr12</key>
      <value>0</value>
    </param>
    <param>
      <key>freq12</key>
      <value>100e6</value>
    </param>
    <param>
      <key>if_gain12</key>
      <value>20</value>
    </param>
    <param>
      <key>gain12</key>
      <value>10</value>
    </param>
    <param>
      <key>ant13</key>
      <value></value>
    </param>
    <param>
      <key>bb_gain13</key>
      <value>20</value>
    </param>
    <param>
      <key>bw13</key>
      <value>0</value>
    </param>
    <param>
      <key>corr13</key>
      <value>0</value>
    </param>
    <param>
      <key>freq13</key>
      <value>100e6</value>
    </param>
    <param>
      <key>if_gain13</key>
      <value>20</value>
    </param>
    <param>
      <key>gain13</key>
      <value>10</value>
    </param>
    <param>
      <key>ant14</key>
      <value></value>
    </param>
    <param>
      <key>bb_gain14</key>
      <value>20</value>
    </param>
    <param>
      <key>bw14</key>
      <value>0</value>
    </param>
    <param>
      <key>corr14</key>
      <value>0</value>
    </param>
    <param>
      <key>freq14</key>
      <value>100e6</value>
    </param>
    <param>
      <key>if_gain14</key>
      <value>20</value>
    </param>
    <param>
      <key>gain14</key>
      <value>10</value>
    </param>
    <param>
      <key>ant15</key>
      <value></value>
    </param>
    <param>
      <key>bb_gain15</key>
      <value>20</value>
    </param>
    <param>
      <key>bw15</key>
      <value>0</value>
    </param>
    <param>
      <key>corr15</key>
      <value>0</value>
    </param>
    <param>
      <key>freq15</key>
      <value>100e6</value>
    </param>
    <param>
      <key>if_gain15</key>
      <value>20</value>
    </param>
    <param>
      <key>gain15</key>
      <value>10</value>
    </param>
    <param>
      <key>ant16</key>
      <value></value>
    </param>
    <param>
      <key>bb_gain16</key>
      <value>20</value>
    </param>
    <param>
      <key>bw16</key>
      <value>0</value>
    </param>
    <param>
      <key>corr16</key>
      <value>0</value>
    </param>
    <param>
      <key>freq16</key>
      <value>100e6</value>
    </param>
    <param>
      <key>if_gain16</key>
      <value>20</value>
    </param>
    <param>
      <key>gain16</key>
      <value>10</value>
    </param>
    <param>
      <key>ant17</key>
      <value></value>
    </param>
    <param>
      <key>bb_gain17</key>
      <value>20</value>
    </param>
    <param>
      <key>bw17</key>
      <value>0</value>
    </param>
    <param>
      <key>corr17</key>
      <value>0</value>
    </param>
    <param>
      <key>freq17</key>
      <value>100e6</value>
    </param>
    <param>
      <key>if_gain17</key>
      <value>20</value>
    </param>
    <param>
      <key>gain17</key>
      <value>10</value>
    </param>
    <param>
      <key>ant18</key>
      <value></value>
    </param>
    <param>
      <key>bb_gain18</key>
      <value>20</value>
    </param>
    <param>
      <key>bw18</key>
      <value>0</value>
    </param>
    <param>
      <key>corr18</key>
      <value>0</value>
    </param>
    <param>
      <key>freq18</key>
      <value>100e6</value>
    </param>
    <param>
      <key>if_gain18</key>
      <value>20</value>
    </param>
    <param>
      <key>gain18</key>
      <value>10</value>
    </param>
    <param>
      <key>ant19</key>
      <value></value>
    </param>
    <param>
      <key>bb_gain19</key>
      <value>20</value>
    </param>
    <param>
      <key>bw19</key>
      <value>0</value>
    </param>
    <param>
      <key>corr19</key>
      <value>0</value>
    </param>
    <param>
      <key>freq19</key>
      <value>100e6</value>
    </param>
    <param>
      <key>if_gain19</key>
      <value>20</value>
    </param>
    <param>
      <key>gain19</key>
      <value>10</value>
    </param>
    <param>
      <key>ant1</key>
      <value></value>
    </param>
    <param>
      <key>bb_gain1</key>
      <value>20</value>
    </param>
    <param>
      <key>bw1</key>
      <value>0</value>
    </param>
    <param>
      <key>corr1</key>
      <value>0</value>
    </param>
    <param>
      <key>freq1</key>
      <value>100e6</value>
    </param>
    <param>
      <key>if_gain1</key>
      <value>20</value>
    </param>
    <param>
      <key>gain1</key>
      <value>10</value>
    </param>
    <param>
      <key>ant20</key>
      <value></value>
    </param>
    <param>
      <key>bb_gain20</key>
      <value>20</value>
    </param>
    <param>
      <key>bw20</key>
      <value>0</value>
    </param>
    <param>
      <key>corr20</key>
      <value>0</value>
    </param>
    <param>
      <key>freq20</key>
      <value>100e6</value>
    </param>
    <param>
      <key>if_gain20</key>
      <value>20</value>
    </param>
    <param>
      <key>gain20</key>
      <value>10</value>
    </param>
    <param>
      <key>ant21</key>
      <value></value>
    </param>
    <param>
      <key>bb_gain21</key>
      <value>20</value>
    </param>
    <param>
      <key>bw21</key>
      <value>0</value>
    </param>
    <param>
      <key>corr21</key>
      <value>0</value>
    </param>
    <param>
      <key>freq21</key>
      <value>100e6</value>
    </param>
    <param>
      <key>if_gain21</key>
      <value>20</value>
    </param>
    <param>
      <key>gain21</key>
      <value>10</value>
    </param>
    <param>
      <key>ant22</key>
      <value></value>
    </param>
    <param>
      <key>bb_gain22</key>
      <value>20</value>
    </param>
    <param>
      <key>bw22</key>
      <value>0</value>
    </param>
    <param>
      <key>corr22</key>
      <value>0</value>
    </param>
    <param>
      <key>freq22</key>
      <value>100e6</value>
    </param>
    <param>
      <key>if_gain22</key>
      <value>20</value>
    </param>
    <param>
      <key>gain22</key>
      <value>10</value>
    </param>
    <param>
      <key>ant23</key>
      <value></value>
    </param>
    <param>
      <key>bb_gain23</key>
      <value>20</value>
    </param>
    <param>
      <key>bw23</key>
      <value>0</value>
    </param>
    <param>
      <key>corr23</key>
      <value>0</value>
    </param>
    <param>
      <key>freq23</key>
      <value>100e6</value>
    </param>
    <param>
      <key>if_gain23</key>
      <value>20</value>
    </param>
    <param>
      <key>gain23</key>
      <value>10</value>
    </param>
    <param>
      <key>ant24</key>
      <value></value>
    </param>
    <param>
      <key>bb_gain24</key>
      <value>20</value>
    </param>
    <param>
      <key>bw24</key>
      <value>0</value>
    </param>
    <param>
      <key>corr24</key>
      <value>0</value>
    </param>
    <param>
      <key>freq24</key>
      <value>100e6</value>
    </param>
    <param>
      <key>if_gain24</key>
      <value>20</value>
    </param>
    <param>
      <key>gain24</key>
      <value>10</value>
    </param>
    <param>
      <key>ant25</key>
      <value></value>
    </param>
    <param>
      <key>bb_gain25</key>
      <value>20</value>
    </param>
    <param>
      <key>bw25</key>
      <value>0</value>
    </param>
    <param>
      <key>corr25</key>
      <value>0</value>
    </param>
    <param>
      <key>freq25</key>
      <value>100e6</value>
    </param>
    <param>
      <key>if_gain25</key>
      <value>20</value>
    </param>
    <param>
      <key>gain25</key>
      <value>10</value>
    </param>
    <param>
      <key>ant26</key>
      <value></value>
    </param>
    <param>
      <key>bb_gain26</key>
      <value>20</value>
    </param>
    <param>
      <key>bw26</key>
      <value>0</value>
    </param>
    <param>
      <key>corr26</key>
      <value>0</value>
    </param>
    <param>
      <key>freq26</key>
      <value>100e6</value>
    </param>
    <param>
      <key>if_gain26</key>
      <value>20</value>
    </param>
    <param>
      <key>gain26</key>
      <value>10</value>
    </param>
    <param>
      <key>ant27</key>
      <value></value>
    </param>
    <param>
      <key>bb_gain27</key>
      <value>20</value>
    </param>
    <param>
      <key>bw27</key>
      <value>0</value>
    </param>
    <param>
      <key>corr27</key>
      <value>0</value>
    </param>
    <param>
      <key>freq27</key>
      <value>100e6</value>
    </param>
    <param>
      <key>if_gain27</key>
      <value>20</value>
    </param>
    <param>
      <key>gain27</key>
      <value>10</value>
    </param>
    <param>
      <key>ant28</key>
      <value></value>
    </param>
    <param>
      <key>bb_gain28</key>
      <value>20</value>
    </param>
    <param>
      <key>bw28</key>
      <value>0</value>
    </param>
    <param>
      <key>corr28</key>
      <value>0</value>
    </param>
    <param>
      <key>freq28</key>
      <value>100e6</value>
    </param>
    <param>
      <key>if_gain28</key>
      <value>20</value>
    </param>
    <param>
      <key>gain28</key>
      <value>10</value>
    </param>
    <param>
      <key>ant29</key>
      <value></value>
    </param>
    <param>
      <key>bb_gain29</key>
      <value>20</value>
    </param>
    <param>
      <key>bw29</key>
      <value>0</value>
    </param>
    <param>
      <key>corr29</key>
      <value>0</value>
    </param>
    <param>
      <key>freq29</key>
      <value>100e6</value>
    </param>
    <param>
      <key>if_gain29</key>
      <value>20</value>
    </param>
    <param>
      <key>gain29</key>
      <value>10</value>
    </param>
    <param>
      <key>ant2</key>
      <value></value>
    </param>
    <param>
      <key>bb_gain2</key>
      <value>20</value>
    </param>
    <param>
      <key>bw2</key>
      <value>0</value>
    </param>
    <param>
      <key>corr2</key>
      <value>0</value>
    </param>
    <param>
      <key>freq2</key>
      <value>100e6</value>
    </param>
    <param>
      <key>if_gain2</key>
      <value>20</value>
    </param>
    <param>
      <key>gain2</key>
      <value>10</value>
    </param>
    <param>
      <key>ant30</key>
      <value></value>
    </param>
    <param>
      <key>bb_gain30</key>
      <value>20</value>
    </param>
    <param>
      <key>bw30</key>
      <value>0</value>
    </param>
    <param>
      <key>corr30</key>
      <value>0</value>
    </param>
    <param>
      <key>freq30</key>
      <value>100e6</value>
    </param>
    <param>
      <key>if_gain30</key>
      <value>20</value>
    </param>
    <param>
      <key>gain30</key>
      <value>10</value>
    </param>
    <param>
      <key>ant31</key>
      <value></value>
    </param>
    <param>
      <key>bb_gain31</key>
      <value>20</value>
    </param>
    <param>
      <key>bw31</key>
      <value>0</value>
    </param>
    <param>
      <key>corr31</key>
      <value>0</value>
    </param>
    <param>
      <key>freq31</key>
      <value>100e6</value>
    </param>
    <param>
      <key>if_gain31</key>
      <value>20</value>
    </param>
    <param>
      <key>gain31</key>
      <value>10</value>
    </param>
    <param>
      <key>ant3</key>
      <value></value>
    </param>
    <param>
      <key>bb_gain3</key>
      <value>20</value>
    </param>
    <param>
      <key>bw3</key>
      <value>0</value>
    </param>
    <param>
      <key>corr3</key>
      <value>0</value>
    </param>
    <param>
      <key>freq3</key>
      <value>100e6</value>
    </param>
    <param>
      <key>if_gain3</key>
      <value>20</value>
    </param>
    <param>
      <key>gain3</key>
      <value>10</value>
    </param>
    <param>
      <key>ant4</key>
      <value></value>
    </param>
    <param>
      <key>bb_gain4</key>
      <value>20</value>
    </param>
    <param>
      <key>bw4</key>
      <value>0</value>
    </param>
    <param>
      <key>corr4</key>
      <value>0</value>
    </param>
    <param>
      <key>freq4</key>
      <value>100e6</value>
    </param>
    <param>
      <key>if_gain4</key>
      <value>20</value>
    </param>
    <param>
      <key>gain4</key>
      <value>10</value>
    </param>
    <param>
      <key>ant5</key>
      <value></value>
    </param>
    <param>
      <key>bb_gain5</key>
      <value>20</value>
    </param>
    <param>
      <key>bw5</key>
      <value>0</value>
    </param>
    <param>
      <key>corr5</key>
      <value>0</value>
    </param>
    <param>
      <key>freq5</key>
      <value>100e6</value>
    </param>
    <param>
      <key>if_gain5</key>
      <value>20</value>
    </param>
    <param>
      <key>gain5</key>
      <value>10</value>
    </param>
    <param>
      <key>ant6</key>
      <value></value>
    </param>
    <param>
      <key>bb_gain6</key>
      <value>20</value>
    </param>
    <param>
      <key>bw6</key>
      <value>0</value>
    </param>
    <param>
      <key>corr6</key>
      <value>0</value>
    </param>
    <param>
      <key>freq6</key>
      <value>100e6</value>
    </param>
    <param>
      <key>if_gain6</key>
      <value>20</value>
    </param>
    <param>
      <key>gain6</key>
      <value>10</value>
    </param>
    <param>
      <key>ant7</key>
      <value></value>
    </param>
    <param>
      <key>bb_gain7</key>
      <value>20</value>
    </param>
    <param>
      <key>bw7</key>
      <value>0</value>
    </param>
    <param>
      <key>corr7</key>
      <value>0</value>
    </param>
    <param>
      <key>freq7</key>
      <value>100e6</value>
    </param>
    <param>
      <key>if_gain7</key>
      <value>20</value>
    </param>
    <param>
      <key>gain7</key>
      <value>10</value>
    </param>
    <param>
      <key>ant8</key>
      <value></value>
    </param>
    <param>
      <key>bb_gain8</key>
      <value>20</value>
    </param>
    <param>
      <key>bw8</key>
      <value>0</value>
    </param>
    <param>
      <key>corr8</key>
      <value>0</value>
    </param>
    <param>
      <key>freq8</key>
      <value>100e6</value>
    </param>
    <param>
      <key>if_gain8</key>
      <value>20</value>
    </param>
    <param>
      <key>gain8</key>
      <value>10</value>
    </param>
    <param>
      <key>ant9</key>
      <value></value>
    </param>
    <param>
      <key>bb_gain9</key>
      <value>20</value>
    </param>
    <param>
      <key>bw9</key>
      <value>0</value>
    </param>
    <param>
      <key>corr9</key>
      <value>0</value>
    </param>
    <param>
      <key>freq9</key>
      <value>100e6</value>
    </param>
    <param>
      <key>if_gain9</key>
      <value>20</value>
    </param>
    <param>
      <key>gain9</key>
      <value>10</value>
    </param>
    <param>
      <key>comment</key>
      <value></value>
    </param>
    <param>
      <key>affinity</key>
      <value></value>
    </param>
    <param>
      <key>args</key>
      <value></value>
    </param>
    <param>
      <key>_enabled</key>
      <value>True</value>
    </param>
    <param>
      <key>_coordinate</key>
      <value>(743, 350)</value>
    </param>
    <param>
      <key>_rotation</key>
      <value>0</value>
    </param>
    <param>
      <key>id</key>
      <value>osmosdr_sink_0</value>
    </param>
    <param>
      <key>type</key>
      <value>fc32</value>
    </param>
    <param>
      <key>clock_source0</key>
      <value></value>
    </param>
    <param>
      <key>time_source0</key>
      <value></value>
    </param>
    <param>
      <key>clock_source1</key>
      <value></value>
    </param>
    <param>
      <key>time_source1</key>
      <value></value>
    </param>
    <param>
      <key>clock_source2</key>
      <value></value>
    </param>
    <param>
      <key>time_source2</key>
      <value></value>
    </param>
    <param>
      <key>clock_source3</key>
      <value></value>
    </param>
    <param>
      <key>time_source3</key>
      <value></value>
    </param>
    <param>
      <key>clock_source4</key>
      <value></value>
    </param>
    <param>
      <key>time_source4</key>
      <value></value>
    </param>
    <param>
      <key>clock_source5</key>
      <value></value>
    </param>
    <param>
      <key>time_source5</key>
      <value></value>
    </param>
    <param>
      <key>clock_source6</key>
      <value></value>
    </param>
    <param>
      <key>time_source6</key>
      <value></value>
    </param>
    <param>
      <key>clock_source7</key>
      <value></value>
    </param>
    <param>
      <key>time_source7</key>
      <value></value>
    </param>
    <param>
      <key>nchan</key>
      <value>1</value>
    </param>
    <param>
      <key>num_mboards</key>
      <value>1</value>
    </param>
    <param>
      <key>sample_rate</key>
      <value>8e6</value>
    </param>
    <param>
      <key>sync</key>
      <value></value>
    </param>
  </block>
  <block>
    <key>parameter</key>
    <param>
      <key>alias</key>
      <value></value>
    </param>
    <param>
      <key>comment</key>
      <value></value>
    </param>
    <param>
      <key>_enabled</key>
      <value>True</value>
    </param>
    <param>
      <key>_coordinate</key>
      <value>(772, 45)</value>
    </param>
    <param>
      <key>_rotation</key>
      <value>0</value>
    </param>
    <param>
      <key>id</key>
      <value>ppm</value>
    </param>
    <param>
      <key>label</key>
      <value>ppm</value>
    </param>
    <param>
      <key>short_id</key>
      <value>p</value>
    </param>
    <param>
      <key>type</key>
      <value>eng_float</value>
    </param>
    <param>
      <key>value</key>
      <value>0</value>
    </param>
  </block>
  <block>
    <key>rational_resampler_xxx</key>
    <param>
      <key>alias</key>
      <value></value>
    </param>
    <param>
      <key>comment</key>
      <value></value>
    </param>
    <param>
      <key>affinity</key>
      <value></value>
    </param>
    <param>
      <key>decim</key>
      <value>1</value>
    </param>
    <param>
      <key>_enabled</key>
      <value>True</value>
    </param>
    <param>
      <key>fbw</key>
      <value>0</value>
    </param>
    <param>
      <key>_coordinate</key>
      <value>(532, 374)</value>
    </param>
    <param>
      <key>_rotation</key>
      <value>0</value>
    </param>
    <param>
      <key>id</key>
      <value>rational_resampler_xxx_0</value>
    </param>
    <param>
      <key>interp</key>
      <value>8</value>
    </param>
    <param>
      <key>maxoutbuf</key>
      <value>0</value>
    </param>
    <param>
      <key>minoutbuf</key>
      <value>0</value>
    </param>
    <param>
      <key>taps</key>
      <value></value>
    </param>
    <param>
      <key>type</key>
      <value>ccc</value>
    </param>
  </block>
  <connection>
    <source_block_id>analog_wfm_tx_0</source_block_id>
    <sink_block_id>rational_resampler_xxx_0</sink_block_id>
    <source_key>0</source_key>
    <sink_key>0</sink_key>
  </connection>
  <connection>
    <source_block_id>blocks_stream_mux_0</source_block_id>
    <sink_block_id>fractional_interpolator_xx_0</sink_block_id>
    <source_key>0</source_key>
    <sink_key>0</sink_key>
  </connection>
  <connection>
    <source_block_id>blocks_wavfile_source_0</source_block_id>
    <sink_block_id>blocks_stream_mux_0</sink_block_id>
    <source_key>0</source_key>
    <sink_key>0</sink_key>
  </connection>
  <connection>
    <source_block_id>blocks_wavfile_source_0</source_block_id>
    <sink_block_id>blocks_stream_mux_0</sink_block_id>
    <source_key>1</source_key>
    <sink_key>1</sink_key>
  </connection>
  <connection>
    <source_block_id>fractional_interpolator_xx_0</source_block_id>
    <sink_block_id>analog_wfm_tx_0</sink_block_id>
    <source_key>0</source_key>
    <sink_key>0</sink_key>
  </connection>
  <connection>
    <source_block_id>rational_resampler_xxx_0</source_block_id>
    <sink_block_id>osmosdr_sink_0</sink_block_id>
    <source_key>0</source_key>
    <sink_key>0</sink_key>
  </connection>
</flow_graph>

在gnuradio里打开这个grc文件,配置成下图所示

Kali Linux-2017-07-09-15-24-42.png

在Wav File Source里选择自己的音乐(注:应该为wav格式且采样率为44100 Hz),点击execute即可开始广播。

进阶er:利用麦克风输入的声音作为声音源进行实时广播

grc文件:

<?xml version='1.0' encoding='utf-8'?>
<?grc format='1' created='3.7.10'?>
<flow_graph>
  <timestamp>Tue May  6 16:26:04 2014</timestamp>
  <block>
    <key>options</key>
    <param>
      <key>author</key>
      <value></value>
    </param>
    <param>
      <key>window_size</key>
      <value>1280, 1024</value>
    </param>
    <param>
      <key>category</key>
      <value>Custom</value>
    </param>
    <param>
      <key>comment</key>
      <value></value>
    </param>
    <param>
      <key>description</key>
      <value></value>
    </param>
    <param>
      <key>_enabled</key>
      <value>True</value>
    </param>
    <param>
      <key>_coordinate</key>
      <value>(438, 90)</value>
    </param>
    <param>
      <key>_rotation</key>
      <value>0</value>
    </param>
    <param>
      <key>generate_options</key>
      <value>wx_gui</value>
    </param>
    <param>
      <key>hier_block_src_path</key>
      <value>.:</value>
    </param>
    <param>
      <key>id</key>
      <value>audio_wbfm_tx_hackrf</value>
    </param>
    <param>
      <key>max_nouts</key>
      <value>0</value>
    </param>
    <param>
      <key>qt_qss_theme</key>
      <value></value>
    </param>
    <param>
      <key>realtime_scheduling</key>
      <value>1</value>
    </param>
    <param>
      <key>run_command</key>
      <value>{python} -u {filename}</value>
    </param>
    <param>
      <key>run_options</key>
      <value>prompt</value>
    </param>
    <param>
      <key>run</key>
      <value>True</value>
    </param>
    <param>
      <key>thread_safe_setters</key>
      <value></value>
    </param>
    <param>
      <key>title</key>
      <value></value>
    </param>
  </block>
  <block>
    <key>analog_wfm_tx</key>
    <param>
      <key>audio_rate</key>
      <value>16000</value>
    </param>
    <param>
      <key>alias</key>
      <value></value>
    </param>
    <param>
      <key>comment</key>
      <value></value>
    </param>
    <param>
      <key>affinity</key>
      <value></value>
    </param>
    <param>
      <key>_enabled</key>
      <value>True</value>
    </param>
    <param>
      <key>_coordinate</key>
      <value>(280, 374)</value>
    </param>
    <param>
      <key>_rotation</key>
      <value>0</value>
    </param>
    <param>
      <key>id</key>
      <value>analog_wfm_tx_0</value>
    </param>
    <param>
      <key>max_dev</key>
      <value>75e3</value>
    </param>
    <param>
      <key>maxoutbuf</key>
      <value>0</value>
    </param>
    <param>
      <key>minoutbuf</key>
      <value>0</value>
    </param>
    <param>
      <key>fh</key>
      <value>5</value>
    </param>
    <param>
      <key>quad_rate</key>
      <value>160000</value>
    </param>
    <param>
      <key>tau</key>
      <value>300e-6</value>
    </param>
  </block>
  <block>
    <key>audio_source</key>
    <param>
      <key>alias</key>
      <value></value>
    </param>
    <param>
      <key>comment</key>
      <value></value>
    </param>
    <param>
      <key>affinity</key>
      <value></value>
    </param>
    <param>
      <key>device_name</key>
      <value></value>
    </param>
    <param>
      <key>_enabled</key>
      <value>True</value>
    </param>
    <param>
      <key>_coordinate</key>
      <value>(344, 190)</value>
    </param>
    <param>
      <key>_rotation</key>
      <value>0</value>
    </param>
    <param>
      <key>id</key>
      <value>audio_source_0</value>
    </param>
    <param>
      <key>maxoutbuf</key>
      <value>0</value>
    </param>
    <param>
      <key>minoutbuf</key>
      <value>0</value>
    </param>
    <param>
      <key>num_outputs</key>
      <value>1</value>
    </param>
    <param>
      <key>ok_to_block</key>
      <value>True</value>
    </param>
    <param>
      <key>samp_rate</key>
      <value>88200</value>
    </param>
  </block>
  <block>
    <key>fractional_interpolator_xx</key>
    <param>
      <key>alias</key>
      <value></value>
    </param>
    <param>
      <key>comment</key>
      <value></value>
    </param>
    <param>
      <key>affinity</key>
      <value></value>
    </param>
    <param>
      <key>_enabled</key>
      <value>True</value>
    </param>
    <param>
      <key>_coordinate</key>
      <value>(663, 182)</value>
    </param>
    <param>
      <key>_rotation</key>
      <value>0</value>
    </param>
    <param>
      <key>id</key>
      <value>fractional_interpolator_xx_0</value>
    </param>
    <param>
      <key>interp_ratio</key>
      <value>875e-3</value>
    </param>
    <param>
      <key>maxoutbuf</key>
      <value>0</value>
    </param>
    <param>
      <key>minoutbuf</key>
      <value>0</value>
    </param>
    <param>
      <key>phase_shift</key>
      <value>1</value>
    </param>
    <param>
      <key>type</key>
      <value>float</value>
    </param>
  </block>
  <block>
    <key>parameter</key>
    <param>
      <key>alias</key>
      <value></value>
    </param>
    <param>
      <key>comment</key>
      <value></value>
    </param>
    <param>
      <key>_enabled</key>
      <value>True</value>
    </param>
    <param>
      <key>_coordinate</key>
      <value>(236, 171)</value>
    </param>
    <param>
      <key>_rotation</key>
      <value>0</value>
    </param>
    <param>
      <key>id</key>
      <value>freq</value>
    </param>
    <param>
      <key>label</key>
      <value></value>
    </param>
    <param>
      <key>short_id</key>
      <value>f</value>
    </param>
    <param>
      <key>type</key>
      <value>eng_float</value>
    </param>
    <param>
      <key>value</key>
      <value>98e6</value>
    </param>
  </block>
  <block>
    <key>osmosdr_sink</key>
    <param>
      <key>alias</key>
      <value></value>
    </param>
    <param>
      <key>ant0</key>
      <value></value>
    </param>
    <param>
      <key>bb_gain0</key>
      <value>20</value>
    </param>
    <param>
      <key>bw0</key>
      <value>250e3</value>
    </param>
    <param>
      <key>corr0</key>
      <value>26</value>
    </param>
    <param>
      <key>freq0</key>
      <value>freq</value>
    </param>
    <param>
      <key>if_gain0</key>
      <value>40</value>
    </param>
    <param>
      <key>gain0</key>
      <value>14</value>
    </param>
    <param>
      <key>ant10</key>
      <value></value>
    </param>
    <param>
      <key>bb_gain10</key>
      <value>20</value>
    </param>
    <param>
      <key>bw10</key>
      <value>0</value>
    </param>
    <param>
      <key>corr10</key>
      <value>0</value>
    </param>
    <param>
      <key>freq10</key>
      <value>100e6</value>
    </param>
    <param>
      <key>if_gain10</key>
      <value>20</value>
    </param>
    <param>
      <key>gain10</key>
      <value>10</value>
    </param>
    <param>
      <key>ant11</key>
      <value></value>
    </param>
    <param>
      <key>bb_gain11</key>
      <value>20</value>
    </param>
    <param>
      <key>bw11</key>
      <value>0</value>
    </param>
    <param>
      <key>corr11</key>
      <value>0</value>
    </param>
    <param>
      <key>freq11</key>
      <value>100e6</value>
    </param>
    <param>
      <key>if_gain11</key>
      <value>20</value>
    </param>
    <param>
      <key>gain11</key>
      <value>10</value>
    </param>
    <param>
      <key>ant12</key>
      <value></value>
    </param>
    <param>
      <key>bb_gain12</key>
      <value>20</value>
    </param>
    <param>
      <key>bw12</key>
      <value>0</value>
    </param>
    <param>
      <key>corr12</key>
      <value>0</value>
    </param>
    <param>
      <key>freq12</key>
      <value>100e6</value>
    </param>
    <param>
      <key>if_gain12</key>
      <value>20</value>
    </param>
    <param>
      <key>gain12</key>
      <value>10</value>
    </param>
    <param>
      <key>ant13</key>
      <value></value>
    </param>
    <param>
      <key>bb_gain13</key>
      <value>20</value>
    </param>
    <param>
      <key>bw13</key>
      <value>0</value>
    </param>
    <param>
      <key>corr13</key>
      <value>0</value>
    </param>
    <param>
      <key>freq13</key>
      <value>100e6</value>
    </param>
    <param>
      <key>if_gain13</key>
      <value>20</value>
    </param>
    <param>
      <key>gain13</key>
      <value>10</value>
    </param>
    <param>
      <key>ant14</key>
      <value></value>
    </param>
    <param>
      <key>bb_gain14</key>
      <value>20</value>
    </param>
    <param>
      <key>bw14</key>
      <value>0</value>
    </param>
    <param>
      <key>corr14</key>
      <value>0</value>
    </param>
    <param>
      <key>freq14</key>
      <value>100e6</value>
    </param>
    <param>
      <key>if_gain14</key>
      <value>20</value>
    </param>
    <param>
      <key>gain14</key>
      <value>10</value>
    </param>
    <param>
      <key>ant15</key>
      <value></value>
    </param>
    <param>
      <key>bb_gain15</key>
      <value>20</value>
    </param>
    <param>
      <key>bw15</key>
      <value>0</value>
    </param>
    <param>
      <key>corr15</key>
      <value>0</value>
    </param>
    <param>
      <key>freq15</key>
      <value>100e6</value>
    </param>
    <param>
      <key>if_gain15</key>
      <value>20</value>
    </param>
    <param>
      <key>gain15</key>
      <value>10</value>
    </param>
    <param>
      <key>ant16</key>
      <value></value>
    </param>
    <param>
      <key>bb_gain16</key>
      <value>20</value>
    </param>
    <param>
      <key>bw16</key>
      <value>0</value>
    </param>
    <param>
      <key>corr16</key>
      <value>0</value>
    </param>
    <param>
      <key>freq16</key>
      <value>100e6</value>
    </param>
    <param>
      <key>if_gain16</key>
      <value>20</value>
    </param>
    <param>
      <key>gain16</key>
      <value>10</value>
    </param>
    <param>
      <key>ant17</key>
      <value></value>
    </param>
    <param>
      <key>bb_gain17</key>
      <value>20</value>
    </param>
    <param>
      <key>bw17</key>
      <value>0</value>
    </param>
    <param>
      <key>corr17</key>
      <value>0</value>
    </param>
    <param>
      <key>freq17</key>
      <value>100e6</value>
    </param>
    <param>
      <key>if_gain17</key>
      <value>20</value>
    </param>
    <param>
      <key>gain17</key>
      <value>10</value>
    </param>
    <param>
      <key>ant18</key>
      <value></value>
    </param>
    <param>
      <key>bb_gain18</key>
      <value>20</value>
    </param>
    <param>
      <key>bw18</key>
      <value>0</value>
    </param>
    <param>
      <key>corr18</key>
      <value>0</value>
    </param>
    <param>
      <key>freq18</key>
      <value>100e6</value>
    </param>
    <param>
      <key>if_gain18</key>
      <value>20</value>
    </param>
    <param>
      <key>gain18</key>
      <value>10</value>
    </param>
    <param>
      <key>ant19</key>
      <value></value>
    </param>
    <param>
      <key>bb_gain19</key>
      <value>20</value>
    </param>
    <param>
      <key>bw19</key>
      <value>0</value>
    </param>
    <param>
      <key>corr19</key>
      <value>0</value>
    </param>
    <param>
      <key>freq19</key>
      <value>100e6</value>
    </param>
    <param>
      <key>if_gain19</key>
      <value>20</value>
    </param>
    <param>
      <key>gain19</key>
      <value>10</value>
    </param>
    <param>
      <key>ant1</key>
      <value></value>
    </param>
    <param>
      <key>bb_gain1</key>
      <value>20</value>
    </param>
    <param>
      <key>bw1</key>
      <value>0</value>
    </param>
    <param>
      <key>corr1</key>
      <value>0</value>
    </param>
    <param>
      <key>freq1</key>
      <value>100e6</value>
    </param>
    <param>
      <key>if_gain1</key>
      <value>20</value>
    </param>
    <param>
      <key>gain1</key>
      <value>10</value>
    </param>
    <param>
      <key>ant20</key>
      <value></value>
    </param>
    <param>
      <key>bb_gain20</key>
      <value>20</value>
    </param>
    <param>
      <key>bw20</key>
      <value>0</value>
    </param>
    <param>
      <key>corr20</key>
      <value>0</value>
    </param>
    <param>
      <key>freq20</key>
      <value>100e6</value>
    </param>
    <param>
      <key>if_gain20</key>
      <value>20</value>
    </param>
    <param>
      <key>gain20</key>
      <value>10</value>
    </param>
    <param>
      <key>ant21</key>
      <value></value>
    </param>
    <param>
      <key>bb_gain21</key>
      <value>20</value>
    </param>
    <param>
      <key>bw21</key>
      <value>0</value>
    </param>
    <param>
      <key>corr21</key>
      <value>0</value>
    </param>
    <param>
      <key>freq21</key>
      <value>100e6</value>
    </param>
    <param>
      <key>if_gain21</key>
      <value>20</value>
    </param>
    <param>
      <key>gain21</key>
      <value>10</value>
    </param>
    <param>
      <key>ant22</key>
      <value></value>
    </param>
    <param>
      <key>bb_gain22</key>
      <value>20</value>
    </param>
    <param>
      <key>bw22</key>
      <value>0</value>
    </param>
    <param>
      <key>corr22</key>
      <value>0</value>
    </param>
    <param>
      <key>freq22</key>
      <value>100e6</value>
    </param>
    <param>
      <key>if_gain22</key>
      <value>20</value>
    </param>
    <param>
      <key>gain22</key>
      <value>10</value>
    </param>
    <param>
      <key>ant23</key>
      <value></value>
    </param>
    <param>
      <key>bb_gain23</key>
      <value>20</value>
    </param>
    <param>
      <key>bw23</key>
      <value>0</value>
    </param>
    <param>
      <key>corr23</key>
      <value>0</value>
    </param>
    <param>
      <key>freq23</key>
      <value>100e6</value>
    </param>
    <param>
      <key>if_gain23</key>
      <value>20</value>
    </param>
    <param>
      <key>gain23</key>
      <value>10</value>
    </param>
    <param>
      <key>ant24</key>
      <value></value>
    </param>
    <param>
      <key>bb_gain24</key>
      <value>20</value>
    </param>
    <param>
      <key>bw24</key>
      <value>0</value>
    </param>
    <param>
      <key>corr24</key>
      <value>0</value>
    </param>
    <param>
      <key>freq24</key>
      <value>100e6</value>
    </param>
    <param>
      <key>if_gain24</key>
      <value>20</value>
    </param>
    <param>
      <key>gain24</key>
      <value>10</value>
    </param>
    <param>
      <key>ant25</key>
      <value></value>
    </param>
    <param>
      <key>bb_gain25</key>
      <value>20</value>
    </param>
    <param>
      <key>bw25</key>
      <value>0</value>
    </param>
    <param>
      <key>corr25</key>
      <value>0</value>
    </param>
    <param>
      <key>freq25</key>
      <value>100e6</value>
    </param>
    <param>
      <key>if_gain25</key>
      <value>20</value>
    </param>
    <param>
      <key>gain25</key>
      <value>10</value>
    </param>
    <param>
      <key>ant26</key>
      <value></value>
    </param>
    <param>
      <key>bb_gain26</key>
      <value>20</value>
    </param>
    <param>
      <key>bw26</key>
      <value>0</value>
    </param>
    <param>
      <key>corr26</key>
      <value>0</value>
    </param>
    <param>
      <key>freq26</key>
      <value>100e6</value>
    </param>
    <param>
      <key>if_gain26</key>
      <value>20</value>
    </param>
    <param>
      <key>gain26</key>
      <value>10</value>
    </param>
    <param>
      <key>ant27</key>
      <value></value>
    </param>
    <param>
      <key>bb_gain27</key>
      <value>20</value>
    </param>
    <param>
      <key>bw27</key>
      <value>0</value>
    </param>
    <param>
      <key>corr27</key>
      <value>0</value>
    </param>
    <param>
      <key>freq27</key>
      <value>100e6</value>
    </param>
    <param>
      <key>if_gain27</key>
      <value>20</value>
    </param>
    <param>
      <key>gain27</key>
      <value>10</value>
    </param>
    <param>
      <key>ant28</key>
      <value></value>
    </param>
    <param>
      <key>bb_gain28</key>
      <value>20</value>
    </param>
    <param>
      <key>bw28</key>
      <value>0</value>
    </param>
    <param>
      <key>corr28</key>
      <value>0</value>
    </param>
    <param>
      <key>freq28</key>
      <value>100e6</value>
    </param>
    <param>
      <key>if_gain28</key>
      <value>20</value>
    </param>
    <param>
      <key>gain28</key>
      <value>10</value>
    </param>
    <param>
      <key>ant29</key>
      <value></value>
    </param>
    <param>
      <key>bb_gain29</key>
      <value>20</value>
    </param>
    <param>
      <key>bw29</key>
      <value>0</value>
    </param>
    <param>
      <key>corr29</key>
      <value>0</value>
    </param>
    <param>
      <key>freq29</key>
      <value>100e6</value>
    </param>
    <param>
      <key>if_gain29</key>
      <value>20</value>
    </param>
    <param>
      <key>gain29</key>
      <value>10</value>
    </param>
    <param>
      <key>ant2</key>
      <value></value>
    </param>
    <param>
      <key>bb_gain2</key>
      <value>20</value>
    </param>
    <param>
      <key>bw2</key>
      <value>0</value>
    </param>
    <param>
      <key>corr2</key>
      <value>0</value>
    </param>
    <param>
      <key>freq2</key>
      <value>100e6</value>
    </param>
    <param>
      <key>if_gain2</key>
      <value>20</value>
    </param>
    <param>
      <key>gain2</key>
      <value>10</value>
    </param>
    <param>
      <key>ant30</key>
      <value></value>
    </param>
    <param>
      <key>bb_gain30</key>
      <value>20</value>
    </param>
    <param>
      <key>bw30</key>
      <value>0</value>
    </param>
    <param>
      <key>corr30</key>
      <value>0</value>
    </param>
    <param>
      <key>freq30</key>
      <value>100e6</value>
    </param>
    <param>
      <key>if_gain30</key>
      <value>20</value>
    </param>
    <param>
      <key>gain30</key>
      <value>10</value>
    </param>
    <param>
      <key>ant31</key>
      <value></value>
    </param>
    <param>
      <key>bb_gain31</key>
      <value>20</value>
    </param>
    <param>
      <key>bw31</key>
      <value>0</value>
    </param>
    <param>
      <key>corr31</key>
      <value>0</value>
    </param>
    <param>
      <key>freq31</key>
      <value>100e6</value>
    </param>
    <param>
      <key>if_gain31</key>
      <value>20</value>
    </param>
    <param>
      <key>gain31</key>
      <value>10</value>
    </param>
    <param>
      <key>ant3</key>
      <value></value>
    </param>
    <param>
      <key>bb_gain3</key>
      <value>20</value>
    </param>
    <param>
      <key>bw3</key>
      <value>0</value>
    </param>
    <param>
      <key>corr3</key>
      <value>0</value>
    </param>
    <param>
      <key>freq3</key>
      <value>100e6</value>
    </param>
    <param>
      <key>if_gain3</key>
      <value>20</value>
    </param>
    <param>
      <key>gain3</key>
      <value>10</value>
    </param>
    <param>
      <key>ant4</key>
      <value></value>
    </param>
    <param>
      <key>bb_gain4</key>
      <value>20</value>
    </param>
    <param>
      <key>bw4</key>
      <value>0</value>
    </param>
    <param>
      <key>corr4</key>
      <value>0</value>
    </param>
    <param>
      <key>freq4</key>
      <value>100e6</value>
    </param>
    <param>
      <key>if_gain4</key>
      <value>20</value>
    </param>
    <param>
      <key>gain4</key>
      <value>10</value>
    </param>
    <param>
      <key>ant5</key>
      <value></value>
    </param>
    <param>
      <key>bb_gain5</key>
      <value>20</value>
    </param>
    <param>
      <key>bw5</key>
      <value>0</value>
    </param>
    <param>
      <key>corr5</key>
      <value>0</value>
    </param>
    <param>
      <key>freq5</key>
      <value>100e6</value>
    </param>
    <param>
      <key>if_gain5</key>
      <value>20</value>
    </param>
    <param>
      <key>gain5</key>
      <value>10</value>
    </param>
    <param>
      <key>ant6</key>
      <value></value>
    </param>
    <param>
      <key>bb_gain6</key>
      <value>20</value>
    </param>
    <param>
      <key>bw6</key>
      <value>0</value>
    </param>
    <param>
      <key>corr6</key>
      <value>0</value>
    </param>
    <param>
      <key>freq6</key>
      <value>100e6</value>
    </param>
    <param>
      <key>if_gain6</key>
      <value>20</value>
    </param>
    <param>
      <key>gain6</key>
      <value>10</value>
    </param>
    <param>
      <key>ant7</key>
      <value></value>
    </param>
    <param>
      <key>bb_gain7</key>
      <value>20</value>
    </param>
    <param>
      <key>bw7</key>
      <value>0</value>
    </param>
    <param>
      <key>corr7</key>
      <value>0</value>
    </param>
    <param>
      <key>freq7</key>
      <value>100e6</value>
    </param>
    <param>
      <key>if_gain7</key>
      <value>20</value>
    </param>
    <param>
      <key>gain7</key>
      <value>10</value>
    </param>
    <param>
      <key>ant8</key>
      <value></value>
    </param>
    <param>
      <key>bb_gain8</key>
      <value>20</value>
    </param>
    <param>
      <key>bw8</key>
      <value>0</value>
    </param>
    <param>
      <key>corr8</key>
      <value>0</value>
    </param>
    <param>
      <key>freq8</key>
      <value>100e6</value>
    </param>
    <param>
      <key>if_gain8</key>
      <value>20</value>
    </param>
    <param>
      <key>gain8</key>
      <value>10</value>
    </param>
    <param>
      <key>ant9</key>
      <value></value>
    </param>
    <param>
      <key>bb_gain9</key>
      <value>20</value>
    </param>
    <param>
      <key>bw9</key>
      <value>0</value>
    </param>
    <param>
      <key>corr9</key>
      <value>0</value>
    </param>
    <param>
      <key>freq9</key>
      <value>100e6</value>
    </param>
    <param>
      <key>if_gain9</key>
      <value>20</value>
    </param>
    <param>
      <key>gain9</key>
      <value>10</value>
    </param>
    <param>
      <key>comment</key>
      <value></value>
    </param>
    <param>
      <key>affinity</key>
      <value></value>
    </param>
    <param>
      <key>args</key>
      <value></value>
    </param>
    <param>
      <key>_enabled</key>
      <value>True</value>
    </param>
    <param>
      <key>_coordinate</key>
      <value>(706, 350)</value>
    </param>
    <param>
      <key>_rotation</key>
      <value>0</value>
    </param>
    <param>
      <key>id</key>
      <value>osmosdr_sink_0</value>
    </param>
    <param>
      <key>type</key>
      <value>fc32</value>
    </param>
    <param>
      <key>clock_source0</key>
      <value></value>
    </param>
    <param>
      <key>time_source0</key>
      <value></value>
    </param>
    <param>
      <key>clock_source1</key>
      <value></value>
    </param>
    <param>
      <key>time_source1</key>
      <value></value>
    </param>
    <param>
      <key>clock_source2</key>
      <value></value>
    </param>
    <param>
      <key>time_source2</key>
      <value></value>
    </param>
    <param>
      <key>clock_source3</key>
      <value></value>
    </param>
    <param>
      <key>time_source3</key>
      <value></value>
    </param>
    <param>
      <key>clock_source4</key>
      <value></value>
    </param>
    <param>
      <key>time_source4</key>
      <value></value>
    </param>
    <param>
      <key>clock_source5</key>
      <value></value>
    </param>
    <param>
      <key>time_source5</key>
      <value></value>
    </param>
    <param>
      <key>clock_source6</key>
      <value></value>
    </param>
    <param>
      <key>time_source6</key>
      <value></value>
    </param>
    <param>
      <key>clock_source7</key>
      <value></value>
    </param>
    <param>
      <key>time_source7</key>
      <value></value>
    </param>
    <param>
      <key>nchan</key>
      <value>1</value>
    </param>
    <param>
      <key>num_mboards</key>
      <value>1</value>
    </param>
    <param>
      <key>sample_rate</key>
      <value>8e6</value>
    </param>
    <param>
      <key>sync</key>
      <value></value>
    </param>
  </block>
  <block>
    <key>rational_resampler_xxx</key>
    <param>
      <key>alias</key>
      <value></value>
    </param>
    <param>
      <key>comment</key>
      <value></value>
    </param>
    <param>
      <key>affinity</key>
      <value></value>
    </param>
    <param>
      <key>decim</key>
      <value>1</value>
    </param>
    <param>
      <key>_enabled</key>
      <value>True</value>
    </param>
    <param>
      <key>fbw</key>
      <value>0</value>
    </param>
    <param>
      <key>_coordinate</key>
      <value>(507, 373)</value>
    </param>
    <param>
      <key>_rotation</key>
      <value>0</value>
    </param>
    <param>
      <key>id</key>
      <value>rational_resampler_xxx_0</value>
    </param>
    <param>
      <key>interp</key>
      <value>8</value>
    </param>
    <param>
      <key>maxoutbuf</key>
      <value>0</value>
    </param>
    <param>
      <key>minoutbuf</key>
      <value>0</value>
    </param>
    <param>
      <key>taps</key>
      <value></value>
    </param>
    <param>
      <key>type</key>
      <value>ccc</value>
    </param>
  </block>
  <connection>
    <source_block_id>analog_wfm_tx_0</source_block_id>
    <sink_block_id>rational_resampler_xxx_0</sink_block_id>
    <source_key>0</source_key>
    <sink_key>0</sink_key>
  </connection>
  <connection>
    <source_block_id>audio_source_0</source_block_id>
    <sink_block_id>fractional_interpolator_xx_0</sink_block_id>
    <source_key>0</source_key>
    <sink_key>0</sink_key>
  </connection>
  <connection>
    <source_block_id>fractional_interpolator_xx_0</source_block_id>
    <sink_block_id>analog_wfm_tx_0</sink_block_id>
    <source_key>0</source_key>
    <sink_key>0</sink_key>
  </connection>
  <connection>
    <source_block_id>rational_resampler_xxx_0</source_block_id>
    <sink_block_id>osmosdr_sink_0</sink_block_id>
    <source_key>0</source_key>
    <sink_key>0</sink_key>
  </connection>
</flow_graph>

同理,不过这回的声音源的麦克风,在实验的时候如果街坊邻居正在听广播就尴尬咯~所以建议发射的数值低一些。

Kali Linux-2017-07-09-15-34-32.png

最后要说的是:

请遵守当地无线电法规!

请遵守当地无线电法规!

请遵守当地无线电法规!


参考来源:

http://www.witimes.com/wp-content/uploads/2014/06/HackRF-Schematic.pdf

https://en.wikipedia.org/wiki/List_of_software-defined_radios

http://www.hackrf.net/2013/12/linux%E7%B3%BB%E7%BB%9F%E4%B8%8A%E6%90%AD%E5%BB%BAhackrf%E7%8E%AF%E5%A2%83/

本文转自 FreeBuf

转载请注明来自华盟网,本文标题:《如何利用HackRF进行实时广播》

喜欢 (0) 发布评论