Information about the sampling rate of the RTLSDR driver
leif at sm5bsz.com
Mon Dec 17 13:52:48 UTC 2012
Each sample is I and Q with 8 bit each. That is 2 bytes.
When you sample at 2.048 Ms/s you get 4096 bytes/ms so your
observation that it takes 2 ms to fill the buffer is fine:-)
The buffer size is not critical. In my project Linrad it is
a user parameter because small buffers may be useful for
radio amateurs who want a small delay from antenna to
loudspeaker when doing two-way communication while larger
bufers may be helpful on slower computers.
I tried buffers from 2048 bytes to 524288 without errors
on a fast computer.
You are not doing anything wrong:-)
> I am testing a DVB-T USB key including the Elonics E4000 chipset and I want to check the sampling rate of this card.
> I set up the sampling rate at 2.048 Ms/s (rtlsdr_set_sample_rate), and my storing buffer is 8*1024 bytes, so I expect receiving 1024 I/Q samples every 500 microseconds.
> I am using the rtlsdr_read_async function to read the samples.
> Unfortunately the loop in my program indicates that 8*1024 bytes are read every 2 milliseconds.
> I am using the gettimeofday function to measure the time in microseconds.
> Does this result mean that the best I can do is to read some samples every 2 ms at 2.048 Ms/s. This would mean that I am missing 1.5 ms of signal.
> Is that correct or I am doing something wrong ?
> Thanks for your help.
> Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
> pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
> a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
> France Telecom - Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.
> This message and its attachments may contain confidential or privileged information that may be protected by law;
> they should not be distributed, used or copied without authorisation.
> If you have received this email in error, please notify the sender and delete this message and its attachments.
> As emails may be altered, France Telecom - Orange is not liable for messages that have been modified, changed or falsified.
> Thank you.
More information about the osmocom-sdr