| | 176 | |
| | 177 | \subsubsection{Installing Portions of GNU Radio} |
| | 178 | \label{section:installation:source:dependencies:ubuntu} |
| | 179 | OSSIE uses a small subset of GNU Radio to communicate and configure the USRP. The |
| | 180 | following steps will walkthrough installing portions of GNU Radio. |
| | 181 | |
| | 182 | First, GNU Radio's dependencies must be installed. Install the Engineering |
| | 183 | and Scientific packages as well as the Software Development packages as root entering |
| | 184 | the command: |
| | 185 | |
| | 186 | \begin{lstlisting}[] |
| | 187 | # yum groupinstall "Engineering and Scientific" "Development Tools" |
| | 188 | \end{lstlisting} |
| | 189 | |
| | 190 | Additional utilities such as the FFT library and the CPP Test Framework must also be |
| | 191 | installed. As root, enter the following command |
| | 192 | |
| | 193 | \begin{lstlisting}[] |
| | 194 | # yum install fftw-devel cppunit-devel wxPython-devel libusb-devel \ |
| | 195 | guile boost-devel alsa-lib-devel numpy |
| | 196 | \end{lstlisting} |
| | 197 | |
| | 198 | The Small Device C Compiler, SDCC, must be installed: |
| | 199 | |
| | 200 | \begin{lstlisting}[] |
| | 201 | # yum install sdcc |
| | 202 | \end{lstlisting} |
| | 203 | |
| | 204 | The path for the SDCC must be set. Open the .bashrc file and add the path to the end |
| | 205 | of the file. To open the file, enter the command: |
| | 206 | |
| | 207 | \begin{lstlisting}[] |
| | 208 | $ vim ~/.bashrc |
| | 209 | \end{lstlisting} |
| | 210 | |
| | 211 | Add the following path to the end of the file: |
| | 212 | \begin{lstlisting}[] |
| | 213 | export PATH=/usr/libexec/sdcc:$PATH |
| | 214 | \end{lstlisting} |
| | 215 | |
| | 216 | At this point, all of the GNU Radio dependencies have been installed. Now, the GNU Radio |
| | 217 | software must be installed. |
| | 218 | |
| | 219 | Download the GNU Radio source code by entering the command: |
| | 220 | \begin{lstlisting}[] |
| | 221 | $ svn co http://gnuradio.org/svn/gnuradio/branches/releases/3.1 gnuradio |
| | 222 | \end{lstlisting} |
| | 223 | |
| | 224 | Move into the {\tt gnuradio} directory and start building the source code by entering the |
| | 225 | following commands: |
| | 226 | |
| | 227 | \begin{lstlisting}[] |
| | 228 | $ cd gnuradio/ |
| | 229 | $ ./bootstrap |
| | 230 | $ ./configure --disable-all-components --enable-gnuradio-core \ |
| | 231 | --enable-usrp --enable-gr-usrp --enable-omnithread |
| | 232 | \end{lstlisting} |
| | 233 | |
| | 234 | This sets up the install to only build resources for the USRP which OSSIE requires. |
| | 235 | Compile the source code by entering the command: |
| | 236 | |
| | 237 | \begin{lstlisting}[] |
| | 238 | $ make |
| | 239 | \end{lstlisting} |
| | 240 | |
| | 241 | Verify that the compile worked by running a check: |
| | 242 | |
| | 243 | \begin{lstlisting}[] |
| | 244 | $ make check |
| | 245 | \end{lstlisting} |
| | 246 | |
| | 247 | Install the portions of GNU Radio by running the following command as root: |
| | 248 | |
| | 249 | \begin{lstlisting}[] |
| | 250 | # make install |
| | 251 | \end{lstlisting} |
| | 252 | |
| | 253 | The libraries installed by GNU Radio need to be linked: |
| | 254 | |
| | 255 | \begin{lstlisting}[] |
| | 256 | # /sbin/ldconfig |
| | 257 | \end{lstlisting} |
| | 258 | |
| | 259 | At this point, GNU Radio and its dependencies have been installed. Now setup the |
| | 260 | proper permissions for the USRP. As root, create a group which will have access |
| | 261 | to the USRP: |
| | 262 | |
| | 263 | \begin{lstlisting}[] |
| | 264 | # /usr/sbin/groupadd usrp |
| | 265 | \end{lstlisting} |
| | 266 | |
| | 267 | Add users to the group which need access to the USRP: |
| | 268 | |
| | 269 | \begin{lstlisting}[] |
| | 270 | # /usr/sbin/usermod -G usrp -a USERNAME |
| | 271 | \end{lstlisting} |
| | 272 | |
| | 273 | Now that users will have access to the USRP, read and write access to the device |
| | 274 | must be created. As root, open the file {\tt /etc/udev/rules.d/10-usrp.rules} in |
| | 275 | a text editor: |
| | 276 | |
| | 277 | \begin{lstlisting}[] |
| | 278 | # vim /etc/udev/rules.d/10-usrp.rules |
| | 279 | \end{lstlisting} |
| | 280 | |
| | 281 | Add the following text to the file: |
| | 282 | |
| | 283 | \begin{lstlisting}[] |
| | 284 | ACTION=="add", BUS=="usb", SYSFS{idVendor}=="fffe", \ |
| | 285 | SYSFS{idProduct}=="0002", GROUP:="usrp", MODE:="0660" |
| | 286 | \end{lstlisting} |
| | 287 | |
| | 288 | The text above is displayed on two lines due to the contraints on page size, however |
| | 289 | the text must appear on a single line, without the backslash, in the file for the |
| | 290 | access to the USRP to work properly. You may also add the following comment lines to |
| | 291 | the file for future reference: |
| | 292 | |
| | 293 | \begin{lstlisting}[] |
| | 294 | # rule to grant read/write access on USRP to group named usrp. |
| | 295 | # to use, install this file in /etc/udev/rules.d/ as |
| | 296 | # 10-usrp.rules |
| | 297 | \end{lstlisting} |
| | 298 | |
| | 299 | The USRP interface has now been created. As an optional test, connect the USRP |
| | 300 | to the computer and run the following command: |
| | 301 | |
| | 302 | \begin{lstlisting}[] |
| | 303 | $ ls -lR /dev/bus/usb |
| | 304 | \end{lstlisting} |
| | 305 | |
| | 306 | The users root and usrp should now be listed under the user groups. |