Installing The Software

here are the steps to install the software for the Beagle Bone as well as the OpenROV cape =Installing the OpenROV Image=

Windows Instructions
To install the OpenROV image onto the BeagleBone you will need:
 * The BeagleBone
 * A micro-SD card with 4gb or more
 * A SD card reader
 * A computer

Follow these steps:
 * 1) Download the pre-made compressed image file from here
 * 2) Uncompress it with a suitable tool (we recommend using 7-Zip
 * 3) If the SD-card already has a linux image on it (when you put it into your computer it sees 2 partitions, or it only sees the 64MB BOOT partition), reformat it to clear the partition with this SD formatter utility. Doing a quick format is sufficient to erase the partitions.
 * 4) Get the Win32DiskImager Utility from here. To run the program, go into the downloaded directory and double click on the application.
 * 5) Click on the folder icon, and select the image file "OpenROV-Image.img" and click "save". Make sure that whatever Drive is selected under "Device" is indeed your SD card (It should NOT be C:, or else you will overwrite your hard drive) ImageInstall_win32DiskImager.png
 * 6) Press 'Write' and wait till its written to the SD card
 * 7) Horray! Now you have a SD card loaded with the OpenROV software

=Building your own image= Recommended only for advanced users The OpenROV image is built by an automated script. This script is developed on in the openrov-image project on GitHub.

= Building from source =

This page has been moved to the Archive.

<!--

Step 1: Get the prebuilt image for ubuntu and install it.
Complete directions are here: http://elinux.org/BeagleBoardUbuntu#Demo_Image

I installed an image from the link above. After I did I was unable to install g++ in Step 3. A dependencie for g++, a kernel library, could not be retrieved. I resolved the issue by updating to a new kernel and repeating Step 3 below. --Dan Myers (talk) 16:49, 20 October 2012 (PDT)

Step 2: Change the user name and password.
Login as default user (ubuntu):

ssh -l ubuntu __IP__ Password: temppwd

Then change to root:

su Password: root

Add a temporary user:

useradd -m temp passwd temp Password: temppwd adduser temp sudo

Switch to temp user then change primary account name/password:

logout; if ubuntu still logged in:

su, then: pkill -KILL -u ubuntu

ssh -l temp __IP__ su usermod -l rov -m -d /home/rov ubuntu passwd rov Password: OpenROV exit exit

Login as new user (rov):

ssh -l rov __IP__ Password: OpenROV

Delete temporary user:

su userdel -r temp exit

su vi /etc/hostname (change to openrov) vi /etc/hosts (change to openrov) reboot

Step 3: Update/upgrade software and install rerequisits
sudo apt-get update sudo apt-get install g++ curl cmake pkg-config libv4l-dev libjpeg-dev git build-essential subversion libssl-dev vim

Step 4: Install nvm (Node Version Manager):
cd ~ git clone git://github.com/creationix/nvm.git ~/.nvm echo ". ~/.nvm/nvm.sh" >> .bashrc echo "export LD_LIBRARY_PATH=/usr/local/lib" >> .bashrc echo "export PATH=$PATH:/opt/node/bin" >> .bashrc export LD_LIBRARY_PATH=/usr/local/lib export PATH=$PATH:/opt/node/bin

Step 5: Try to install Node.js (it will not compile V8 properly)
nvm install v0.8.2

Step 6: Fix V8 to compile
We use a patch that was done to let Node.js run on a Raspberry PI (very simillar hardware):

git clone https://github.com/gflarity/node_pi.git cd ~/.nvm/src/node-v0.8.2

Now apply the patch appropriate for your version of Node.js:

git apply --stat ~/node_pi/v0.8.2-release-raspberrypi.patch

Then set the following exports for use during compilation:

export GYP_DEFINES='armv7=0' export CXXFLAGS='-march=armv6 -marm -mfpu=vfp -mfloat-abi=hard -DUSE_EABI_HARDFLOAT' export CCFLAGS='-march=armv6 -marm -mfpu=vfp -mfloat-abi=hard -DUSE_EABI_HARDFLOAT'

Step 7: Install Node.js
./configure make sudo GYP_DEFINES="armv7=0" CCFLAGS='-march=armv6' CXXFLAGS='-march=armv6' make install

echo "nvm use v0.8.2" >> .bashrc

Step 8: Download and Install OpenCV
git clone git://code.opencv.org/opencv.git cd opencv mkdir release && cd release cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_TESTS=OFF -D BUILD_EXAMPLES=ON .. make && sudo make install

Step 9: Download OpenROV ROVision
cd ~ git clone git://github.com/OpenROV/openrov-software.git

''Note: Current version of openrov software has a problem with the current version of node express. codewithpassion's development branch has a preliminary fix. repo is here: https://github.com/codewithpassion/openrov-software.git''

cd openrov-software/ edit ~/.bashrc

export LD_LIBRARY_PATH=/usr/local/lib

Step 10: Fix SSL errors and download required Node.js modules
Fix SSL (just don't use secure connection...):

npm config set registry http://registry.npmjs.org/

Download modules:

npm install express socket.io serialport

Step 11: Try it out!
NODE_ENV=production node app.js

From the browser of another computer on the network, navigate to http://openrov:8080 (or use the IP address of the Beagleboard)

Step 12: Back it up!
If you want to make a backup of the image, plug the microSD card back in your pc and enter the command (replace /dev/sdX with the correct device for your SD card):

-->