root/ossiedev/branches/mcarrick/user-guide-0.8.3/Installation.tex @ 11077

Revision 11077, 13.0 KB (checked in by Snyder.Jason, 14 months ago)

moved location of usrp2_socket_opener from /usr/local/bin to /usr/bin

Line 
1% ------------------------------------------------------------------
2%
3%   TITLE: OSSIE 0.8.3 Installation Guide
4% AUTHORS: Mike Ekoniak, Matt Carrick, Drew Cormier, Christopher Covington,
5%          Carl B. Dietrich, Joseph Gaeddert, Benjamin Hilburn,
6%          C. Ian Phelps, Shereef Sayed, Jason Snyder, Haris Volos
7% CREATED:
8% REVISED:
9% 23Mar11 IB Minor typo fixes.
10%     URL: http://ossie.wireless.vt.edu/
11%
12% ------------------------------------------------------------------
13
14\newpage
15\section{Installation}
16\label{section:installation}
17For users that do not have access to a Linux system, or are unfamiliar with Linux, we recommend
18that you use our pre-built VMWare images.  These images have OSSIE pre-installed on them, and are
19ready to use out-of-the-box. Using an OSSIE VMware image is described in
20Section~\ref{section:installation:vmware}.
21
22Although we do not yet provide and support binary installation packages for more Linux
23distributions, compiling OSSIE from source on them should be possible.
24
25To install OSSIE from source, follow the below instructions to install the OSSIE dependencies,
26and then compile and install the source code.
27
28\subsection{Installing OSSIE from Source}
29\label{section:installation:source}
30
31This section assumes that the user is familiar with basic
32Linux commands such as {\tt cd} and {\tt ls} and has sudo
33access or root access.
34
35If you have an older version of OSSIE installed, then you will need to delete the contents of {\tt /sdr/}.
36\begin{lstlisting}[]
37 $ rm -rf /sdr/*
38\end{lstlisting}
39
40Ubuntu is the main supported operating system for OSSIE and the dependencies
41for Ubuntu 11.10 are listed below. After following the instructions, jump to
42Section~\ref{section:installation:source:dependencies:configomni} to continue the install.
43
44\subsubsection{Installing Dependencies on Ubuntu 11.10}
45\begin{lstlisting}[]
46 $ sudo apt-get -y install libtool automake g++ omniorb libomniorb4-dev omniidl \
47        libboost-all-dev libgnuradio-usrp-dev libgnuradio-usrp2-dev libpulse-dev \
48        libsndfile-dev python-omniorb omniidl-python omniorb-nameserver
49\end{lstlisting}
50
51\subsubsection{Configure omniORB}
52\label{section:installation:source:dependencies:configomni}
53All of the dependencies have been installed and one of the dependencies,
54omniORB, needs to be configured. This configuration is done through the
55modification of a file, either {\tt /etc/omniORB.cfg} or
56{\tt /etc/omniORB4.cfg}, depending on the version of the omniORB dependency.
57
58Open the file as root, and search for the following line:
59\begin{lstlisting}[]
60 InitRef = NameService=corbaname::my.host.name
61\end{lstlisting}
62Uncomment the line by deleting the pound or hash character `\#' and change
63it to:
64\begin{lstlisting}[]
65 InitRef = NameService=corbaname::127.0.0.1
66\end{lstlisting}
67Before running the framework you will need to start the naming service. If you
68installed omniORB from source, you have to follow the instructions in
69Appendix~\ref{appendix:omninamessh}. When installing from yum
70{\tt omniNames} will automatically start when you restart your machine. Refer
71to Appendix~\ref{appendix:services} for instructions on how to start the
72omniNames service without restarting your machine or set whether the service
73starts automatically at boot.
74\footnote{You may also manually start a source-compiled tarball package of
75omniNames {\tt omniNames} with the script described in
76Appendix~\ref{appendix:omninamessh}}
77
78\label{section:installation:source:dependencies:gnuradio}
79OSSIE uses a small subset of GNU Radio to communicate with and configure the USRP. The
80following steps will walk through configuring portions the USRP and USRP2 drivers:
81
82To setup the proper permissions for the USRP, as root, create a group which will have access
83to the USRP:
84
85\begin{lstlisting}[]
86 $ sudo /usr/sbin/groupadd usrp
87\end{lstlisting}
88
89Add users to the group which need access to the USRP:
90
91\begin{lstlisting}[]
92 $ sudo /usr/sbin/usermod -G usrp -a USERNAME
93\end{lstlisting}
94
95Now that users will have access to the USRP, read and write access to the device
96must be created. As root, create the file {\tt /etc/udev/rules.d/10-usrp.rules} in
97a text editor:
98
99\begin{lstlisting}[]
100 $ sudo gedit /etc/udev/rules.d/10-usrp.rules
101\end{lstlisting}
102
103Add the following text to the file:
104
105\begin{lstlisting}[]
106 ACTION=="add", BUS=="usb", SYSFS{idVendor}=="fffe", \
107 SYSFS{idProduct}=="0002", GROUP:="usrp", MODE:="0660"
108\end{lstlisting}
109
110The text above is displayed on two lines due to the contraints on page size, however
111the text must appear on a single line, without the backslash, in the file for the
112access to the USRP to work properly. You may also add the following comment lines to
113the file for future reference:
114
115\begin{lstlisting}[]
116 # rule to grant read/write access on USRP to group named usrp.
117 # to use, install this file in /etc/udev/rules.d/ as
118 # 10-usrp.rules
119\end{lstlisting}
120
121The USRP interface has now been created. As an optional test, connect the USRP
122to the computer and run the following command:
123
124\begin{lstlisting}[]
125 $ ls -lR /dev/bus/usb
126\end{lstlisting}
127
128The users root and usrp should now be listed under the user groups.
129
130If you are using the USRP2, it is necessary to have a gigabit ethernet interface and
131intruct the kernel to allow raw socket access to the ethernet port:
132\begin{lstlisting}[]
133 $ sudo chmod u+s /usr/bin/usrp2_socket_opener
134\end{lstlisting}
135
136This step is necessary every time you reinstall GNU Radio.
137
138\subsubsection{Install OSSIE}
139\label{section:installation:source:ossiecf}
140You are now ready to build and install OSSIE. 
141Note that installing by hand requires some knowledge of OSSIE, Linux, and software development.
142
143Download the latest tarball from
144\href{http://ossie.wireless.vt.edu/download/tarballs/\ossieversion/}{http://ossie.wireless.vt.edu/download/tarballs/\ossieversion/}
145\\ and unpack {\tt ossie-\ossieversion.tar.gz}.
146\begin{lstlisting}[]
147 $ wget http://ossie.wireless.vt.edu/download/tarballs/0.8.3/ \
148   ossie-0.8.3.tar.gz
149 $ tar -xvf ossie-0.8.3.tar.gz
150\end{lstlisting}
151
152By default, the installation directory of the OSSIE platform is {\tt /sdr}. In order to install new
153source code and binaries into this directory without root permissions, you need to create and change
154the ownership of {\tt /sdr}.
155\begin{lstlisting}[]
156 $ sudo mkdir /sdr
157 $ sudo chown -R username.username /sdr
158\end{lstlisting}
159where {\tt username} is your user name.
160
161\subsubsection{Using Autoconf}
162\label{section:installation:source:ossiecf:autoconf}
163
164\begin{lstlisting}[]
165 $ cd ossie-0.8.3
166 $ ./configure --prefix=/sdr --libdir=/usr/local/lib/ \
167   --includedir=/usr/local/include/ --with-boost --with-boost-filesystem
168 $ make
169 $ sudo make install
170\end{lstlisting}
171
172If successful, the prompt should say:
173\begin{lstlisting}[]
174*********************************************************
175
176  Complete installation of OSSIE 0.8.3 finished!
177
178*********************************************************
179\end{lstlisting}
180
181If you prefer, or require, a different root directory, then change the
182'--prefix' flag to your appropriate absolute path. If you require the OSSIE
183libraries to be installed to a different location, then change the '--libdir'
184flag to your appropriate absolute path. For further 'configure' options,
185use {\tt configure --help}.
186
187If configure fails, use {\tt aptitude search <dependency name>} to find any missing packages.
188
189\subsubsection{Updating System Libraries}
190\label{section:installation:source:ossiecf:ldconfig}
191Once the OSSIE libraries are installed, they need to be linked.
192As root edit the file {\tt /etc/ld.so.conf}, adding the line
193\begin{lstlisting}[]
194 /usr/local/lib
195\end{lstlisting}
196Now run:
197\begin{lstlisting}[]
198 $ sudo /sbin/ldconfig
199\end{lstlisting}
200
201OSSIE should now be successfully installed on your system. You can skip to
202Section~\ref{section:runningwaveforms} to learn how to run waveforms.
203
204\subsection{Installation of OSSIE Eclipse Feature}
205\label{section:installation:alloefinstall}
206Installation of the OSSIE Eclipse Feature (OEF) requires the installation of OSSIE, Java, and Eclipse.
207
208\subsubsection{Installing Java}
209\label{section:installation:javainstall}
210Eclipse is written in Java, so you must have it installed to run Eclipse and OEF.
211We recommend using Sun's Java Development Kit. As of this writing, the GNU Compiler
212for Java (GCJ) will not work.
213
214\subsubsection{Installing Java on Ubuntu}
215\label{section:installation:javaubuntu}
216
217Open /etc/apt/sources.list in an editor and add the following lines to the end of the file:
218\begin{lstlisting}[]
219 deb http://archive.canonical.com/ubuntu lucid partner
220 deb-src http://archive.canonical.com/ubuntu lucid partner
221\end{lstlisting}
222
223In a terminal, enter the following lines:
224\begin{lstlisting}[]
225 $ sudo apt-get update
226 $ sudo apt-get install sun-java6-jdk
227\end{lstlisting}
228
229\subsubsection{Installing Eclipse}
230\label{section:installation:eclipseinstall}
231Install the Eclipse IDE for Java Developers. Go to
232the \href{http://www.eclipse.org/downloads/}{Eclipse Download Center}
233and download an Eclipse distribution for your platform.
234
235Eclipse is distributed as a tarball archive that you can unpack to location
236of your choice. Pick a location that is appropriate for your platform and
237simply unpack the contents. There is no self-installer, just unpack the distribution.
238Do not install Eclipse in a directory that has spaces anywhere in its full path name.
239
240\subsubsection{Installing OEF}
241\label{section:installation:oefinstall}
242Now that the dependencies have been installed, OEF can be installed.
243
244Move into the unpacked eclipse directory, and start eclipse:
245\begin{lstlisting}[]
246$ cd /path/to/eclipse
247$ ./eclipse
248\end{lstlisting}
249
250After Eclipse starts, on the toolbar select {\tt Help}, {\tt Install New Software}.
251In the new window, select the ``Work with'' textbox and enter the URL: {\tt http://ossie.wireless.vt.edu/eclipse/}
252and select Add. Give a name, e.g., ``OEF''.
253
254The window will then add the URL, OSSIE, OSSIE Waveform Developer
255Feature to the list of available software. Place a check in the box next to OSSIE
256Waveform Developer Feature and click Next. Eclipse will show a window with more details, select Finish to complete the installation process.
257
258%Eclipse will bring up a window which will
259%resolve any dependencies and then start the install guide.
260
261%When the install window opens, make sure OSSIE Waveform Developer Feature is selected and click Next.
262
263%Accept the GNU license agreement and select Next. Eclipse will then begin to download the necessary files, which may take a few minutes.
264Allow Eclipse to restart when it prompts to do so. After it restarts, the OSSIE Eclipse Feature will be installed.
265
266Select the OSSIE perspective within Eclipse. On the toolbar, select {\tt Window},
267{\tt Open Perspective}, {\tt Other}. In the new window, select OSSIE which will then
268open the OSSIE perspective. On the toolbar, select {\tt File}, {\tt New}, {\tt OSSIE Waveform},
269or {\tt OSSIE Component} to start developing.
270
271These same instructions used for installing OEF can be used later to update it to newer versions.
272
273\subsection{Using a VMware Image on Any Platform}
274\label{section:installation:vmware}
275A VMware image of OSSIE \ossieversion\ pre-installed on a Linux operating system is available at \\
276\href{http://ossie.wireless.vt.edu/trac/wiki/Downloads}{http://ossie.wireless.vt.edu/trac/wiki/Downloads}.
277All that is needed to run the virtual image is the VM­Ware Player, available
278for free from \href{http://www.vmware.com/download/player/}{http://www.vmware.com/download/player/}.
279Versions of the player are available for both Windows and Linux.
280
281Install VMware Player on your system, unzip the virtual image and open it.
282For full instructions on installing and using VMware player, please
283consult the VMWare Player User Guide~\cite{vmware:web}.
284
285It is recommended that you keep a copy of the zipped virtual image so that you do
286not need to download the image a second time to start with a fresh copy. Changes
287that you make from within the image will alter it, and in the event of drastic
288unwanted changes, starting afresh is easy if you have an extra copy of the image
289on your hard drive.
290
291% \subsection{Via Ebuild on Gentoo Linux}
292% Support for installation via Gentoo's Portage package management system has not
293% yet been thoroughly tested but ebuilds do exist.
294%
295% To access the ebuilds, install and configure layman if you haven't already:
296% \begin{figure}
297% \begin{lstlisting}[]
298% # emerge layman
299% # echo "source /usr/portage/local/layman/make.conf" >> /etc/make.conf
300% \end{lstlisting}
301% \end{figure}
302%
303% Then, add ossie-overlay to your locally-stored overlays:
304% \begin{figure}
305% \begin{lstlisting}[]
306% # layman -a -o https://ossie.wireless.vt.edu/repos/ossie/experimental/scripts/gentoo/ossie-overlay.xml
307% \end{lstlisting}
308% \end{figure}
309%
310% You can then proceed with installing OSSIE:
311% \begin{figure}
312% \begin{lstlisting}[]
313% # emerge -av ossie
314% \end{lstlisting}
315% \end{figure}
316%
317% After sucessful compiliation of the OSSIE framework and its dependencies, skip
318% to section X.
319
320%\subsection{Embedded Platforms}
321%While installation on embedded platforms is not officially supported in the
322%0.6.2 release, work has been done (MENTION WORK) on porting OSSIE to embedded
323%platforms and we are interested in promoting more work in this area.
324
325
Note: See TracBrowser for help on using the browser.