[Hackrf-dev] hackrf_transfer -t issues?

Michael Ossmann mike at ossmann.com
Sun Sep 1 08:38:43 EDT 2013


I started looking for the bug on an airplane, but I wasn't able to find
it without hardware to test with. I'm definitely hoping to get to it
this week.

I put together the attached flowgraph (.grc file and the generated .py
program) for GNU Radio 3.6. hackrfreplay.py may be an acceptable
alternative until hackrf_transfer -t is fixed. It's pretty easy to
change the sample rate, file name, etc. in Python and avoid GRC.

My next step on this when I get back to the lab will be comparing the
signal produced by hackrfreplay.py with that produced by
hackrf_transfer.


On Fri, Aug 30, 2013 at 09:26:09AM -0700, Mudge Zatko wrote:

>

> Thanks Mike.

>

> Any idea when (if?) this will be looked into?

>

> GRC is cool and all, but part of the allure of HackRF (at least to me) is

> the ability to perform meaningful replay and mutation fuzzing from a

> minimalistic unix environment.

>

> To that end, hackrf_transfer -t would look to be ideal in quickly enabling

> some initial security analysis of various receiver codecs.

>

> Or perhaps there's another alternative to transfer -t that you or someone

> else on the list is aware of they could point me to in the meantime?

>

> thanks again,

>

> .mudge

>

>

>

>

>

> On Fri, Aug 30, 2013 at 7:45 AM, Michael Ossmann <mike at ossmann.com> wrote:

>

> > On Tue, Aug 27, 2013 at 08:52:32AM -0700, Mudge Zatko wrote:

> > >

> > > has anyone had luck with replaying captured signals via

> > > hackrf_transfer -t?

> >

> > There is definitely a bug:

> >

> > https://github.com/mossmann/hackrf/issues/91

> >

> > I haven't had a chance to look for the root cause yet.

> >

-------------- next part --------------
<?xml version='1.0' encoding='ASCII'?>
<flow_graph>
<timestamp>Sat Aug 31 17:55:48 2013</timestamp>
<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>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>
<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>variable</key>
<param>
<key>id</key>
<value>frequency</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
<key>value</key>
<value>915e6</value>
</param>
<param>
<key>_coordinate</key>
<value>(11, 104)</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 915000000 -r filename</value>
</param>
<param>
<key>_coordinate</key>
<value>(227, 11)</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, 8)</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-127j</value>
</param>
<param>
<key>vlen</key>
<value>1</value>
</param>
<param>
<key>_coordinate</key>
<value>(1059, 80)</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 (can also simultaneously correct for DC offset in source file)</value>
</param>
<param>
<key>_coordinate</key>
<value>(1035, 17)</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 may be necessary.</value>
</param>
<param>
<key>_coordinate</key>
<value>(306, 258)</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>(326, 206)</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>frequency</value>
</param>
<param>
<key>corr0</key>
<value>0</value>
</param>
<param>
<key>gain0</key>
<value>14</value>
</param>
<param>
<key>if_gain0</key>
<value>40</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>(605, 196)</value>
</param>
<param>
<key>_rotation</key>
<value>0</value>
</param>
</block>
<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>no_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>wxgui_scopesink2</key>
<param>
<key>id</key>
<value>wxgui_scopesink2_0</value>
</param>
<param>
<key>_enabled</key>
<value>False</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</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>(582, 323)</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_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>
<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>
</flow_graph>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hackrfreplay.py
Type: text/x-python
Size: 2976 bytes
Desc: not available
Url : http://nine.pairlist.net/pipermail/hackrf-dev/attachments/20130901/7af94e40/attachment.py


More information about the HackRF-dev mailing list