<div dir="ltr">Hi Peter, thanks so much for your reply,<br><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Nov 11, 2013 at 6:00 AM, Peter Stuge <span dir="ltr"><<a href="mailto:peter@stuge.se" target="_blank">peter@stuge.se</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">Michel Pelletier wrote:<br>
> I'm expecting that there will be no reliable correlation.<br></div>I do know USB and libusb and the key in this case is how bulk<br>
transfers are scheduled on the bus - namely optimized for throughput.<br>
Bulk transfers fill whatever bus time is free up to the maximum<br>
throughput the device can handle.<br>
<br>
And even if we imagine that you could have two host controllers with<br>
a synchronized schedule (not possible without rewriting the kernel<br>
USB stack) you still don't know what happens inside the USB device,<br>
there is no guarantee that it doesn't introduce jitter too.<br>
<br>
USB is not a low latency synchronized interconnect, it is optimized<br>
for throughput.<br>
<br>
Reliable scheduling over USB *is* possible, but not using bulk and<br>
not with too high throughput.<br></blockquote><div><br></div><div>Rasz has pointed out in a follow up message that two coherently clocked dongles will buffer data internally and the actual arrival time of the data in-process is irrelevant.  I think the important point is the event time that the sampling is triggered, and getting the two triggering events to be as closely synchronized as possible.  It seems to me that the jitter would be more predictable, and minimized, if it were the case that rtlsdr could setup two bulk transfers in the same process, and wait on those two devices in the same libusb_handle_events_* call.</div>
<div><br></div><div>You have a point in general that you don't know what is going on inside the usb device, and for things like hard drives or network devices that seek or wait on external physical processes (the movement of a head, the arrival of a packet) would have no predictable timing.  But it seems to me the rtl dongles have no external physical dependency like that, when you tell them to sample it happens as soon as the dongle receives the command.  The data is buffered, and then transferred to the host at some later point.</div>
<div><br></div><div>What I want to achieve is the minimizing of the time between the two triggering events and then measuring that jitter.  I'd like to setup the experiment where two coherently clocked dongles both sample from a good timing source, say the GPS L1 frequency, and then compare the two sample blocks against each other to see how they are offset against each other in time and if that offset is reasonably bound across many samples.  It seems like I will need to do a little hacking to setup a process capable of this functionality, and will report back with any information I have.</div>
<div><br></div><div>-Michel</div></div></div></div>