LimeSDR Getting Started Quickly | LimeSDR上手指南


0x00 概覽

LimeSDR部分特性: USB 3.0 ; 4 x Tx 發射天線接口 6 x Rx 接收天線接口;

可用於Wi-Fi, GSM, UMTS, LTE, LoRa, Bluetooth, Zigbee, RFID等開發測試環境中。

RTL電視棒、HackRF、BladeRF、USRP、LimeSDR參數對比表:

HackRF One的價格,性能參數卻能跟BladeRF甚至USRP媲美!

LimeSDR核心組件:

先上幾張特寫:

主板長10cm,算上USB接口11.5cm:

主板寬5.7cm:

相對於HackRF、BladeRF、USRP這三款主流SDR硬件(USRP mini除外),體積已經很小巧了。LimeSDR其體積實測只有一個iPhone5s的體積大小!

當插上USB供電后,除了上圖顯示的兩顆綠色LED燈,還有一顆一閃一閃的紅色LED燈也在工作。

接下來將分一鍵快速安裝和源碼編譯安裝來使用LimeSDR硬件,推薦使用源碼編譯安裝。

0x01 Mac OSX

1.1 搭建開發環境

Mac OSX當中強烈推薦通過Mac Port 搭建SDR環境,配合源碼編譯達到最佳效果。

1.通過AppStore安裝Xcode https://itunes.apple.com/cn/app/xcode/id497799835?mt=12

2.下載安裝 XQuartz/X11 http://xquartz.macosforge.org/landing

3.下載安裝 MacPorts https://trac.macports.org/wiki/InstallingMacPorts

sudo port search sdr

sudo port install rtl-sdr hackrf  bladeRF uhd gnuradio gqrx gr-osmosdr gr-fosphor

完成之后便可從GayHub上clone源碼並進行編譯安裝。

1.2 源碼編譯LimeSuite

git clone https://github.com/myriadrf/LimeSuite.git
cd LimeSuite
mkdir builddir && cd builddir
cmake ../
make -j4
sudo make install

1.3 源碼編譯UHD驅動&&增加UHD對LimeSDR的支持

jocover基於UHD給LimeSDR開發了LimeSDR的驅動支持OpenUSRP,把LimeSDR來模擬成USRP B210來使用。

git clone https://github.com/EttusResearch/uhd.git
cd uhd/host/lib/usrp
git clone https://github.com/jocover/OpenUSRP.git
echo "INCLUDE_SUBDIRECTORY(OpenUSRP)">>CMakeLists.txt
mkdir build && cd build
cmake ..
make -j4
sudo make install

1.4 添加環境變量

echo 'export UHD_MODULE_PATH=/usr/lib/uhd/modules' >> ~/.bashrc

如果用的是iTerm2+zsh則執行:

echo 'export UHD_MODULE_PATH=/usr/lib/uhd/modules' >> ~/.zshrc

1.5 檢測LimeSDR模擬USRP是否成功:

LimeSDR模擬成USRP B210之后最終的效果跟USRP是一樣的:

uhd_find_devices

uhd_usrp_probe
Mac OS; Clang version 8.1.0 (clang-802.0.38); Boost_105900; UHD_003.010.001.001-MacPorts-Release

Using OpenUSRP
[WARNING] Gateware version mismatch!
  Expected gateware version 2, revision 8
  But found version 2, revision 6
  Follow the FW and FPGA upgrade instructions:
  http://wiki.myriadrf.org/Lime_Suite#Flashing_images
  Or run update on the command line: LimeUtil --update

[INFO] Estimated reference clock 30.7195 MHz
[INFO] Selected reference clock 30.720 MHz
[INFO] LMS7002M cache /Users/cn0xroot/.limesuite/LMS7002M_cache_values.db
MCU algorithm time: 10 ms
MCU Ref. clock: 30.72 MHz
MCU algorithm time: 163 ms
MCU algorithm time: 1 ms
MCU Ref. clock: 30.72 MHz
MCU algorithm time: 104 ms
MCU algorithm time: 1 ms
MCU Ref. clock: 30.72 MHz
MCU algorithm time: 167 ms
MCU algorithm time: 1 ms
MCU Ref. clock: 30.72 MHz
MCU algorithm time: 104 ms
  _____________________________________________________
 /
|       Device: B-Series Device
|     _____________________________________________________
|    /
|   |       Mboard: B210
|   |   revision: 4
|   |   product: 2
|   |   serial: 243381F
|   |   FW Version: 3
|   |   FPGA Version: 2.6
|   |
|   |   Time sources:  none, internal, external
|   |   Clock sources: internal, external
|   |   Sensors: ref_locked
|   |     _____________________________________________________
|   |    /
|   |   |       RX DSP: 0
|   |   |
|   |   |   Freq range: -10.000 to 10.000 MHz
|   |     _____________________________________________________
|   |    /
|   |   |       RX DSP: 1
|   |   |
|   |   |   Freq range: -10.000 to 10.000 MHz
|   |     _____________________________________________________
|   |    /
|   |   |       RX Dboard: A
|   |   |     _____________________________________________________
|   |   |    /
|   |   |   |       RX Frontend: A
|   |   |   |   Name: FE-RX1
|   |   |   |   Antennas: TX/RX, RX2
|   |   |   |   Sensors: temp, lo_locked, rssi
|   |   |   |   Freq range: 30.000 to 3800.000 MHz
|   |   |   |   Gain range PGA: 0.0 to 76.0 step 1.0 dB
|   |   |   |   Bandwidth range: 1000000.0 to 60000000.0 step 1.0 Hz
|   |   |   |   Connection Type: IQ
|   |   |   |   Uses LO offset: No
|   |   |     _____________________________________________________
|   |   |    /
|   |   |   |       RX Frontend: B
|   |   |   |   Name: FE-RX2
|   |   |   |   Antennas: TX/RX, RX2
|   |   |   |   Sensors: temp, lo_locked, rssi
|   |   |   |   Freq range: 30.000 to 3800.000 MHz
|   |   |   |   Gain range PGA: 0.0 to 76.0 step 1.0 dB
|   |   |   |   Bandwidth range: 1000000.0 to 60000000.0 step 1.0 Hz
|   |   |   |   Connection Type: IQ
|   |   |   |   Uses LO offset: No
|   |   |     _____________________________________________________
|   |   |    /
|   |   |   |       RX Codec: A
|   |   |   |   Name: B210 RX dual ADC
|   |   |   |   Gain Elements: None
|   |     _____________________________________________________
|   |    /
|   |   |       TX DSP: 0
|   |   |
|   |   |   Freq range: -10.000 to 10.000 MHz
|   |     _____________________________________________________
|   |    /
|   |   |       TX DSP: 1
|   |   |
|   |   |   Freq range: -10.000 to 10.000 MHz
|   |     _____________________________________________________
|   |    /
|   |   |       TX Dboard: A
|   |   |     _____________________________________________________
|   |   |    /
|   |   |   |       TX Frontend: A
|   |   |   |   Name: FE-TX1
|   |   |   |   Antennas: TX/RX
|   |   |   |   Sensors: temp, lo_locked
|   |   |   |   Freq range: 30.000 to 3800.000 MHz
|   |   |   |   Gain range PGA: 0.0 to 89.8 step 0.2 dB
|   |   |   |   Bandwidth range: 800000.0 to 60000000.0 step 1.0 Hz
|   |   |   |   Connection Type: IQ
|   |   |   |   Uses LO offset: No
|   |   |     _____________________________________________________
|   |   |    /
|   |   |   |       TX Frontend: B
|   |   |   |   Name: FE-TX2
|   |   |   |   Antennas: TX/RX
|   |   |   |   Sensors: temp, lo_locked
|   |   |   |   Freq range: 30.000 to 3800.000 MHz
|   |   |   |   Gain range PGA: 0.0 to 89.8 step 0.2 dB
|   |   |   |   Bandwidth range: 800000.0 to 60000000.0 step 1.0 Hz
|   |   |   |   Connection Type: IQ
|   |   |   |   Uses LO offset: No
|   |   |     _____________________________________________________
|   |   |    /
|   |   |   |       TX Codec: A
|   |   |   |   Name: B210 RX dual ADC
|   |   |   |   Gain Elements: None

➜  ~

1.6 捕獲遙控信號

osmocom_fft -F -f 315e6 -s 2e6

0x02 Ubuntu

2.1 更新軟件包

sudo add-apt-repository -y ppa:myriadrf/drivers
sudo apt-get update
apt-cache search sdr

2.2 安裝SDR常用軟件:

sudo apt-get update
sudo apt-get install git
sudo apt-get install python-pip

pip install --upgrade pip
pip install git+https://github.com/gnuradio/pybombs.git

pybombs recipes add gr-recipes git+https://github.com/gnuradio/gr-recipes.git 
pybombs recipes add gr-etcetera git+https://github.com/gnuradio/gr-etcetera.git

pybombs prefix init /usr/local -a myprefix -R gnuradio-default
pybombs install gqrx gr-osmosdr uhd

2.3 安裝Lime_Suite所需依賴包

#packages for soapysdr available at myriadrf PPA
sudo add-apt-repository -y ppa:myriadrf/drivers
sudo apt-get update

#install core library and build dependencies
sudo apt-get install git g++ cmake libsqlite3-dev

#install hardware support dependencies
sudo apt-get install libsoapysdr-dev libi2c-dev libusb-1.0-0-dev

#install graphics dependencies
sudo apt-get install libwxgtk3.0-dev freeglut3-dev

接下來的源碼編譯過程與在OSX下源碼編譯過程一樣:

2.4 源碼編譯LimeSuite

git clone https://github.com/myriadrf/LimeSuite.git
cd LimeSuite
mkdir builddir && cd builddir
cmake ../
make -j4
sudo make install

執行LimeSuiteGUI啟動LimeSDR的軟件圖形化界面:

2.5 源碼編譯UHD驅動&&增加UHD對LimeSDR的支持

源碼編譯UHD+OpenUSRP

git clone https://github.com/EttusResearch/uhd.git
cd uhd/host/lib/usrp
git clone https://github.com/jocover/OpenUSRP.git
echo "INCLUDE_SUBDIRECTORY(OpenUSRP)">>CMakeLists.txt
cd ../../
mkdir build && cd build
cmake ..
make -j4
sudo make install
sudo ldconfig

2.6 添加環境變量

echo 'export UHD_MODULE_PATH=/usr/lib/uhd/modules' >> ~/.bashrc

2.7 GNURadio使用測試

wget http://www.0xroot.cn/SDR/signal-record.grc
gnuradio-companion signal-record.grc

0x03 Reference

http://www.cnx-software.com/2016/04/29/limesdr-open-source-hardware-software-defined-radio-goes-for-199-and-up-crowdfunding/

https://wiki.myriadrf.org/Lime_Suite

http://linuxgizmos.com/open-source-sdr-sbc-runs-snappy-ubuntu-on-cyclone-v/

原文鏈接:https://cn0xroot.com/2017/04/12/limesdr-getting-started-quickly/


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM