OpenBTS: E110 GNURadio

From OnnoWiki
Revision as of 07:43, 12 August 2012 by Onnowpurbo (talk | contribs) (→‎Test)
Jump to navigation Jump to search

Tergantung versi SD Card yang kita miliki, kadang kala GNURadio sudah terinstalasi.

Cek GNURadio

Menggunakan gnuradio-config-info

gnuradio-config-info 
Program options: gnuradio [options]:
  -h [ --help ]         print help message
  --prefix              print gnuradio installation prefix
  --sysconfdir          print gnuradio system configuration directory
  --prefsdir            print gnuradio preferences directory
  --builddate           print gnuradio build date (RFC2822 format)
  -v [ --version ]      print gnuradio version

cek sysconf directory

gnuradio-config-info --sysconfdir
/usr/etc

cek kapan dibuat

gnuradio-config-info --builddate

hasilnya

Wed, 07 Dec 2011 21:58:55

cek prefix

gnuradio-config-info --prefix

hasilnya

/usr

Alternatif Cara Cek

Cek menggunakan perintah

updatedb &
locate gr-
locate gnuradio
locate usrp
locate uhd

Jika ada hasilnya maka GNURadio sudah terinstalasi. Jika tidak ada, maka GNURadio belum terinstalasi.

Compile UHD

Download

opkg remove --force-depends uhd uhd-dev uhd-examples uhd-tests
echo "/usr/local/lib" >> /etc/ld.so.conf
cd ~/src
git clone git://ettus.sourcerepo.com/ettus/uhd.git uhd.git

Compile

cd ~/src/uhd.git/host/
mkdir build
cd ~/src/uhd.git/host/build
cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchains/arm_cortex_a8_native.cmake -DENABLE_E100=ON -DENABLE_USRP_E_UTILS=TRUE -DENABLE_USRP2=OFF -DENABLE_USRP1=OFF -DENABLE_B100=OFF ../
make
make test
make install
ldconfig

atau

cd ~/src/uhd.git/host/
mkdir build
cd ~/src/uhd.git/host/build
cmake -DCMAKE_CXX_FLAGS:STRING="-mcpu=cortex-a8 -mfpu=neon -mfloat-abi=softfp -g" -DENABLE_USRP_E100=TRUE -DENABLE_E100=ON -DENABLE_USRP_E_UTILS=TRUE -DENABLE_USB=OFF -DENABLE_USRP2=OFF ../
make
make test
make install
ldconfig


Install Image 003.004.002-180-gb6bb13bc

rm -Rf /usr/share/uhd/images/*
rm -Rf /usr/local/share/uhd/images/*
cd ~
tar zxvf uhd-images_003.004.002-180-gb6bb13bc.tar.gz
mv ~/uhd-images_003.004.002-180-gb6bb13bc/share/uhd/images/* /usr/local/share/uhd/images/


Hack sedikit

cp /usr/local/bin/uhd_* /usr/bin/
cp ~/src/uhd.git/host/build/lib/libuhd.so* /usr/lib
cp -Rf /usr/share/uhd/images/ /usr/local/share/uhd/

Test

Test

cd ~/src/uhd.git/host/build/examples
./benchmark_rate --rx_rate 500000

Hasilnya kira-kira

linux; GNU C++ version 4.5.3 20110311 (prerelease); Boost_104500; UHD_003.004.003-175-g09de3c07

Creating the usrp device with: ...
-- Opening device node /dev/usrp_e0...
-- Initializing FPGA clock to 64.000000MHz...
-- USRP-E100 clock control: 10
--   r_counter: 2
--   a_counter: 0
--   b_counter: 20
--   prescaler: 8
--   vco_divider: 5
--   chan_divider: 5
--   vco_rate: 1600.000000MHz
--   chan_rate: 320.000000MHz
--   out_rate: 64.000000MHz
-- 
-- Performing wishbone readback test... pass
Using Device: Single USRP:
  Device: E-Series Device
  Mboard 0: E110
  RX Channel: 0
    RX DSP: 0
    RX Dboard: A
    RX Subdev: RFX1800 RX
  TX Channel: 0
    TX DSP: 0
    TX Dboard: A
    TX Subdev: RFX1800 TX 

Testing receive rate 0.500000 Msps

Benchmark rate summary:
  Num received samples:    4998006
  Num dropped samples:     0
  Num overflows detected:  0
  Num transmitted samples: 0
  Num sequence errors:     0
  Num underflows detected: 0

Done!

Compile GNURadio

Cara ini tampaknya aman

opkg remove --force-depends gnuradio gnuradio-dev gnuradio-examples task-gnuradio
cd ~/src
git clone git://gnuradio.org/git/gnuradio.git gnuradio.git
cd ~/src/gnuradio.git
mkdir build
cd ~/src/gnuradio.git/build
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchains/arm_cortex_a8_native.cmake -DQT_QTCORE_INCLUDE_DIR=/usr/include/qt4/QtCore -DQT_QTGUI_INCLUDE_DIR=/usr/include/qt4/QtGui -DQT_QMAKE_EXECUTABLE=/usr/bin/qmake -DENABLE_GR_QTGUI=ON  -DQT_LIBRARY_DIR=/usr/lib -DQT_INCLUDE_DIR=/usr/include/qt4/ -DQT_MOC_EXECUTABLE=/usr/bin/moc -DQT_UIC_EXECUTABLE=/usr/bin/uic -DQT_RCC_EXECUTABLE=/usr/bin/rcc -DCMAKE_BUILD_TYPE=release  ../
make
make install
ldconfig

ALTERNATIF LAIN

buat script

clean-build-gnuradio

Berisi

#!/bin/sh

cd ~/src/gnuradio.git &&
rm -rf build &&
mkdir build &&
cd build &&
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchains/arm_cortex_a8_native.cmake -DQT_QTCORE_INCLUDE_DIR=/usr/include/qt4/QtCore -DQT_QTGUI_INCLUDE_DIR=/usr/include/qt4/QtGui -DQT_QMAKE_EXECUTABLE=/usr/bin/qmake  -DENABLE_GR_QTGUI=ON -DQT_LIBRARY_DIR=/usr/lib -DQT_INCLUDE_DIR=/usr/include/qt4/ -DQT_MOC_EXECUTABLE=/usr/bin/moc -DQT_UIC_EXECUTABLE=/usr/bin/uic -DQT_RCC_EXECUTABLE=/usr/bin/rcc -DQT_QTCORE_LIBRARY=/usr/lib/libQtCore.so -DCMAKE_BUILD_TYPE=release  ../ &&
make &&
make test &&
make install

ALTERNATIF LAIN LAGI

WARNING: Cara ini tidak bisa. Entah kenapa ./bootstrap & ./configure tidak ada.

cd ~/src
git clone git://gnuradio.org/gnuradio.git gnuradio.git
cd ~/src/gnuradio.git
./bootstrap
./configure --enable-uhd --disable-volk --disable-usrp2 --disable-usrp1 --disable-gr-video-sdl CFLAGS="-march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -O3" CXXFLAGS="-march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -O3" -with-qwt-incdir=/usr/include --enable-gr-wxgui
make
make check
make install
ldconfig

Referensi

Pranala Menarik

Persiapan

OpenBTS 2.6

OpenBTS 2.8

Multi OpenBTS 2.8

Ettus E110

Power Amplifier

Lain Lain

Catatan Legal dan Pendukung

Catatan Sejarah

Dokumentasi Video