GnuRadio tcp_sink data values are garbled
<p>I'm developing a web front end for a GNU Radio application developed by a colleague.</p>

<p>I have a TCP client connecting to the output of two <code>TCP Sink</code> blocks, and the data encoding is not as I expect it to be.</p>

<p>One <code>TCP Sink</code> is sending complex data and the other is sending float data. </p>

<p>I'm decoding the data at the client by reading each 4-byte chunk as a <code>float32</code> value. The server and the client are both little-endian systems, but I also tried byte swapping (with the GNU Radio <code>Endian Swap</code> block and also manually at the client), and the data is still not right. Actually it's much worse then, confirming there is no byte order mismatch.</p>

<p>When I execute the flow graph in GNU Radio Companion with appropriate GUI elements, the plots look correct. The data values are shown as expected to between 0 and 10.</p>

<p>However the values decoded at the client are generally around 0.00xxxxx, and the plot looks like noise rather than showing a simple tone as is seen in GNU Radio. If I manually scale the data by multiplying by 1000 it still looks like noise.</p>

<p>I'll describe the pre-D path in GNU Radio since it's shorter, but I see the same problem on the post-D path, where a <code>WBFM Receive</code> and a <code>Rational Resampler</code> are added, followed by a <code>Throttle</code> block and then a <code>TCP Sink</code> block sending float data.</p>

<pre><code>File Source (Output Type: complex, vector length: 1) =&gt;
Throttle (vector length: 1) =&gt;
Low Pass Filter (FIR Type: Complex-&gt;Complex (Decimating)) =&gt;
Throttle (vector length: 1) =&gt;
TCP Sink (input type: complex, vector length: 1).
</code></pre>

<p>This seems to be the correct way to specify the stream parameters (and indeed Companion shows errors if I make changes which mismatch the stream items), but I can find no way to decode the data correctly on the other end of the stream.</p>