[Hackrf-dev] Replay attacks?
Michael Ossmann
mike at ossmann.com
Tue Jul 2 13:18:24 EDT 2013
On Tue, Jul 02, 2013 at 09:57:26AM -0700, Scott Jordan wrote:
>
> Just checked the waveform I recorded with hackrf_transfer, it looks
> good. What kind of flow graph did you use in grc to transmit it. Btw I
> used hackrf_transfer -w
I recommend hackrf_transfer -r. The -w option is weird and not really
compatible with most software that knows how to read .wav files.
I'm attaching my flowgraph (for GNU Radio 3.6.5). The important stuff
is: UChar to Float -> Deinterleave => Float to Complex -> Add Const
-------------- next part --------------
<?xml version='1.0' encoding='ASCII'?>
<flow_graph>
<timestamp>Tue Jul 2 11:16:51 2013</timestamp>
<block>
<key>options</key>
<param>
<key>id</key>
<value>top_block</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
<key>title</key>
<value></value>
</param>
<param>
<key>author</key>
<value></value>
</param>
<param>
<key>description</key>
<value></value>
</param>
<param>
<key>window_size</key>
<value>1280, 1024</value>
</param>
<param>
<key>generate_options</key>
<value>wx_gui</value>
</param>
<param>
<key>category</key>
<value>Custom</value>
</param>
<param>
<key>run_options</key>
<value>prompt</value>
</param>
<param>
<key>run</key>
<value>True</value>
</param>
<param>
<key>max_nouts</key>
<value>0</value>
</param>
<param>
<key>realtime_scheduling</key>
<value></value>
</param>
<param>
<key>_coordinate</key>
<value>(10, 10)</value>
</param>
<param>
<key>_rotation</key>
<value>0</value>
</param>
</block>
<block>
<key>variable</key>
<param>
<key>id</key>
<value>samp_rate</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
<key>value</key>
<value>8e6</value>
</param>
<param>
<key>_coordinate</key>
<value>(10, 170)</value>
</param>
<param>
<key>_rotation</key>
<value>0</value>
</param>
</block>
<block>
<key>blocks_float_to_complex</key>
<param>
<key>id</key>
<value>blocks_float_to_complex_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
<key>vlen</key>
<value>1</value>
</param>
<param>
<key>_coordinate</key>
<value>(841, 55)</value>
</param>
<param>
<key>_rotation</key>
<value>0</value>
</param>
</block>
<block>
<key>blocks_deinterleave</key>
<param>
<key>id</key>
<value>blocks_deinterleave_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
<key>type</key>
<value>float</value>
</param>
<param>
<key>num_streams</key>
<value>2</value>
</param>
<param>
<key>vlen</key>
<value>1</value>
</param>
<param>
<key>_coordinate</key>
<value>(631, 64)</value>
</param>
<param>
<key>_rotation</key>
<value>0</value>
</param>
</block>
<block>
<key>blocks_uchar_to_float</key>
<param>
<key>id</key>
<value>blocks_uchar_to_float_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
<key>_coordinate</key>
<value>(450, 36)</value>
</param>
<param>
<key>_rotation</key>
<value>0</value>
</param>
</block>
<block>
<key>osmosdr_sink_c</key>
<param>
<key>id</key>
<value>osmosdr_sink_c_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
<key>type</key>
<value>fc32</value>
</param>
<param>
<key>args</key>
<value></value>
</param>
<param>
<key>nchan</key>
<value>1</value>
</param>
<param>
<key>sample_rate</key>
<value>samp_rate</value>
</param>
<param>
<key>freq0</key>
<value>27e6</value>
</param>
<param>
<key>corr0</key>
<value>0</value>
</param>
<param>
<key>gain0</key>
<value>14</value>
</param>
<param>
<key>if_gain0</key>
<value>20</value>
</param>
<param>
<key>bb_gain0</key>
<value>20</value>
</param>
<param>
<key>ant0</key>
<value></value>
</param>
<param>
<key>bw0</key>
<value>0</value>
</param>
<param>
<key>freq1</key>
<value>100e6</value>
</param>
<param>
<key>corr1</key>
<value>0</value>
</param>
<param>
<key>gain1</key>
<value>10</value>
</param>
<param>
<key>if_gain1</key>
<value>20</value>
</param>
<param>
<key>bb_gain1</key>
<value>20</value>
</param>
<param>
<key>ant1</key>
<value></value>
</param>
<param>
<key>bw1</key>
<value>0</value>
</param>
<param>
<key>freq2</key>
<value>100e6</value>
</param>
<param>
<key>corr2</key>
<value>0</value>
</param>
<param>
<key>gain2</key>
<value>10</value>
</param>
<param>
<key>if_gain2</key>
<value>20</value>
</param>
<param>
<key>bb_gain2</key>
<value>20</value>
</param>
<param>
<key>ant2</key>
<value></value>
</param>
<param>
<key>bw2</key>
<value>0</value>
</param>
<param>
<key>freq3</key>
<value>100e6</value>
</param>
<param>
<key>corr3</key>
<value>0</value>
</param>
<param>
<key>gain3</key>
<value>10</value>
</param>
<param>
<key>if_gain3</key>
<value>20</value>
</param>
<param>
<key>bb_gain3</key>
<value>20</value>
</param>
<param>
<key>ant3</key>
<value></value>
</param>
<param>
<key>bw3</key>
<value>0</value>
</param>
<param>
<key>freq4</key>
<value>100e6</value>
</param>
<param>
<key>corr4</key>
<value>0</value>
</param>
<param>
<key>gain4</key>
<value>10</value>
</param>
<param>
<key>if_gain4</key>
<value>20</value>
</param>
<param>
<key>bb_gain4</key>
<value>20</value>
</param>
<param>
<key>ant4</key>
<value></value>
</param>
<param>
<key>bw4</key>
<value>0</value>
</param>
<param>
<key>_coordinate</key>
<value>(850, 229)</value>
</param>
<param>
<key>_rotation</key>
<value>0</value>
</param>
</block>
<block>
<key>note</key>
<param>
<key>id</key>
<value>note_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
<key>note</key>
<value>file was captured with hackrf-transfer -s 8000000 -f 27000000 -r filename</value>
</param>
<param>
<key>_coordinate</key>
<value>(230, 20)</value>
</param>
<param>
<key>_rotation</key>
<value>0</value>
</param>
</block>
<block>
<key>blocks_add_const_vxx</key>
<param>
<key>id</key>
<value>blocks_add_const_vxx_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
<key>type</key>
<value>complex</value>
</param>
<param>
<key>const</key>
<value>-127-131j</value>
</param>
<param>
<key>vlen</key>
<value>1</value>
</param>
<param>
<key>_coordinate</key>
<value>(266, 215)</value>
</param>
<param>
<key>_rotation</key>
<value>0</value>
</param>
</block>
<block>
<key>note</key>
<param>
<key>id</key>
<value>note_1</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
<key>note</key>
<value>using Add Const to correct for unsigned vs. signed and simultaneously correct (manually) for DC offset in source file</value>
</param>
<param>
<key>_coordinate</key>
<value>(247, 264)</value>
</param>
<param>
<key>_rotation</key>
<value>0</value>
</param>
</block>
<block>
<key>wxgui_scopesink2</key>
<param>
<key>id</key>
<value>wxgui_scopesink2_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
<key>type</key>
<value>complex</value>
</param>
<param>
<key>title</key>
<value>Scope Plot</value>
</param>
<param>
<key>samp_rate</key>
<value>samp_rate/16</value>
</param>
<param>
<key>v_scale</key>
<value>0</value>
</param>
<param>
<key>v_offset</key>
<value>0</value>
</param>
<param>
<key>t_scale</key>
<value>0</value>
</param>
<param>
<key>ac_couple</key>
<value>False</value>
</param>
<param>
<key>xy_mode</key>
<value>False</value>
</param>
<param>
<key>num_inputs</key>
<value>1</value>
</param>
<param>
<key>win_size</key>
<value></value>
</param>
<param>
<key>grid_pos</key>
<value></value>
</param>
<param>
<key>notebook</key>
<value></value>
</param>
<param>
<key>trig_mode</key>
<value>gr.gr_TRIG_MODE_AUTO</value>
</param>
<param>
<key>y_axis_label</key>
<value>Counts</value>
</param>
<param>
<key>_coordinate</key>
<value>(676, 330)</value>
</param>
<param>
<key>_rotation</key>
<value>0</value>
</param>
</block>
<block>
<key>blocks_multiply_const_vxx</key>
<param>
<key>id</key>
<value>blocks_multiply_const_vxx_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
<key>type</key>
<value>complex</value>
</param>
<param>
<key>const</key>
<value>5</value>
</param>
<param>
<key>vlen</key>
<value>1</value>
</param>
<param>
<key>_coordinate</key>
<value>(561, 194)</value>
</param>
<param>
<key>_rotation</key>
<value>0</value>
</param>
</block>
<block>
<key>note</key>
<param>
<key>id</key>
<value>note_3</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
<key>note</key>
<value>Amplification by Multiply Const wasn't necessary in this case but did get me a bit more range.</value>
</param>
<param>
<key>_coordinate</key>
<value>(534, 241)</value>
</param>
<param>
<key>_rotation</key>
<value>0</value>
</param>
</block>
<block>
<key>note</key>
<param>
<key>id</key>
<value>note_2</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
<key>note</key>
<value>UChar to Float through Add Const are converting the hackrf_transfer file format into a complex stream used in GNU Radio.</value>
</param>
<param>
<key>_coordinate</key>
<value>(615, 7)</value>
</param>
<param>
<key>_rotation</key>
<value>0</value>
</param>
</block>
<block>
<key>blocks_file_source</key>
<param>
<key>id</key>
<value>blocks_file_source_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
<key>file</key>
<value>/tmp/filename</value>
</param>
<param>
<key>type</key>
<value>byte</value>
</param>
<param>
<key>repeat</key>
<value>True</value>
</param>
<param>
<key>vlen</key>
<value>1</value>
</param>
<param>
<key>_coordinate</key>
<value>(226, 67)</value>
</param>
<param>
<key>_rotation</key>
<value>0</value>
</param>
</block>
<connection>
<source_block_id>blocks_add_const_vxx_0</source_block_id>
<sink_block_id>blocks_multiply_const_vxx_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
<source_block_id>blocks_float_to_complex_0</source_block_id>
<sink_block_id>blocks_add_const_vxx_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
<source_block_id>blocks_multiply_const_vxx_0</source_block_id>
<sink_block_id>wxgui_scopesink2_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
<source_block_id>blocks_multiply_const_vxx_0</source_block_id>
<sink_block_id>osmosdr_sink_c_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
<source_block_id>blocks_deinterleave_0</source_block_id>
<sink_block_id>blocks_float_to_complex_0</sink_block_id>
<source_key>1</source_key>
<sink_key>1</sink_key>
</connection>
<connection>
<source_block_id>blocks_deinterleave_0</source_block_id>
<sink_block_id>blocks_float_to_complex_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
<source_block_id>blocks_uchar_to_float_0</source_block_id>
<sink_block_id>blocks_deinterleave_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
<source_block_id>blocks_file_source_0</source_block_id>
<sink_block_id>blocks_uchar_to_float_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
</flow_graph>
More information about the HackRF-dev
mailing list