Difference between revisions of "GNURadio: Ubuntu 12.10 Instal GNURadio 3.4.2"

From OnnoWiki
Jump to navigation Jump to search
Line 80: Line 80:
 
  cd /usr/local/src/qwt-6.0.2/
 
  cd /usr/local/src/qwt-6.0.2/
 
  qmake
 
  qmake
 +
make
 +
make install
 +
 +
==Instal SDCC==
 +
 +
Install secara manual SDCC. Download dari
 +
* http://sourceforge.net/projects/sdcc/files/snapshot_builds/amd64-unknown-linux2.5/sdcc-snapshot-amd64-unknown-linux2.5-20121219-8246.tar.bz2/download
 +
* http://sourceforge.net/projects/sdcc/files/
 +
* http://sourceforge.net/projects/sdcc/files/sdcc-linux-x86/3.2.0/
 +
 +
 +
cp    /usr/local/src
 +
cd /usr/local/src
 +
tar -xvf sdcc-src-2.6.0.tar.gz
 +
cd sdcc-src-2.6.0
 +
./configure
 
  make
 
  make
 
  make install
 
  make install

Revision as of 10:34, 20 December 2012

Handling USRP

Khusus untuk Ubuntu 12.10 kita tidak bisa menggunakan SYSFS, ganti menjadi ATTR, juga ada beberapa perubahan lainnya Referensi: http://ubuntuforums.org/showthread.php?t=1985915 dan http://askubuntu.com/questions/147272/problem-with-executing-udev-rules-for-olimexs-avr-usb-jtag

Ubuntu menggunakan udev untuk menangani hotplug devices, dan secara default tidak memberikan akses non-root ke USRP. Script berikut akan memberikan akses bagi user untuk menghandel USRP via USB baik secara live atau hot-plug.

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

Pada titik ini, Ubuntu telah di konfigurasi untuk tahu apa yang harus di kerjakan jika medeteksi USRP di USB tapi "udev" perlu me-reload rules untuk memasukan rules yang baru kita buat. Langkah berikut dapat dilakukan sehingga kita tidak perlu me-reboot komputer.

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, 131 Dec 20 09:40 004

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

Instal Library

Update

sudo apt-get update

Instal untuk Ubuntu 12.10

sudo apt-get -y install libfontconfig1-dev libxrender-dev libpulse-dev swig \
g++ automake libtool python-dev libfftw3-dev \
libcppunit-dev libboost-all-dev libusb-dev fort77 sdcc sdcc-libraries \
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 qt4-qmake \
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

Instal SWIG

Install secara manual SWIG

Download dari http://sourceforge.net/projects/swig/files/swig/
cp swig-2.0.9.tar.gz /usr/local/src/
cd /usr/local/src/
tar zxvf swig-2.0.9.tar.gz 
cd /usr/local/src/swig-2.0.9/
./configure
make
make install

Instal QWT

Install secara manual QWT

Download dari http://sourceforge.net/projects/qwt/files/
cp qwt-6.0.2.tar.bz2 /usr/local/src/
cd /usr/local/src/
tar jxvf qwt-6.0.2.tar.bz2 
cd /usr/local/src/qwt-6.0.2/
qmake
make
make install

Instal SDCC

Install secara manual SDCC. Download dari


cp    /usr/local/src
cd /usr/local/src
tar -xvf sdcc-src-2.6.0.tar.gz
cd sdcc-src-2.6.0
./configure
make
make install

Install GNURadio

Sebaiknya pada saat melakukan instalasi GNURadio, kita pasang USRP ke USB port-nya.

Download aplikasi GNURadio dari

http://gnuradio.org/redmine/attachments/download/261/gnuradio-3.4.1.tar.gz
http://gnuradio.org/redmine/attachments/download/279/gnuradio-3.4.2.tar.gz

Install GNURadio

cp gnuradio-3.4.2.tar.gz /usr/local/src/
cd /usr/local/src/
tar zxvf gnuradio-3.4.2.tar.gz 
cd /usr/local/src/gnuradio-3.4.2/

Patch untuk 52MHz

Edit

vi /usr/local/src/gnuradio-3.4.2/usrp/host/lib/usrp_basic.cc

Ubah line 110 menjadi

//  d_verbose (false), d_fpga_master_clock_freq(64000000), d_db(2)
    d_verbose (false), d_fpga_master_clock_freq(52000000), d_db(2)

Edit

vi /usr/local/src/gnuradio-3.4.2/usrp/host/lib/db_bitshark_rx.cc

Ubah line 151 menjadi

// set_clock_scheme(0,64000000);
set_clock_scheme(0,52000000);


OpenBTS 2.6 JANGAN LUPA

  • modifikasi OpenBTS.config agar TRX.Path "../Transceiver52M/transceiver".

Compile & Install

cd /usr/local/src/gnuradio-3.4.2
./configure --disable-usrp2 --enable-usrp
make clean
make all
make
make check
make install
sudo ldconfig

Edit bashrc

Masukan PYTHONPATH dengan cara mengedit

vi ~/.bashrc

Tambahkan

PYTHONPATH=/usr/local/lib/python2.7/dist-packages
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/

Untuk memastikan ada baiknya lakukan

sudo ldconfig
export PYTHONPATH=/usr/local/lib/python2.7/dist-packages
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/


Test

Boot komputer. Sambungan USRP. Lakukan

cd /usr/local/src/gnuradio-3.4.2/gnuradio-examples/python/usrp
./usrp_benchmark_usb.py 

Hasilnya

Testing 2MB/sec... usb_throughput = 2M
ntotal    = 1000000
nright    = 998137
runlength = 998137
delta     = 1863
OK
Testing 4MB/sec... usb_throughput = 4M
ntotal    = 2000000
nright    = 1998117
runlength = 1998117
delta     = 1883
OK
Testing 8MB/sec... usb_throughput = 8M
ntotal    = 4000000
nright    = 3998437
runlength = 3998437
delta     = 1563
OK
Testing 16MB/sec... usb_throughput = 16M
ntotal    = 8000000
nright    = 7998859
runlength = 7998859
delta     = 1141
OK
Testing 32MB/sec... usb_throughput = 32M
ntotal    = 16000000
nright    = 15996766
runlength = 15996766
delta     = 3234
OK
Max USB/USRP throughput = 32MB/sec


=ERROR SDCC

Keluar error

USRP requires sdcc version 2. sdcc not found. See http://sdcc.sf.net
Unable to find firmware compiler SDCC.

Solusi:

Coba

 apt-get install sdcc sdcc-libraries

Referensi

Pranala Menarik

Persiapan

OpenBTS 2.6

OpenBTS 2.8

Multi OpenBTS 2.8

Ettus E110

GPRS

Power Amplifier

Lain Lain

Catatan Legal dan Pendukung

Catatan Sejarah

Dokumentasi Video