1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-11-05 17:46:25 +00:00
gnss-sdr/drivers/gr-gn3s/README.md

115 lines
3.8 KiB
Markdown
Raw Normal View History

2015-07-18 10:14:21 +00:00
# How to build gr-gn3s
2015-07-18 10:02:02 +00:00
Source maintainer: Javier Arribas (jarribas at cttc.es)
This document describes how to build the GN3S V2 GPS Sampler GNU Radio Source USB 2.0 driver.
2015-07-18 22:58:30 +00:00
More information on the device (not available anymore) can be found at http://www.sparkfun.com/products/8238
2015-07-18 10:02:02 +00:00
2015-07-18 22:58:30 +00:00
The driver core is based on Gregory W. Hecker driver available at http://github.com/gps-sdr/gps-sdr.
2015-07-18 10:02:02 +00:00
2015-07-18 22:58:30 +00:00
GR-GN3S is a GNU Radio's compliant signal source block intended to be used either with GNSS-SDR as a signal source or as
2015-07-18 10:14:21 +00:00
standalone signal source block instantiated from a GNU Radio flowgraph from C++ or using Python (also includes a gnuradio-companion interface).
2015-07-18 10:02:02 +00:00
2015-07-18 10:14:21 +00:00
## Install GNU Radio:
2015-07-18 10:02:02 +00:00
2015-07-18 10:09:41 +00:00
You can install GNU Radio through a .deb package *or* by using pybombs. Please choose only **one** procedure.
2015-07-18 10:02:02 +00:00
2015-07-18 10:09:41 +00:00
- In Ubuntu 12.10 and later:
2015-07-18 10:02:02 +00:00
~~~~~~
$ sudo apt-get install gnuradio-dev
~~~~~~
2015-07-18 10:09:41 +00:00
- Semi-automatic installation of GNU Radio:
2015-07-18 10:02:02 +00:00
Downloading, building and installing [GNU Radio](http://gnuradio.org/redmine/projects/gnuradio/wiki "GNU Radio's Homepage") and all its dependencies is not a simple task. We recommend to use [PyBOMBS](http://gnuradio.org/redmine/projects/pybombs/wiki "Python Build Overlay Managed Bundle System wiki") (Python Build Overlay Managed Bundle System), the GNU Radio install management system that automatically does all the work for you. In a terminal, type:
~~~~~~
$ git clone git://github.com/pybombs/pybombs
$ cd pybombs
~~~~~~
Configure PyBOMBS:
~~~~~~
$ ./pybombs config
~~~~~~
You can safely accept the default options but for ```prefix```. We recommend to put ```/usr/local``` there. After the configuration, you should get something similar to:
~~~~~~
gituser = username
prefix = /usr/local
satisfy_order = deb,src # For Debian/Ubuntu/LinuxMint
satisfy_order = rpm,src # For Fedora/CentOS/RHEL/openSUSE
forcepkgs =
forcebuild = gnuradio,uhd,gr-osmosdr,rtl-sdr,...
timeout = 30
cmakebuildtype = RelWithDebInfo
builddocs = OFF
cc = gcc
cxx = g++
makewidth = 4
~~~~~~
Then, you are ready to download and install GNU Radio and all their required dependencies by doing:
~~~~~~
$ sudo ./pybombs install gnuradio
~~~~~~
This can take some time (up to two hours to complete, depending on your system), and downloads, builds and installs the latest versions of the Universal Hardware Driver (UHD) and GNU Radio in your system, including all their dependencies.
In case you do not want to use PyBOMBS and prefer to build and install GNU Radio step by step, follow instructions at the [GNU Radio Build Guide](http://gnuradio.org/redmine/projects/gnuradio/wiki/BuildGuide).
2015-07-18 10:14:21 +00:00
## Get the latest version of GNSS-SDR:
2015-07-18 10:02:02 +00:00
2015-07-18 10:09:41 +00:00
~~~~~~
2015-07-18 10:02:02 +00:00
$ git clone git://github.com/gnss-sdr/gnss-sdr
$ git checkout next
2015-07-18 10:09:41 +00:00
~~~~~~
2015-07-18 10:02:02 +00:00
2015-07-18 10:14:21 +00:00
## Build GR-GN3S:
2015-07-18 10:02:02 +00:00
- Go to GR-GN3S root directory and compile the driver:
~~~~~~
$ cd gnss-sdr/drivers/gr-gn3s
$ cd build
$ cmake ../
$ make
~~~~~~
2015-07-18 22:58:30 +00:00
NOTE: If you have installed GNU Radio via the gnuradio-dev package, you might need to use ```cmake -DCMAKE_INSTALL_PREFIX=/usr ../``` instead of ```cmake ../``` in order to make the module visible from gnuradio-companion once installed.
2015-07-18 10:02:02 +00:00
- If everything went fine, install the driver as root
~~~~~~
$ sudo make install
$ sudo ldconfig
~~~~~~
2015-07-18 10:14:21 +00:00
## Check that the module is usable by gnuradio-companion
2015-07-18 10:05:16 +00:00
Open gnuradio-companion and check the gn3s_source module under the GN3S tab.
2015-07-18 10:02:02 +00:00
In order to gain access to USB ports, gnuradio-companion should be used as root.
In addition, the driver requires access to the GN3S firmware binary file.
It should be available in the same path where the application is called.
GNSS-SDR comes with a pre-compiled custom GN3S firmware available at gnss-sdr/firmware/GN3S_v2/bin/gn3s_firmware.ihx.
Please copy this file to the application path.
2015-07-18 10:14:21 +00:00
## Build gnss-sdr with the GN3S option enabled:
2015-07-18 10:02:02 +00:00
~~~~~~
$ cmake -DENABLE_GN3S=ON ../
$ make
$ sudo make install
~~~~~~