<div dir="ltr"><div>Hi,</div><div><br></div>You can type this to a gr-osmosdr block in GNU Radio. I doubt that GNU Radio would be easy to compile on Android.<div><br></div><div>If you want to write your own client that processes I/Q data, you should look at <a href="http://cgit.osmocom.org/rtl-sdr/tree/src/rtl_tcp.c" target="_blank">rtl_tcp source code</a>, it's quite self-documenting.</div>


<div><br></div><div>Anyway, some key points: if you open a TCP connection to the rtl_tcp server, it immediately starts to send you the 8-bit I/Q samples acquired from the dongle. Every odd byte is an I, every even byte is a Q sample.</div>


<div><br></div><div>You can control rtl_tcp with five byte commands. Look for "<span style="font-size:13px">switch(cmd.cmd)" and "</span><span style="font-size:13px">struct command" in the source code.</span><br>


</div><div><br></div><div>When your client connects, it also gets 12 bytes with the dongle identifier at the beginning of the stream, but it can be ignored. Look for "<span style="font-size:13px">dongle_info_t</span><span style="font-size:13px">" if interested.</span><br>


</div><div><span style="font-size:13px"><br></span></div><div><span style="font-size:13px">You will need to process the I/Q data yourself and calculate FFT to draw the waterfall.</span></div>
<div><span style="font-size:13px"><br></span></div><div><span style="font-size:13px">Regards,</span></div><div><span style="font-size:13px"><br></span></div><div><span style="font-size:13px">Andras, HA7ILM</span></div>
<div><br></div><div><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014/1/18 393775602 <span dir="ltr"><<a href="mailto:393775602@qq.com" target="_blank">393775602@qq.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div>thanks to all of u,i have start the rtl_tcp and see the log like:</div><div>rtl_tcp -a 127.0.0.1 -p 14423 -f <a href="tel:91800000" value="+3691800000" target="_blank">91800000</a> -s 1024000</div><div><font size="4"><code>Found 1 device(s).</code><br style="font-family:Arial,Verdana,sans-serif">


<code>Found Fitipower FC0013 tuner</code><br style="font-family:Arial,Verdana,sans-serif"><code>Using Terratec NOXON DAB/DAB+ USB dongle (rev 1)</code><br style="font-family:Arial,Verdana,sans-serif"><code>Tuned to </code></font><a href="tel:91800000" value="+3691800000" target="_blank">91800000</a><font size="4"><code> Hz.</code></font><font size="4"><br style="font-family:Arial,Verdana,sans-serif">


<code>listening...</code></font></div><div><font size="4"><code>Use the device argument 'rtl_tcp=</code></font>127.0.0.1<font size="4"><code>:</code></font>14423<font size="4"><code>' in OsmoSDR </code></font><font face="monospace" size="4"><span style="line-height:24px">(gr-osmosdr) source</span></font></div>


<div><font face="monospace" size="4">to receive samples in GRC and control <span style="line-height:24px">rtl_tcp parameters (frequency, gain, ...).</span></font></div><div><font face="monospace" size="4"><span style="line-height:24px"><br>


</span></font></div><div><font face="monospace" size="4"><span style="line-height:24px"><br></span></font></div><div><font face="monospace" size="4"><span style="line-height:24px">my question now is what should i do next?where should i type command </span></font><font size="4"><code>rtl_tcp=</code></font><span style="line-height:1.5">127.0.0.1</span><font size="4"><code>:</code></font><span style="line-height:1.5">14423</span></div>


<div><div>to get the fft specturm data?</div><div><br></div><div style="font-size:12px;font-family:Arial Narrow;padding:2px 0 2px 0">------------------ 原始邮件 ------------------</div><div style="font-size:12px;background:#efefef;padding:8px">


<div><b>发件人:</b> "András Retzle";<<a href="mailto:retzlerandras@gmail.com" target="_blank">retzlerandras@gmail.com</a>>;</div><div><b>发送时间:</b> 2014年1月16日(星期四) 晚上11:56</div><div><b>收件人:</b> ""<<a href="mailto:393775602@qq.com" target="_blank">393775602@qq.com</a>>; <u></u></div>


<div><b>抄送:</b> "osmocom-sdr"<<a href="mailto:osmocom-sdr@lists.osmocom.org" target="_blank">osmocom-sdr@lists.osmocom.org</a>>; <u></u></div><div><b>主题:</b> Re: Elonics 4000 bandpass</div></div><div><div>


<div><br></div><div dir="ltr"><div>Hi,</div><div><br></div><div class="gmail_extra"><div class="gmail_quote"><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">




<div><span>i want to write an android app with the </span><a href="http://wiki.spench.net/wiki/RTL2832U" title="RTL2832U" style="outline:none;color:rgb(90,54,150);background-image:none;background-color:rgb(253,253,253);white-space:nowrap;font-family:sans-serif;font-size:12px;line-height:19.046875px" target="_blank">Realtek DVB-T Dongles</a><span style="font-family:sans-serif;font-size:12px;line-height:19.046875px;background-color:rgb(253,253,253)"> ,is there any li</span><span>brtlsdr API for android?</span></div>




</blockquote><div><br></div><div>What about these?</div><div><br></div><a href="https://play.google.com/store/apps/details?id=marto.rtl_tcp_andro" target="_blank">https://play.google.com/store/apps/details?id=marto.rtl_tcp_andro</a><br>



<div>
<a href="https://github.com/keesj/android-rtlsdr" target="_blank">https://github.com/keesj/android-rtlsdr</a><br></div><div><a href="https://github.com/keesj/librtlsdr-android" target="_blank">https://github.com/keesj/librtlsdr-android</a><br>


</div><div>

<br></div><div>Regards,</div><div><br></div><div>Andras, HA7ILM </div></div></div></div></div></div></div></blockquote></div><br></div></div>