YateBTS installation, running, debug, and tips

Discussions related to embedded firmware, driver, and user mode application software development
Post Reply
robert.ghilduta
Posts: 156
Joined: Thu Feb 28, 2013 11:14 pm

YateBTS installation, running, debug, and tips

Post by robert.ghilduta »

Follow the guide guide and its instructions, with the sole exception of using the latest RC available here: https://nuand.com/downloads/yate-rc.tar instead of pulling Yate's sources from SVN.

UPDATE: RC-2 IS THE LATEST TARBALL. Go to https://www.nuand.com/support/#bts to for the download link and instructions.

Snapshots of bladeRF x40, bladeRF x115, bladeRF 2.0 micro xA4, and bladeRF 2.0 micro xA9 RBFs are included in the tar.

A few key notes:
  • Do not let Yate load the FPGA. The FPGA has to be loaded by bladeRF-cli before Yate runs.

    Code: Select all

    #bladeRF-cli -l hostedxA4.rbf
    *wait 2 seconds*
    #yate
    
  • The bladeRF 2.0 micro takes longer to boot than the bladeRF 1.0. That is anticipated partly due to the longer and more precise calibration it undertakes at initialization.
  • If you are running things on a desktop or laptop that has a GUI, consider giving Yate a higher priority -- https://github.com/Nuand/bladeRF/wiki/S ... g_Priority
  • Some underflow, overflow, as well as other sporadic messages are expected. libusb timeout however errors are not. If you see these errors at startup, `sudo killall -9 mbts yate`, reload the FPGA outside. If you see libusb messages a while after Yate has been running, you may have to adjust the nice level of Yate, or adjust some of the libbladeRF parameters, consult the included in the README in the yate-rc.tar
  • Keep an eye on CPU usage. If Yate is close to 100% CPU utilization, you may need something with more CPU power. Please note Intel HT cores don't help Yate that much, so multiply your CPU usage by 2x if you system has HT/SMT. Especially, keep an eye on CPU utilization when running yate with several -v.
The README contains information on how to finetune the transceiver if it breaks. You will have to edit BrfInterface::initialize() and find the bladerf_sync_config() call corresponding to TX. By adding #define BRF_DEBUG_TX at the top of ybladerf.cpp you will see these output messages (longer log attached):

Code: Select all

TX: when=7586250 (RFtime 7564887) [timediff 21363]
TX: ret=0
TX: when=7587500 (RFtime 7565392) [timediff 22108]
TX: ret=0
The "timediff" number is very important, it is a metric of how well Yate is keeping up. Deviations from a value of 20,000 is not a good sign. However issues really only arise (and they do so visibly) if the time difference number drops below 5,000 (or goes negative) TX bursts will not make it to the FPGA in time to be sent over the SMA port. In this case, consider increasing the "num buffers" and "num transfers" in unison.

For those who are curious, 20000 is the number of samples for 2 subframes, which is how many subframes ahead of time Yate expects to generate.
To calculate how many samples 2 subframes correspond to,
multiply the following:

Code: Select all

   2 subframes
   8 timeslots / subframe
   156.25 symbols / timeslot
   8 IQ samples / symbol

   2*8*156.25*8= 20,000 IQ samples
robert.ghilduta
Posts: 156
Joined: Thu Feb 28, 2013 11:14 pm

Re: YateBTS installation, running, debug, and tips

Post by robert.ghilduta »

Quick note, if you can, please send logs with at least 2 -v Yate if you don't see libusb transfer error.
gee
Posts: 9
Joined: Fri Dec 07, 2018 12:10 am

Re: YateBTS installation, running, debug, and tips

Post by gee »

hey typo in the URL..link is: https://www.nuand.com/downloads/yate-rc.tar

I'll post my logs in a bit
muratsisman
Posts: 8
Joined: Fri Oct 26, 2018 2:54 am

Re: YateBTS installation, running, debug, and tips

Post by muratsisman »

My errors at attachments
gee
Posts: 9
Joined: Fri Dec 07, 2018 12:10 am

Re: YateBTS installation, running, debug, and tips

Post by gee »

Maybe this will help someone - I made a small guide of the commands used to get it up and running for me:

Did a fresh install of ubuntu 18.10 and used these steps:

Code: Select all

$ sudo add-apt-repository ppa:bladerf/bladerf
$ sudo apt-get update
$ sudo apt-get install bladerf
$ sudo apt-get install libbladerf-dev
$ sudo apt-get install bladerf-fpga-hostedxa4
was able to console into the bladeRF-cli and check basic commands.
Now onto Yate:

add yate group & add your user to that group

Code: Select all

sudo addgroup yate
sudo usermod -a -G yate <user>
Next extract the yate-rc tar then inside the yate folder:
***make sure libusb is installed:

Code: Select all

sudo apt-get install libusb1-devel
./autogen.sh
./configure --prefix=/usr/local
make
sudo make install-noapi
sudo ldconfig
go on to build and install yateBTS:

Code: Select all

./autogen.sh
./configure --prefix=/usr/local
make
sudo make install
sudo ldconfig
add some needed files and give permissions:

Code: Select all

sudo touch /usr/local/etc/yate/snmp_data.conf /usr/local/etc/yate/tmsidata.conf
sudo chown root:yate /usr/local/etc/yate/*.conf
sudo chmod g+w /usr/local/etc/yate/*.conf
install apache & php (i didnt try with 7) and create the link to nipc:

Code: Select all

sudo apt-get install apache2
sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt-get install php5.6
sudo ln -s /usr/local/share/yate/nipc_web/ nipc
start apache if it's not running.
check to make sure you've created the correct link. Open a browser: localhost/nipc

Priority scheduling for yate:

Code: Select all

gedit /etc/security/limits.conf
##add these values
@yate hard nice -20
@yate hard rtprio 99
Transceiver scheduling:

Code: Select all

sudo gedit /usr/local/etc/yate/ybts.conf
##add these vaues
radio_read_priority=highest
radio_send_priority=high
Load the RBF:

Code: Select all

bladeRF-cli -l hostedxA4.rbf

Run yate:

Code: Select all

sudo yate
robert.ghilduta
Posts: 156
Joined: Thu Feb 28, 2013 11:14 pm

Re: YateBTS installation, running, debug, and tips

Post by robert.ghilduta »

muratsisman wrote: Thu Dec 13, 2018 3:55 pm My errors at attachments
A few "skipped" messages will occur. The system is overall behaving well.
Please note, only libusb errors are (mostly) unrecoverable errors.
Some underflow, overflow, as well as other sporadic messages are expected.
Thanks for putting together and documenting the steps you took gee!
robert.ghilduta
Posts: 156
Joined: Thu Feb 28, 2013 11:14 pm

Re: YateBTS installation, running, debug, and tips

Post by robert.ghilduta »

The PPAs (software, and FPGA images) are currently changing rapidly. I would strongly suggest using older and stable branches.
My phone was able to register when running the following libbladeRF, and FPGA version.

bladeRF-cli version: 1.7.0-git-6b659c2d
libbladeRF version: 2.1.0-git-6b659c2d

Firmware version: 2.1.0
FPGA version: 0.8.0 ( https://www.nuand.com/fpga/v0.8.0/ )

To build libbladeRF from git commit 6b659c2d, please consult: https://github.com/Nuand/bladeRF/wiki/G ... rom_source
FPGA images can be downloaded directly from https://www.nuand.com/fpga/v0.8.0/
jhutchins
Posts: 6
Joined: Mon Dec 24, 2018 2:48 pm

Re: YateBTS installation, running, debug, and tips

Post by jhutchins »

if ARFCN is 128 shouldnt the peak be around 869.2MHz? I'm getting a peak 300khz higher (869.5) and none of my devices can see the beacon. something is wrong here.
robert.ghilduta
Posts: 156
Joined: Thu Feb 28, 2013 11:14 pm

Re: YateBTS installation, running, debug, and tips

Post by robert.ghilduta »

Please try to transmit a CW at 869.2MHz first and record the peak with a VSA. It may be that the trim dac value may need to be set to the factory value.
jhutchins
Posts: 6
Joined: Mon Dec 24, 2018 2:48 pm

Re: YateBTS installation, running, debug, and tips

Post by jhutchins »

robert.ghilduta wrote: Mon Dec 17, 2018 7:30 am The PPAs (software, and FPGA images) are currently changing rapidly. I would strongly suggest using older and stable branches.
My phone was able to register when running the following libbladeRF, and FPGA version.

bladeRF-cli version: 1.7.0-git-6b659c2d
libbladeRF version: 2.1.0-git-6b659c2d

Firmware version: 2.1.0
FPGA version: 0.8.0 ( https://www.nuand.com/fpga/v0.8.0/ )

To build libbladeRF from git commit 6b659c2d, please consult: https://github.com/Nuand/bladeRF/wiki/G ... rom_source
FPGA images can be downloaded directly from https://www.nuand.com/fpga/v0.8.0/
Switching my libbladerf to this branch fixed the problem. I think I was using the latest master built from source before.
Post Reply