Update Software

This page will guide you through the steps necessary to update your OpenROV BeagleBone and Cape

=Updating the Beagle Bone= If you use the OpenROV BeagleBone Image you can update the OpenROV software using these steps.

You will need:
 * The OpenROV BeagleBone with a working image
 * A router connected to the internet
 * A computer connected to router network
 * Ethernet cable/tether

Step 1: Find the IP address of the BeagleBone
In order to update the OpenROV software, the BeagleBone will need to access the internet to pull down the latest software. Therefore, the BeagleBone will need to be connected to a router that has internet access. When connected to the router, the OpenROV BeagleBone will acquire a dynamic IP address. In order to connect to the BeagleBone, this IP address must be looked up! Follow these steps to find your BeagleBone's IP address.

In the following steps I will refer to this the IP address as "YourROVIPaddress". In all the instances where "YourROVIPaddress" is used in a command, use the IP address that you found and wrote down.
 * 1) Connect the tether of the ROV or directly connect a patch cable from the BeagleBone to a router connected to the internet
 * 2) Power up the BeagleBone (it is recommended to power the BeagleBone through its microUSB port rather than just the OpenROV batteries since the update procedure can take some time)
 * 3) Wait about 1 minute for the system to boot up
 * 4) Make sure your computer is connected to the router (either wirelessly or wired)
 * 5) Direct your web browser to your router's IP address (usually 192.168.1.1) and log into the router (Default IP addresses for Linksys is 192.168.1.1, D-link and netgear is 192.168.0.1, and Belkin is 192.168.2.1) See this guide for more info if you need help
 * 6) Pull up the list of connected devices, typically this menu is called something like "List of Clients" or "DHCP reservation". Google around to find specific instructions for your router model
 * 7) Lookup and write down the IP address of the OpenROV. The OpenROV client name will be listed as "OpenROV"

Step 2: Connect to the BeagleBone
Now that you have the IP address for the OpenROV you can connect to the BeagleBone through creating a SSH connection

To use SSH from Windows
In order to SSH from Windows you will need a SSH client. We recommend using PuTTY
 * 1) Start up PuTTY and enter in the the IP address for the OpenROV in the box labeled "Hostname or IP address"
 * 2) Click on "Open" to start the connection
 * 3) A Console screen should pop up
 * 4) if it is your first time establishing a SSH connection to the BeagleBone it will ask for you to accept its authentication, click on Yes/accept
 * 5) When it prompts for "login as:" type in "rov" and hit enter
 * 6) It will then prompt for "rov@YourROVIPaddress's password". Type in "OpenROV" and hit enter; as you type the characters will not display on the screen for security(yes your keyboard is still working :P)
 * 7) It should then display a welcome prompt, followed by "rov@OpenROV:~$". This is the command line interface for the BeagleBone.
 * 8) Congrats! You are now logged in to the BeagleBone and you can now enter in commands directly to the BeagleBone

To use SSH from OSX

 * 1) Click on spotlight and type in "terminal" to find and open up a terminal console
 * 2) Create a secure connection to the BeagleBone as user rov by typing in the following and hitting enter afterwards
 * 3) The first time around it will ask you if you wish to add the remote host to the list of known hosts; type in yes and hit enter
 * 4) It will then prompt you to enter in the user and password. Enter "rov" as the user and "OpenROV" as the password
 * 5) Congrats! You are now logged in to the BeagleBone and you can now enter in commands directly to the BeagleBone

To use SSH from linux

 * 1) Open up a terminal
 * 2) Create a secure connection to the BeagleBone terminal as user rov by typing in the following and hitting enter afterwards
 * 3) The first time around it will ask you if you wish to add the remote host to the list of known hosts; type in yes and hit enter
 * 4) It will then prompt you to enter in the user and password. Enter "rov" as the user and "OpenROV" as the password
 * 5) Congrats! You are now logged in to the BeagleBone terminal and you can now enter in commands directly to the BeagleBone

Step 3: Update the OpenROV Software
Now that you are logged in, you can now update the OpenROV software

Guide for first-timers
If you haven't used a command-line interface terminal before it may seem daunting, but don't be afraid! If you can type, hit backspace and enter, and copy and paste text, its pretty much it :D. This is a good basic overview of the using the terminal

Getting around the terminal

To enter in commands to the terminal, you simply enter in the text and hit enter to execute them. Simple as that!

To enter commands you can type in, or you can copy and paste them into the terminal. Copying and pasting is a little bit different in the terminal. Copy commands on this page with the typical Control+C, but to paste: When a command is finished running, the terminal will output "rov@OpenROV:~$" to indicate it is ready to take another command
 * If you are using PuTTY in Windows, right click to paste
 * If you are using OSX or Linux, use Control+Shift+V to paste

Using the Update Script
If you are updating the BeagleBone for the first time based on the image, it is recommended to do a manual update

The quickest way to update the OpenROV is to use the update script.
 * 1) Change directories to where the OpenROV Cockpit Server files are with this command
 * 2) Start the update script in this directory by running this command
 * 3) The update procedure should take a few minutes, and will give you output to tell you if it is successful or if you had errors
 * 4) Connect to the OpenROV through your web browser by navigating to "YourROVIPaddress:8080" to see if it worked!

If you receive any errors try doing a Manual Update. You can review the last 20 lines of the OpenROV logs by typing:

Doing a Manual Update
Follow these steps to do a manual update of the OpenROV software if the update script doesn't work


 * 1) Shutdown the OpenROV software first by running this command. It will ask you for the password which is "OpenROV"
 * 2) Change your directory to /opt
 * 3) Backup your the current OpenROV software by moving it into a new folder called "openrov_old"
 * 4) Download the most recent software from the main Github branch with this command
 * 5) Start the OpenROV software again
 * 6) If the OpenROV doesn't start and you see this lines that contain npm errors: "npm ERR!" you can do the following This process will run for a few minutes
 * 7) When the node packages have finished installing, you can startup OpenROV again
 * 8) Connect to the OpenROV through your web browser by navigating to "YourROVIPaddress:8080" to see if it worked!

=Updating the OpenROV Cape =

Updating the Cape through the Cockpit interface
The easiest way updating the Cape is through using the OpenROV cockpit interface Note: It is a known issue that sometimes this update procedure doesn't work due to timing issues with reseting the Arduino with the BeagleBone. Try rebooting the BeagleBone and trying again or doing a manual update. Discussion in the forums
 * 1) In your chrome web browser, connect to the OpenROV Cockpit by navigating to "http://YourROVIPaddress:8080/"
 * 2) In the cockpit, click on "settings" to bring up the Settings menucockpitUpdate4.png
 * 3) Press the "Upload" button to bring up the "Upload Arduino Firmware" menuapply8.png
 * 4) Press "Apply New Firmware" to update the firmware on the Cape Arduino apply9.png
 * 5) Click on "show details" to see the detailed progress of the updating procedure
 * 6) It will give you feedback in the console to tell you when the updating has finished

Updating the Cape manually
To update the Cape manually, you will need an Arduino and the Arduino IDE installed on your computer If you haven't programmed an Arduino before, It is recommended you read through this guide
 * 1) Remove the Arduino DIP chip from the Cape and the Arduino(Make sure you are grounded, so you don't statically shock and fry the chip!)
 * 2) Place the Arduino chip from the Cape into the Arduino board (make sure the keyed notch on the chip matches the key on the chip holder on the Arduino Board)
 * 3) Download the OpenROV software from here, clicking on the ZIP buttonDownload_openROVzip.png
 * 4) Unzip the file
 * 5) Open the OpenROV.ino file using the Arduino IDE which resides under /openrov-software/arduino/OpenROV
 * 6) Connect the Arduino board to your computer (which should have the Cape's Arduino Chip on it)
 * 7) In the Arduino IDE, click on the Tools menu dropdown, and make sure that under the selection "Board", "Arduino Uno" is selected
 * 8) Also under the Tools menu dropdown, make sure that under the selection "Serial Port", a COM port is selected (That should be the Arduino)
 * 9) Click on the upload button (the small round button with an Arrow on it in the top left corner) to upload the OpenROV codeArduinoUpdateManual_IDE.png
 * 10) The console at the bottom of the IDE should indicate when the new firmware has been successfully written!