Dr. SDR Part2 — Installing cellular software for bladeRF (YateBTS)
In the previous part, we discussed setting up the environment to work with your bladeRF hardware. Now, let’s continue discussing different software options for experimenting with SDR.
Today, I will guide you on how to install and configure software for working with cellular networks. It’s important to note that there are some difficulties when working with this software. Many old tutorials found on the internet may not work due to compatibility issues with Linux versions, dependency versions, and bladeRF firmware. However, I will show you a workaround and the proper steps to ensure you can use these tools with the latest available versions.
By following the instructions provided, you’ll be able to install and configure the necessary software for your cellular network experiments successfully.
Disclaimer
When working with SDR development, it is crucial to ensure that you operate within licensed bands. You are responsible for adhering to the regulations and limitations set by the appropriate authorities. Additionally, when conducting laboratory experiments, it is highly recommended to use an RF test enclosure to prevent out-of-band emissions that could interfere with licensed network operators.
YateBTS Installation:
Before proceeding with the installation of YateBTS, ensure that you have already installed all the dependencies and drivers mentioned in the previous section, as YateBTS relies on these libraries during the compilation process.
This installation guide assumes that you want to run Yate as a non-root user and will utilize a yate group to grant permissions for a non-root user to edit various configuration files that will be modified during runtime.
First create a yate
group:
$ sudo addgroup yate
Add your user to this group. Change myuser
to your user name.
$ sudo usermod -a -G yate myuser
Download the latest source code tarball from https://www.nuand.com/support/#bts to ~/software/bts
$ tar xfz yate-*.tar.gz
First, configure the build to install into /usr/local
:
Yate:
$ cd ~/software/bts/yate
$ ./autogen.sh
$ ./configure --prefix=/usr/local
$ make
$ sudo make install-noapi
$ sudo ldconfig
You have to use “make install-noapi” to avoid errors regarding api install
YateBTS:
$ cd ~/software/bts/yatebts
$ ./autogen.sh
$ ./configure --prefix=/usr/local
$ make
$ sudo make install
$ sudo ldconfig
Configuring Yate & YateBTS
To configure Yate & YateBTS to run as a non-root user, we need to change a few permissions and configuration options.
Group Write Permissions:
First, we’ll create a few files that Yate will fill in with defaults:
$ sudo touch /usr/local/etc/yate/snmp_data.conf /usr/local/etc/yate/tmsidata.conf
Next, allow users of the yate
group to modify configuration files:
$ sudo chown root:yate /usr/local/etc/yate/*.conf
$ sudo chmod g+w /usr/local/etc/yate/*.conf
Installing Yate NiPC
NiPC is a WEB GUI interface for YateBTS configuration.
$ sudo apt install apache2 php
$ cd /var/www/html
$ ln -s /usr/local/share/yate/nipc_web nipc
$ chmod a+rw /usr/local/etc/yate/
After installation start apache service:
$ sudod service apache2 start
Go to 127.0.0.1/nipc
If you encounter a white screen while running the software, it indicates that the PHP version may not support certain outdated PHP library code, requiring manual fixing. To address this issue, follow these steps:
- Locate the main.php file.
- Open the main.php file in a text editor.
- Add the following code at the beginning of the file to display errors:
ini_set('display_errors', '1');
ini_set('display_startup_errors', '1');
error_reporting(E_ALL);
By adding this code, PHP will display any errors or warnings encountered during runtime. This will help you identify and address the issues causing the white screen.
Adding the code mentioned earlier will display any errors that occur while executing the code and provide information on where to locate them. By doing so, you can identify the specific errors and address them accordingly.
In your case, the issue was likely related to the fact that the newer version of PHP does not support the use of {}
for array element initialization. To resolve this issue, you can simply change the problematic lines to use []
instead, which is the correct syntax for initializing array elements in newer versions of PHP.
To change code — open it in a console using:
$ sudo nano <path to the file>
To show line numbers you can use the -l
or --linenumbers
flags.
Do not forget to remove code from main.php after fixing everything you need.
If you don’t want to fix it by yourself — you can download already fixed version from github — https://github.com/dr-takeshi/yate-bts
Part 3 — https://medium.com/@dr_takashi/dr-sdr-gsm-network-passive-reconnaissance-using-bladerf-8cee71ab0d9a