RTL-SDR Driver Installation from ZIP files

Need help installing or figuring out something about your SDR? Ask here.
Post Reply
N4HCI
Posts: 10
Joined: Mon Jan 28, 2019 10:44 am

RTL-SDR Driver Installation from ZIP files

Post by N4HCI » Thu Feb 07, 2019 1:59 pm

This email is seeking guidance on how to install modified RTL-SDR drivers from unzipped files and consolidates the unanswered portions of prior postings How UNINSTALL rtl-sdr? and Unable to Direct Sample from RTL_TCP with Version 3 Dongle.

Background: I am trying to set up some RTL-SDR V3 dongles for use on WebSDR, which requires that the dongles be able to be put into direct frequency sampling control from the terminal command line.

I successfully installed, as shown below, and used the baseline drivers to communicate with V3 dongles, but found that this did not provide a command line direct frequency sampling control option (requires a '-D' flag option in the rtl_tcp program). A modified set of drivers is available at https://www.rtl-sdr.com/V3. But these driver files are provided in a zip file format, which is easy enough to unzip but I cannot figure out how to take these unzipped files and use them to install a set of compiled drivers for the RTL-SDR V3 dongles.

Initial Successful Installation (No direct frequency sampling capability provided) Steps:
git clone git://git.osmocom.org/rtl-sdr.git
cd rtl-sdr/
mkdir build
cd build
cmake ../ -DINSTALL_UDEV_RULES=ON
make
sudo make install
sudo ldconfig
sudo cp ../rtl-sdr.rules /etc/udev/rules.d/
addition of 'blacklist dvb_usb_rtl28xxu' to a file 'flacklist-rtl.conf' in the '/etc/modprobe.d' folder as administrator

Unzipped V3 drivers File Structure
After unzipping the modified V3 drivers available at the above link, the files are all in a top level folder 'pkg-rtl-sdr' instead of the 'rtl-sdr' folder that was the top level folder of the original installation. This top level folder has a rich set of folders and files beneath it, some of which are similar to those of the original installation, but there are notable differences. Some of this folder structure is shown in png images at the following Dropbox links:
- pkg-rtl-sdr folder - https://www.dropbox.com/s/y8it8rhv6my8x ... y.png?dl=0
- pkg-rtl-sdr/build folder - https://www.dropbox.com/s/1anv4xlcz1zzw ... y.png?dl=0
- pkg-rtl-sdr/build/CMakeFiles folder - https://www.dropbox.com/s/v96ll8762qkej ... y.png?dl=0
- pkg-rtl-sdr/CMake folder - https://www.dropbox.com/s/2fs01lyzqc32k ... y.png?dl=0

QUESTIONS:
Q1. What is the approach to installing programs/drivers from zipped files?
- I have attempted a number of cmake, make, and make install options from the pkg-rtl-sdr folder, only to get various error statements about either not matching or not finding root level files (/root/rtl-sdr-drivers-from-source/pkg-rtl-sdr/build). There are NO files/folders under /root named 'rtl-sdr-drivers-from-source'.
- I have renamed the 'pkg-rtl-sdr' folder to 'rtl-sdr' (after renaming the original 'rtl-sdr' folder to 'rtl-sdr_original') and repeated the cmake, make and make install attempts, without success.
- I note that there is a file in the 'pkg-rtl-sdr/build' folder named 'cmake_install.cmake' and it notes as a comment in its first line that it is an install script for '/root/rtl-sdr-drivers-from-source/pkg-rtl-sdr' which is the name of the root level folders that are reported missing in the 1st comment under Q1. I attempted to execute this install script via 'bash /root/rtl-sdr-drivers-from-source/pgk-rtl-sdr' but that gives me a syntax error in the command 'set (CMAKE_INSTALL_PREFIX "usr/local")' noting that the token 'CMAKE_INSTALL_PREFIX' was unexpected.

Q2. Should these modified drivers be installed as modifications to the existing installed drivers, or as fresh driver installation with no prior RTL-SDR V3 driver installations?

IF SOMEONE HAS SUCCESSFULLY INSTALLED THE PIETER-TJERK MODIFIED DRIVERS AT THE ABOVE LINK https://www.rtl-sdr.com/V3), PLEASE INDICATE HOW YOU DID THIS.

Hopefully,
Bob Goodwin, N4HCI

tim_rtd
Posts: 90
Joined: Fri Jun 30, 2017 11:34 am

Re: RTL-SDR Driver Installation from ZIP files

Post by tim_rtd » Thu Feb 07, 2019 6:59 pm

Bob, open the src directory that's under the build directory. If someones compiled the build already you'll see the files under /src
If you see rtl_test, try it ..... as ..... ./rtl_test
I usually shy away from these builds....BUT if I had to do something...perhaps delete the build directory and everything under it.

mkdir build again
cd /build
cmake ../ ....udev...
do the rest of the steps again.....

Hope this helps...
I still suspect you may see an undefined library message after success build.
there may be libraries left over in /usr/lib ....
something like librtsdr.so ....you'll have to remove rtl-sdr again...delete those rtlsdr libs and build a third time.

N4HCI
Posts: 10
Joined: Mon Jan 28, 2019 10:44 am

Re: RTL-SDR Driver Installation from ZIP files

Post by N4HCI » Thu Feb 07, 2019 7:59 pm

Tim,
Thanks again. You were right. There are some compiled files under the sub-directory of pkg-rtl-sdr/src I have attempted to show you a screen image (below) that is a listing of the files/directories in pkg-rtl-sdr/src and the results of running the './' command option for the 'rtl_test' file (which strangely is named 'rtl_test.c'. The './' option to run the file did not work but the command 'bash rtl_test.c' gave the responses indicated.

Image

Does this suggest a next step to you?

Bob Goodwin, N4HCI
Attachments
pkg-rtl-src stroke src (compiled files).png
pkg-rtl-src stroke src (compiled files).png (99.44 KiB) Viewed 12472 times

tim_rtd
Posts: 90
Joined: Fri Jun 30, 2017 11:34 am

Re: RTL-SDR Driver Installation from ZIP files

Post by tim_rtd » Thu Feb 07, 2019 8:02 pm

Nope, look under /build/src

I'll be home in a hour to play...working on someone else's dime at the moment...Didn't look at your attachments yet......

N4HCI
Posts: 10
Joined: Mon Jan 28, 2019 10:44 am

Re: RTL-SDR Driver Installation from ZIP files

Post by N4HCI » Thu Feb 07, 2019 10:47 pm

Thanks Tim. That worked. Not sure why I failed to execute your instructions correctly the first time but I'll pretend it is old age and not a lack of attention to detail.

Thank you again. This has been driving me to distraction. Now all I need to do is figure out why it is not providing the '-D' direct frequency control option as it is supposed to.

Bob Goodwin, N4HCI

tim_rtd
Posts: 90
Joined: Fri Jun 30, 2017 11:34 am

Re: RTL-SDR Driver Installation from ZIP files

Post by tim_rtd » Thu Feb 07, 2019 10:54 pm

Not working -D ? ...I'm looking at the exact same build as you right now. There is a -D in the ./rtl_tcp -h.
While in that /build/src directory you need to use the ./rtl_tcp ..... If you just use rtl_tcp without the ./ ....your using a different build rtl_tcp that reside somewhere else like the /bin. There a re a couple commands to try and play with ...
> which rtl_tcp
> whereis rtl_tcp

If you see the -D option and your using ./rtl_tcp ...still not getting direct sample...This only works with the silver Nooelect units v2 and V3 ... I believe...

tim_rtd
Posts: 90
Joined: Fri Jun 30, 2017 11:34 am

Re: RTL-SDR Driver Installation from ZIP files

Post by tim_rtd » Fri Feb 08, 2019 12:05 am

So Bob, you doing the FT8 thing?

N4HCI
Posts: 10
Joined: Mon Jan 28, 2019 10:44 am

Re: RTL-SDR Driver Installation from ZIP files

Post by N4HCI » Sun Feb 10, 2019 1:39 pm

Tim, despite my telling you it was successful less the creation of the '-D' option, I later discovered that I had performed the steps using the original driver directories and NOT the downloaded modified drivers. With help from Pieter-Tjerk, I have now completely installed those modified drivers and they do provide the '-D' option. I have posted a summary of this at viewtopic.php?f=7&t=4484

Thank you for your help.

Now to go play with it and determine what else I don't know.

Bob, N4HCI

Post Reply