Before installing YateBTS, please see Prerequisites.
These instructions are for older versions of YateBTS where the transceiver includes the radio device code as a separate executable. For newer versions see Installing.
Install YateBTS
Download YateBTS
You can download the sources in any directory. For this example, we used the /usr/src directory.
cd /usr/src
svn checkout http://voip.null.ro/svn/yatebts/trunk yatebts
The tarballs can also be downloaded from: http://voip.null.ro/tarballs/yatebts4/
Check dependencies
Make sure you have only one version of the Yate development components.
which -a yate-config
/usr/bin/yate-config
If you see more than one instance of yate-config you must uninstall all but one of them. You can use the –version option to check which version is each:
which -a yate-config
/usr/local/bin/yate-config
/usr/bin/yate-config
/usr/local/bin/yate-config –version
5.5.1
/usr/bin/yate-config –version
5.2.0
The instances in /usr/local are typically installed from sources. Go to the source directory and run make uninstall. The instances in /usr are typically from packages. Use your distro’s package manager to uninstall them.
Run autogen.sh to generate configure script that will check dependencies.
cd yatebts/
./autogen.sh
./configure
Troubleshooting
If you encounter the following error then you need to install libusb1-dev or libusb1-devel and then run ./configure again.
checking for libusb-1.0/libusb.h… no
configure: error: This header file is required.
If you encounter the error below after trying to run the ./configure command, you need to check if you have actually installed Yate.
checking for Yate using yate-config… no
configure: error: Could not find Yate
Install YateBTS
Compile and install YateBTS as follows.
make install
After this, the YateBTS modules/scripts/configurations will be moved in the appropriate directories where other Yate modules/scripts/configurations are located.
Build and Install bladeRF
To actually run YateBTS, you need a Blade RF radio board. You will also need to install the correct version of libbladerf.
For Debian based OS
To install the bladeRF personal packager archive run the following commands:
sudo add-apt-repository ppa:bladerf/bladerf
sudo apt-get update
sudo apt-get install bladerf
To install the compatible firmware and FPGA images run the following commands:
sudo apt-get install bladerf-firmware-fx3
sudo apt-get install bladerf-fpga-hostedx40 # for the 40 kLE hardware
sudo apt-get install bladerf-fpga-hostedx115 # for the 115 kLE hardware
You must update the firmware manually by running the command:
bladeRF-cli –flash-firmware /usr/share/Nuand/bladeRF/bladeRF_fw.img
Build bladeRF
To build the bladeRF libraries and tools from sources following the steps below. You will need version 0.14.0 release of libbladeRF. you can get a copy from http://voip.null.ro/tarballs/misc/ .
You can obtain the appropriate version like this:
wget http://voip.null.ro/tarballs/misc/bladeRF.tar.gz
tar -xzf bladeRF.tar.gz
cd ./bladeRF
ls
CHANGELOG CMakeLists.txt CONTRIBUTORS COPYING debian/
firmware_common/ fx3_firmware/ hdl/ host/ legal/ README.md
Configure the build
Enter the directory that contains the host source. Next, create a directory where the build can be performed in.
cd host/
mkdir build
cd build
To configure the build you need to
- set up a Debug build
- enable the installation of udev rules
- specify that the files need to be installed in the /usr/local directory
Example:
$ cmake -DCMAKE_BUILD_TYPE=Debug -DINSTALL_UDEV_RULES=ON ../
Make sure that the user is in the group specified by the BLADERF_GROUP. By default, enabling the installation of udev rules grants the members of the plugdev group read-write access to bladeRF. You can change the group by specifying
-DBLADERF_GROUP=desired_group
Check the output of the groups command by running:
groups
jon adm cdrom sudo dip plugdev lpadmin sambashare #example
Perform the build and install
Perform the build, install the files in the /urs/local folder or in the location specified by CMAKE_INSTALL_PREFIX and update the share library paths, to enable finding libbladeRF with the following commands:
$ make && sudo make install && sudo ldconfig
Uninstall
From the same directory you can perform the uninstall command:
sudo make uninstall
Note: After successfully installing bladeRF, the file install_manifest.txt is created and it lists all the installed files. We recommend you back up this file if you plan on removing this built directory later on.
More information about bladeRF installation, running and testing can be found here: bladeRF Source, Getting Started: Linux and Getting Started: Verifying Basic Device Operation.