Page 1 of 1

Low Level Information sadly lacking

Posted: Thu Jan 23, 2020 2:55 pm
by theresajayne
I would like to understand more what the Dongles need to work,
I know i can get a driver and use SDR# but I also would like to understand the low level controls that the Driver and Software actually do.

Does it work similar to say a Modem where you have to send AT codes?
Is it like a low level assembly language addressing locations in memory and then poking/peeking bytes on the data line?
I have looked around for a while and there doesn't seem to be any location giving this information for people who would just like to know, or even write new drivers/interface software.

Can anyone point me to the appropriate information or maybe it might be a new area on the site to provide this sort of low level information for tinkerers to possibly use.

Re: Low Level Information sadly lacking

Posted: Fri Jan 24, 2020 2:52 am
by rtlsdrblog
There's no real documentation like this, it's just a matter of going through the driver code and understanding it there.

Most of the magic happens in DSP software code anyway, so a course on DSP would be much more instructive.

Re: Low Level Information sadly lacking

Posted: Fri Jan 24, 2020 11:22 am
by stillrolling
This is an excellent book for learning DSP from the ground up and it's free!

http://www.dspguide.com/

As for 'low level interfacing', it's a bog-standard USB device driver written in C, nothing particularily obscure. If you want to write software around an RTL dongle, you should be looking at GNU-Radio rather than at the driver level.

Looking at the Osmocom source is probably the best start if you insist on driver level interaction though.

https://github.com/osmocom/rtl-sdr

Re: Low Level Information sadly lacking

Posted: Fri Jan 24, 2020 8:07 pm
by hotpaw2
The basic low level information is here: https://github.com/osmocom/rtl-sdr/blob ... ibrtlsdr.c
plus some associated tuner parameters in the headers here: https://github.com/osmocom/rtl-sdr/tree/master/include

It's mostly sending and receiving blocks of raw data using OS calls to do the USB device transfers.
Some of the blocks can contain an I2C address and I2C data for the RTL chip to send to the tuner chip.

For the RTL820T2 tuner chip, various registers are documented here:
https://www.rtl-sdr.com/wp-content/uplo ... iption.pdf
and here:
https://www.rtl-sdr.com/wp-content/uplo ... ocked1.pdf

On Linux systems, talking to USB ports is done via libusb. On Macs, one could use IOKit directly.
Embedded systems have their own USB API.