OpenBTS: E110 GNURadio

From OnnoWiki
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

Testing receive rate 0.500000 Msps (10.000000 second run)

    Received packets: 9882
    Received samples: 5000292
    Lost samples: 0
    Lost packets: 0 (approximate)
    Sustained receive rate: 0.500000 Msps   

 Testing receive rate 1.000000 Msps (10.000000 second run)

    Received packets: 19763                  
    Received samples: 10000078               
    Lost samples: 0                          
    Lost packets: 0 (approximate)            
    Sustained receive rate: 1.000000 Msps    

(continued)

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