<div dir="ltr"><div><div><div><div><div><div><div><div><div><div>Hi,<br><br></div>Today I did some experiments using CW signal which is generated by signal generator. The conclusion is a little bit sad.<br></div><br>sync read and UDP lose samples/data high probably:<br>
</div>1. If there are some other operations (which costs some time) between two successive sync reads, some samples will be lost.<br></div>2. Some times, UDP packets are just lost.<br><br></div>So, seems that I have two choices:<br>
</div>1. struggle to use async read mode.<br></div>2. use rtl_tcp utility directly, which is offered with rtl-sdr code. This program use async mode and TCP, which has avoided the two shortcomings I addressed.<br><br></div>
I will try the 2nd method, and try to move on with calibration.<br><br></div>BR<br><br></div>Jiao Xianjun<br><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Jan 4, 2014 at 8:34 PM, Jiao Xianjun <span dir="ltr"><<a href="mailto:putaoshu@gmail.com" target="_blank">putaoshu@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>I have questions on usage of rtlsdr_read_sync(dev, buffer, out_block_size, &n_read):</div>
<div><br></div><div>For example, if sampling rate is 1Msps, and out_block_size is 1000000, question is:</div>
<div><br></div><div>1. the rtlsdr_read_sync() will cost 1s exactly? Or is there any lower level device/driver buffer, which perhaps feed rtlsdr_read_sync() with history data quickly and makes rtlsdr_read_sync() return in a time shorter than 1s?</div>

<div><br></div><div>2. in this infinite processing loop:</div><div>while(1)</div><div>{</div><div>rtlsdr_read_sync(dev, buffer, out_block_size, &n_read);<br></div><div>processing_function(buffer); // let's assume that this cost 0.001s</div>

<div>}</div><div>Those samples during the 0.001s processing period will be losted or not? Is there any method to not lost them?</div><div><br></div><div>Thanks very much!</div><div><br></div><div>BR</div><div><br></div><div>

Jiao Xianjun</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div class="im">On Thu, Jan 2, 2014 at 9:25 PM, Jiao Xianjun <span dir="ltr"><<a href="mailto:putaoshu@gmail.com" target="_blank">putaoshu@gmail.com</a>></span> wrote:<br>

</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>

<div><div class="im">
<div>
<div style="FONT-SIZE:11pt;FONT-FAMILY:Calibri,sans-serif">I see some UDP packet performance issues in my laptop (but not in my desktop computer). Will the common (interleave multiple receives) UDP link helps?<br><br>The issue is that fread for the second dongle in matlab get less data than expectation sometimes. Seem that fread for the first dongle works well.</div>

</div>
</div><div dir="ltr">
<hr>
<span style="FONT-SIZE:11pt;FONT-FAMILY:Calibri,sans-serif;FONT-WEIGHT:bold">From: </span><span style="FONT-SIZE:11pt;FONT-FAMILY:Calibri,sans-serif"><a href="mailto:sdrguru1@gmail.com" target="_blank">Sdr Guru</a></span><br>

<span style="FONT-SIZE:11pt;FONT-FAMILY:Calibri,sans-serif;FONT-WEIGHT:bold">Sent: </span><span style="FONT-SIZE:11pt;FONT-FAMILY:Calibri,sans-serif">2014/1/2 5:39</span><div><div class="h5"><br><span style="FONT-SIZE:11pt;FONT-FAMILY:Calibri,sans-serif;FONT-WEIGHT:bold">To: </span><span style="FONT-SIZE:11pt;FONT-FAMILY:Calibri,sans-serif"><a href="mailto:osmocom-sdr@lists.osmocom.org" target="_blank">osmocom-sdr@lists.osmocom.org</a></span><br>

<span style="FONT-SIZE:11pt;FONT-FAMILY:Calibri,sans-serif;FONT-WEIGHT:bold">Subject: </span><span style="FONT-SIZE:11pt;FONT-FAMILY:Calibri,sans-serif">Re: How to get IQ samples from multiple rtl-sdr dongles in asynchronized manner?</span><br>

<br></div></div></div><div><div class="h5">
<div dir="ltr">Hi 
<div><br></div>
<div>rtl-sdr-relay<br></div>
<div>Some of the recommendations.<br></div>
<div>
<div>Please add PPM error calculation, exactly like new rtl_test -p but multiple receivers simultaneously.</div></div>
<div>It provides immediate information if something is wrong with USB or dongles.<br></div>
<div><a href="https://github.com/keenerd/rtl-sdr/commit/b5f89dcf40463130e717b6c9bb3a39a3c8b9535f" target="_blank">https://github.com/keenerd/rtl-sdr/commit/b5f89dcf40463130e717b6c9bb3a39a3c8b9535f</a><br></div>
<div><a href="https://github.com/keenerd/rtl-sdr/blob/master/src/rtl_test.c" target="_blank">https://github.com/keenerd/rtl-sdr/blob/master/src/rtl_test.c</a><br></div>
<div><br></div>
<div>Please add automatic eeprom PPM calibration</div>
<div><a href="https://github.com/keenerd/rtl-sdr/commit/ecf267737ca52f5005b7a12a352307e8cd763ed6" target="_blank">https://github.com/keenerd/rtl-sdr/commit/ecf267737ca52f5005b7a12a352307e8cd763ed6</a><br></div>
<div><br></div>
<div>default sample rate 2.4M (28.8/12) or 1.2M (28.8/24), probably lower jitter</div>
<div>MAX_NUM_DEV 4->16 :)<br></div>
<div><br></div>
<div>Some nice to have features.<br></div>
<div>ip binding<br></div>
<div>multicast support<br></div>
<div class="gmail_extra">one common (interleaved) stream of all the receivers</div>
<div class="gmail_extra">timestamped stream</div>
<div class="gmail_extra"><br></div>
<div class="gmail_extra">I'm trying to convert MATLAB script to Ocatve.<br></div>
<div class="gmail_extra"><br></div>
<div class="gmail_extra">SG<br><br>
<div class="gmail_quote">On Mon, Dec 30, 2013 at 9:38 AM, Jiao Xianjun <span dir="ltr"><<a href="mailto:putaoshu@gmail.com" target="_blank">putaoshu@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT:1ex;MARGIN:0px 0px 0px 0.8ex;BORDER-LEFT:rgb(204,204,204) 1px solid">
<div dir="ltr">
<div>
<div>Hi guys,<br><br></div>For the multiple dongles synchronization in signal level instead of bits/packets level, I setup a working repo in github, and write a initial demo framework. See below:<br><br><a href="https://github.com/JiaoXianjun/multi-rtl-sdr-udp-relay.git" target="_blank">https://github.com/JiaoXianjun/multi-rtl-sdr-udp-relay.git</a><br>

<br></div>You may find information and instruction of demo quickly by reading the README.<br>
<div>
<p style="WHITE-SPACE:normal;TEXT-TRANSFORM:none;WORD-SPACING:0px;COLOR:rgb(51,51,51);FONT:15px/25px Helvetica,arial,freesans,clean,sans-serif;MARGIN:15px 0px;LETTER-SPACING:normal;TEXT-INDENT:0px">My initial purpose is performing in-fly calibration for multiple dongles according to some pre-known signal (GSM, ADS-B?) to let them work together coherently.</p>


<p style="WHITE-SPACE:normal;TEXT-TRANSFORM:none;WORD-SPACING:0px;COLOR:rgb(51,51,51);FONT:15px/25px Helvetica,arial,freesans,clean,sans-serif;MARGIN:15px 0px;LETTER-SPACING:normal;TEXT-INDENT:0px">An ideal scheme may be that we should generate a very narrow band and very week signal in (or just located at the edge of) target working band of dongles, and perform the software in-fly calibration in background (or driver level). This would be user friendly.<br>

</p>
<p style="WHITE-SPACE:normal;TEXT-TRANSFORM:none;WORD-SPACING:0px;COLOR:rgb(51,51,51);FONT:15px/25px Helvetica,arial,freesans,clean,sans-serif;MARGIN:15px 0px;LETTER-SPACING:normal;TEXT-INDENT:0px">I know it is far from final state currently, and many things are not clear yet (See TODO). But please join me if you also think this is a good idea. Just check out the demo and run it to have a look.</p>


<p style="WHITE-SPACE:normal;TEXT-TRANSFORM:none;WORD-SPACING:0px;COLOR:rgb(51,51,51);FONT:15px/25px Helvetica,arial,freesans,clean,sans-serif;MARGIN:15px 0px;LETTER-SPACING:normal;TEXT-INDENT:0px">Currently I just test the demo in Ubuntu-Linux.</p>


<p style="WHITE-SPACE:normal;TEXT-TRANSFORM:none;WORD-SPACING:0px;COLOR:rgb(51,51,51);FONT:15px/25px Helvetica,arial,freesans,clean,sans-serif;MARGIN:15px 0px;LETTER-SPACING:normal;TEXT-INDENT:0px"></p>
<p style="WHITE-SPACE:normal;TEXT-TRANSFORM:none;WORD-SPACING:0px;COLOR:rgb(51,51,51);FONT:15px/25px Helvetica,arial,freesans,clean,sans-serif;MARGIN:15px 0px;LETTER-SPACING:normal;TEXT-INDENT:0px">BR</p><span><font color="#888888">
<p style="WHITE-SPACE:normal;TEXT-TRANSFORM:none;WORD-SPACING:0px;COLOR:rgb(51,51,51);FONT:15px/25px Helvetica,arial,freesans,clean,sans-serif;MARGIN:15px 0px;LETTER-SPACING:normal;TEXT-INDENT:0px">Jiao Xianjun<br></p></font></span></div>

</div>
<div>
<div>
<div class="gmail_extra"><br></div></div></div></blockquote></div></div></div></div></div></div></div></div></blockquote></div><br></div>
</blockquote></div><br></div>