Information about the sampling rate of the RTLSDR driver

frederic.evennou at orange.com frederic.evennou at orange.com
Mon Dec 17 14:41:38 UTC 2012


Thanks for your help.
I though IQ samples were encoded on 8 bytes.
This explains my error.

Cheers
Frederic


-----Message d'origine-----
De : osmocom-sdr-bounces at lists.osmocom.org [mailto:osmocom-sdr-bounces at lists.osmocom.org] De la part de Leif Asbrink
Envoyé : lundi 17 décembre 2012 14:53
À : osmocom-sdr at lists.osmocom.org
Objet : Re: Information about the sampling rate of the RTLSDR driver

Hello Frederic,

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:-)

Leif


> Hello,
> 
> 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.
> Frederic
> 
> 
> _________________________________________________________________________________________________________________________
> 
> 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.
> 
> 


_________________________________________________________________________________________________________________________

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 mailing list