• 沒有找到結果。

[2015 Fall] Wireless Networking - Fundamentals and Applications Lab3 - LiveUSB SDR Environment Installation Guide

N/A
N/A
Protected

Academic year: 2022

Share "[2015 Fall] Wireless Networking - Fundamentals and Applications Lab3 - LiveUSB SDR Environment Installation Guide"

Copied!
5
0
0

加載中.... (立即查看全文)

全文

(1)

[2015 Fall] Wireless Networking - Fundamentals and Applications Lab3 - LiveUSB SDR Environment Installation Guide

1. Prepare a USB stick with at least 16GB capacity. (32GB is recommended, maybe you will install and run other applications on it)

2. Prepare a computer w1ith Linux OS. Download the follow three files from http://files.ettus.com/liveusb/2.1/

3. Connect the USB stick to the computer, open the terminal and run the follow commands

where /dev/sdX is your USB stick (for example, mine is /dev/sdC, you can use the command: sudo fdisk -l to check the partition)

(You can also refer to http://files.ettus.com/liveusb/2.1/sample_output.txt) (It will take about 20 minutes or more to burn the image…)

4. Boot the liveUSB

Restart your computer, choose the USB in the boot menu.

After enter into the OS, you will see the OS is Ubuntu 12.10(x86) with a green desktop wallpaper.

Your default account is ubuntu and password is NONE.

You will see everything is already installed in the OS, such as GNU Radio and UHD.

chmod u+x create_live_sdr_fs.sh

sudo ./create_live_sdr_fs.sh /dev/sdX fat.zip casper-rw.tar.bz2 1. fat.zip (~ 742M)

2. casper-rw.tar.bz2 (~ 1.3G) 3. create_live_sdr_fs.sh (~ 8.7K)

(2)

5. Compile GNU Radio code Run the following commands

Modify line 29, 30: add gnuradio/ before gr_core_api.h and gr_complex.h

6. Compile UHD code

Download the sample code from the course website

http://www.csie.ntu.edu.tw/~hsinmu/courses/_media/wn_15spring/wn_lab3_co de_v2.zip

Run the following commands

Put single_tx.cpp , single_rx.cpp, single_rx.h and single_tx.h into /home/ubuntu/src/uhd/host/examples

cd /home/ubuntu/src/gnuradio mkdir build

cd build cmake ../

make (It will take about 30~40 minutes or more to build….) sudo make install

sudo vim /usr/local/include/gnuradio/gri_fft.h

cd /home/ubuntu/src/uhd/host/examples

(3)

Add two lines single_tx.cpp, single_rx.cpp around line 39,40

Add /usr/local/lib/libgnuradio-core.so to TARGET_LINK_LIBRARIES at line 47

Now you will see an examples/ directory in the build/ directory.

The above commands only need to do once!!!

In other words, next time when you finish modifying single_tx.cpp or single_rx.cpp in /home/ubuntu/src/uhd/host/examples, just go to /home/ubuntu/src/uhd/host/build/examples and run command

then you will see the execution files (single_tx, single_rx).

vim CMakeLists.txt

cd ../ (now at /home/ubuntu/src/uhd/host/ ) mkdir build

cd build cmake ../

make (It will take about 10~20 minutes to build….) sudo make install

make

(4)

7. Test with USRP

Connect the USRP to the computer (through Ethernet cable).

Power on the USRP.

open the terminal and run the follow commands

where X is a unique number corresponding to a specific interface.

You can use “ifconfig” cmd to check the number.

Devices attached to your system can be discovered.

The sample output will be like this

You will see the ip 192.168.10.x(or 192.168.91.x depend on USRP’s ip) of the USRP.

(If the device is not found, make sure you have connected the Gigabit Ethernet cable and powered on the USRP and do the correct interface configuration.)

Properties of devices attached to your system can be probed.

The sample output will be like this

You will see the name XCVR2450 TX/RX daughterboard(or RFX 2400) which is a high- performance transceiver intended for operation 2.4 GHz and 5.9 GHz range.

sudo service network-manager stop sudo ifconfig ethX 192.168.10.100

uhd_find_devices

uhd_usrp_probe

(5)

Now get ready to execute the program!

Put your src_data_1.bin (generated by signal_generator.m) into wn_trace.

Where A, B are the ip address of two USRPs (one is acted as tx, the other is acted as rx)

8. Get ready to do lab3

It takes about 2~4 hours to complete all things above, please be patient.

Remember to reserve the USRP as soon as possible.

Make sure every step has been done correctly.

You can ask teammates or TAs for help =)

cd /home/ubuntu/src/uhd/host/build/examples mkdir wn_trace

./single_tx --r0=“addr=192.168.91.A” --in=“./wn_trace/src_data_1.bin” --i=128 -- f=2.49

./single_rx --r0=“addr=192.168.91.A” --out=“./wn_trace/recv_signal.bin” --i=128 --f=2.49

參考文獻

相關文件

• You need to know programming (C, python, java, … anything)
 (but not necessarily Matlab).. • You need to know how to find

Too good security is trumping deployment Practical security isn’ t glamorous... USENIX Security

In this homework, you are asked to implement k-d tree for the k = 1 case, and the data structure should support the operations of querying the nearest point, point insertion, and

[r]

Data Usage: You can use only the data sets provided in the competition and follow the rules of the organizers, and you should use the data sets properly. You can use other forms of

Similar objections apply to using a board as a desktop; people will have to get used to using pads and tabs on a desk as an adjunct to computer screens before taking embodied

So we check derivative of f and g, the small one would correspond to graph (b) and the other to (c)(i.e.. Moreover, f is

With the help of the pictures and the words below, write a journal entry about what happened.. Write at least