Setup USRP N210


1) Before setup USRP2, check the ethernet card's interface. The speed of the card should support 1000Mb/s (1Gbs) in PC.
One of the checking tool is 'ethtool'. Install the program as 'sudo apt-get install ethtool' and next execute as 'sudo ethtool eth0'
Then, that's it like speed: 1000Mb/s.
(http://www.raullen.net/2011/02/20/hello-usrp-n210-how-to-make-usrp-n210-running/)
(http://files.ettus.com/uhd_docs/manual/html/build.html)

2) Connect network cable to port physically. Then, setup the host IP to enable the communicate with USRP N210 whose default IP is 192.168.10.2.
$ ifconfig eth0 192.168.10.1
$ ping 192.168.10.2

(you should be able to see the response of USRP N210, otherwise turn off your firewall as 'sudo ufw disable' and check the network connection)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

TIP!!!) <By Yongrok>
If you want not to type IP address to setup the connection with USRP board like "ifconfig eth0 192.168.10.1",
Please, follow these step.

$ sudo apt-get purge network-manager network-manager-gnom

Then, you don't look at the networking setup icons at Ubuntu GUI.

Go to /etc/network/interfaces and revise it.
 
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
        address 192.168.10.1
        netmask 255.255.255.0

auto eth1
iface eth1 inet static
        address 143.248.97.98   // Setup IP Address
        netmask 255.255.255.0
        gateway 143.248.97.1

auto gr0
iface gr0 inet static
        address 192.168.200.1
        netmask 255.255.255.0

/etc/resolv.conf

 nameserver <your IP adress>



As a result , you don't set IP address of ethernet cards(eth0) or virtual cards(gr0) when PC reboots.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`

Follow these steps. You should install cmake as the command 'sudo apt-get install cmake'

cd /usr/local/src
wget https://sites.google.com/site/byungchulweb/gnufile/UHD_003.003.000.tar.gz
tar xvf
UHD_003.003.000.tar.gz
cd uhd/host
mkdir build
cd build
cmake ../
make
make test
sudo make install
sudo ldconfig

cd ..
cd /usr/local/src/
wget https://sites.google.com/site/byungchulweb/gnufile/gnuradio-3.4.2.tar.gz
tar xvf
gnuradio-3.4.2.tar.gz
cd gnuradio
./bootstrap
PKG_CONFIG_PATH=/usr/local/src/uhd/host/build/
export PKG_CONFIG_PATH
./configure --enable-gr-uhd
make
make check
sudo make install
sudo ldconfig


Then, checking if it is succeed to install uhd,

$ uhd_find_devices

We got the result

 linux; GNU C++ version 4.4.3; Boost_104000; UHD_003.002.002-92735f8

7) Setup IP address --------------------------------------------------
-- UHD Device 0
--------------------------------------------------
Device Address:
    type: usrp2
    addr: 192.168.10.2
    name:
    serial: E5R14U9UP

3) Check the LED. We can observe LED B, D, F are on and LED E is flashing:

LED A: transmitting
LED B: mimo cable link
LED C: receiving
LED D: firmware loaded
LED E: reference lock
LED F: CPLD loaded



Note)
http://permalink.gmane.org/gmane.comp.hardware.usrp.e100/119

4) If your PC is rebooting, it will print following messages at the command

UHD Warning:
    The recv buffer could not be resized sufficiently.
    Target sock buff size: 50000000 bytes.
    Actual sock buff size: 131071 bytes.
    See the transport application notes on buffer resizing.
    Please run: sudo sysctl -w net.core.rmem_max=50000000

UHD Warning:
    The send buffer could not be resized sufficiently.
    Target sock buff size: 1048576 bytes.
    Actual sock buff size: 131071 bytes.
    See the transport application notes on buffer resizing.
    Please run: sudo sysctl -w net.core.wmem_max=1048576

So, you should write two message guides.

4) Change USRP's ip address

Assume that we want to change default number to 192.168.10.3

cd /usr/local/share/uhd/utils
sudo ./usrp2_recovery.py --ifc=eth0 --new-ip=192.168.10.3

Then, turn off power switch and reboot.

Finally, it will follow above

$ uhd_find_devices
7) Setup IP address --------------------------------------------------
-- UHD Device 0
--------------------------------------------------
Device Address:
    type: usrp2
    addr: 192.168.10.3
    name:
    serial: E6R14U4UP


5) Burning UHD images to USRP boards

Note) Your PC should be installed python-tk. If not, write this command 'sudo apt-get install python tk'


 
cd /usr/local/share/uhd/utils
sudo ./usrp_n2xxx_net_burner_gui.py


Then, you can see this screen.


7) Setup IP address

Next, download the image files from this site's repository, and extract it.
To burn the image, search two files about firmware and FPGA. (Now, our board's version is R4)
Finally, you select the device ip that you want to burn, and click the button of 'Burn images'

6) Checking GPS signal

If you want to test whether the board is detecting GPS signal, follow these steps.

Go to
$ cd /usr/local/src/uhd/host/examples/

Copy and list up 'gps_test.cpp' file at CMakeLists.txt and install it.
Following is the installing way.

cd ..
cd build
cmake ../
make
make test
sudo make install
sudo ldconfig


Finally, you can check the GPS signal

cd /usr/local/src/uhd/host/build/examples
sudo ./gps_test