Difference between revisions of "OpenBTS: Install UHD untuk USRP1"

From OnnoWiki
Jump to navigation Jump to search
Line 1: Line 1:
 +
==Handling USRP1==
 +
 +
Lakukan
 +
 +
sudo addgroup usrp
 +
sudo usermod -G usrp -a <YOUR_USERNAME>
 +
echo 'ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="fffe", ATTR{idProduct}=="0002", GROUP="usrp", MODE="0666"' > tmpfile
 +
sudo chown root.root tmpfile
 +
sudo mv tmpfile /etc/udev/rules.d/10-usrp.rules
 +
 +
Reload udev
 +
 +
sudo udevadm control --reload-rules
 +
 +
atau
 +
 +
sudo /etc/init.d/udev stop
 +
sudo /etc/init.d/udev start
 +
 +
atau
 +
 +
sudo killall -HUP udevd
 +
 +
Kita dapat mencek jika [[USRP]] telah di kenali dengan mengamati /dev/bus/usb setelah [[USRP]] di pasang menggunakan perintah
 +
 +
ls -lR /dev/bus/usb | grep usrp
 +
 +
Harusnya akan keluar seperti
 +
 +
crw-rw-r-- 1 root usrp 189, 263 Jun  5 09:09 008
 +
 +
Setiap [[USRP]] yang terpasang akan terdaftar pada group 'usrp' dan mode 'crw-rw----'.
 +
 
==Instalasi Pendukung==
 
==Instalasi Pendukung==
  
Line 54: Line 87:
  
 
Image UHD ada di /usr/local/share/uhd/images
 
Image UHD ada di /usr/local/share/uhd/images
 
  
  

Revision as of 05:12, 25 January 2014

Handling USRP1

Lakukan

sudo addgroup usrp
sudo usermod -G usrp -a <YOUR_USERNAME>
echo 'ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="fffe", ATTR{idProduct}=="0002", GROUP="usrp", MODE="0666"' > tmpfile
sudo chown root.root tmpfile
sudo mv tmpfile /etc/udev/rules.d/10-usrp.rules

Reload udev

sudo udevadm control --reload-rules

atau

sudo /etc/init.d/udev stop
sudo /etc/init.d/udev start

atau

sudo killall -HUP udevd

Kita dapat mencek jika USRP telah di kenali dengan mengamati /dev/bus/usb setelah USRP di pasang menggunakan perintah

ls -lR /dev/bus/usb | grep usrp

Harusnya akan keluar seperti

crw-rw-r-- 1 root usrp 189, 263 Jun  5 09:09 008

Setiap USRP yang terpasang akan terdaftar pada group 'usrp' dan mode 'crw-rw----'.

Instalasi Pendukung

sudo apt-get -y install libfontconfig1-dev libxrender-dev libpulse-dev \
gcc-4.7 g++ automake libtool python-dev libfftw3-dev \
libcppunit-dev libboost-all-dev libusb-dev fort77 \
libsdl1.2-dev python-wxgtk2.8 subversion git-core guile-1.8-dev \
libqt4-dev python-numpy ccache python-opengl libgsl0-dev \
python-cheetah python-lxml doxygen qt4-dev-tools \
libqwt5-qt4-dev libqwtplot3d-qt4-dev pyqt4-dev-tools \
libpcre3 libpcre3-dbg libpcre3-dev libpcrecpp0 \
python-wxgtk2.8 python-wxtools wx2.8-i18n libwxgtk2.8-dev libgtk2.0-dev \
autoconf libtool libosip2-dev libortp-dev \
libusb-1.0-0-dev g++ erlang bison flex \
apache2 php5 php5-xmlrpc php5-mysql php5-gd php5-cli php5-curl \
mysql-client mysql-server libphp-adodb libgd2-xpm libgd2-xpm-dev \
php5-curl php-pear autoconf libtool libosip2-dev libortp-dev \
libusb-1.0-0-dev g++ erlang libreadline6-dev libboost-all-dev \
cmake build-essential subversion \
build-essential autoconf cvs sox pkg-config git-core subversion \
libgsm1-dev libgsm1 php5-cli python-setuptools python-pip

Install SDCC

Sebaiknya jangan mengcompile dari source code karena membuat pusing kepala. Install sdcc sebaiknya langsung dari file .deb saja.

cd /usr/local/src
wget -c http://launchpadlibrarian.net/38703081/sdcc_2.9.0-5_amd64.deb
wget -c http://launchpadlibrarian.net/38689168/sdcc-libraries_2.9.0-5_all.deb
dpkg -i sdcc_2.9.0-5_amd64.deb sdcc-libraries_2.9.0-5_all.deb

Download Source Code UHD

echo "/usr/local/lib" >> /etc/ld.so.conf
cd /usr/local/src
git clone git://ettus.sourcerepo.com/ettus/uhd.git uhd.git

Compile UHD

cd /usr/local/src/uhd.git/host/
mkdir build
cd /usr/local/src/uhd.git/host/build
cmake -DENABLE_LIBUHD=ON -DENABLE_EXAMPLES=ON -DENABLE_UTILS=ON -DENABLE_TESTS=ON ../
make
make test
make install
ldconfig


Download Image UHD

/usr/local/lib/uhd/utils/uhd_images_downloader.py

Image UHD ada di /usr/local/share/uhd/images


Install UHD USRP ke udev

cd /usr/local/share/uhd/utils
sudo cp uhd-usrp.rules /etc/udev/rules.d/
sudo udevadm control --reload-rules