[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)
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
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
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
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