Setup Ocean over USB on OSX

OCEAN IS IN BETA!

This guide applies to the Ocean BETA units that will ship in February 2016.

If you find a bug while using your Ocean and would like to report it, please send us an email about it!

This aim of this guide is to help you set up a new Ocean in less than five minutes, using USB on OSX. After working through this guide, your Ocean will be connected to your WiFi network, and you should be able to access it via ssh.

Prerequisites on Mac OSX

Make sure you've gone through the Prerequisites for OSX before starting with this section.

Step 1. Power on the Ocean and connect the USB

Hold the top button on the top panel of the Ocean, in the middle of the blue logo, for at least two seconds.

When the Ocean powers on, two red lights will begin glowing on the internal panel, and a green lightshow will begin at the bottom right hand corner of the case. The power button contains a small LED light that will glow white once the OS is ready to talk to your computer using the screen program.

(Note that we had to edit this photo to show the lights more prominently!)

Power on your Ocean to show the red lights. When the Ocean is ready to connect, the white light will glow

Plug the micro-USB connector to your Ocean, and then plug the standard USB connector to your computer.

Step 2. Start the screen program

We use the screen program to talk to the Ocean over a USB modem interface. screen use a device name to connect to the device, but we first have to find the name of the device. Type the following into your console to find out what device to connect to:

$ ls /dev/tty.usbmodem*

If your Ocean is connected, you should get something like the following. This is the name of the device we'll use when starting screen:

/dev/tty.usbmodem1421

Copy the device name, the paste it in the screen command like this:

$ screen /dev/tty.usbmodem1421 115200

If you still have trouble starting screen on OSX, check the troubleshooting section.

IMPORTANT NOTE ABOUT SCREEN!

When screen starts successfully, everything on your terminal window will disappear!

This is expected behavior! Keep going!

Step 3. Start the Ocean console

While in screen, type the following:

console

Two things will happen after this. The power button light will change color, from white to blue.

After this, you should see standard linux login prompt:

$ console
ev s1

Debian GNU/Linux 8 FineRock ttyS2

FineRock login:

Note that every Ocean device has a unique name assigned to it. FineRock is the name of the test device we used to create this document. Your device will have a different name.

Step 4. Login to your Ocean

The initial root login and password is as follows:

Login: root
Password: iloveocean

When you login with these entries, a setup program will run on the Ocean, prompting you to change your password, and to setup a WiFi network:

$ console
ev s1

Debian GNU/Linux 8 FineRock ttyS2

FineRock login: root
Password:

Step 5. Follow the steps in the setup program

When you login to your Ocean for the first time, a setup program will run automatically. This program will ask you to change your root password. It will also, optionally, prompt you to select a WiFi network for the Ocean. Setting up a WiFi network is strongly recommended!

The setup program will first prompt you to change your root password, like so.

Welcome to Ocean! Let's update your password and setup your WiFi.
Let's change your Ocean's password first.
Enter your new PASSWORD [ENTER]:

You'll be asked to type the new password twice.

Retype your new PASSWORD [ENTER]:

Next, you will be asked to connect to a WiFi router. The program will automatically detect WiFi routers that your Ocean can access:

Great! Your Ocean's password is now changed. Next, let's setup your WiFi.
Would you like to setup your WiFi? [Y/n]:

You can enter n if you'd prefer to continue using your Ocean through the USB connection.

Would you like to setup your WiFi? [Y/n]: y
Scanning for networks ...                    
    1. ESSID:"Ocean Home"
    2. ESSID:"Ocean Guest"
    3. ESSID:"Android Hotspot"
Is your WiFi network visible? [Y/n]:

You can enter n if you'd prefer to type in the name of a hidden WiFi router.

Is your WiFi network visible? [Y/n]: y
Enter the number of the network you want to connect to [ENTER]: 1
You are about to attempt to connect to the "Ocean Home" network. Continue? [Y/n]: y

You will next be prompted to type a password for the wifi network you wish to connect to:

Enter the PASSWORD for the "Ocean Home" network [ENTER]:
Retype your PASSWORD for the "Ocean Home" network [ENTER]:

You may need to wait for up to a minute for your Ocean to establish a connection with your chosen network.

Please wait while we attempt to connect you to the network...

Once the connection has been established, you will see the following messages:

You have successfully connected to Network "Ocean Home".
Your device's IP is 10.0.30.64.
To use ssh to connect your Ocean, type the following into another console:
        ssh root@MeatyAlarm.local
Run 'wifi-setup start' at any time to setup another WiFi address.
Enjoy using your Ocean :)

If possible, make a note of your IP address above! You'll be using it to connect to your Ocean unit in a later step.

Finally, you'll receive a standard terminal prompt like the following:

root@FineRock:~#

Step 6. Exit setup mode

To exit setup mode, tap the power button again. The power button light will disappear, the green buttons will flash, and the Ocean will restart itself to complete the setup process.

Your Ocean is now set up and ready to use!

Restarting your Ocean may take up to 2 minutes!

This is a known issue, and we are working on a fix for it.

Troubleshooting

OSX: screen won't start

Verify that your computer can detect the Ocean. On your terminal, type the following:

$ ls /dev/tty.usbmodem*

If your Ocean is powered on, you have a USB connection between the Ocean and your computer, and the USB cable is working correctly, you should see something like the following:

/dev/tty.usbmodem1411

OSX: screen starts, but it shows an error message and shuts down!

There are two things to do in this situation:

  • Close your current console window and open another one.
  • Unplug the USB cable, and plug it back in again.

OSX: I have more than one USB modem device attached

If you have more than one USB modem device connected, you need to find the device name of the USB modem running on the Ocean. Type the following into the console:

$ ls /dev/tty.usbmodem*

Disconnect your device, and re-run ls /dev/tty.usbmodem* to find the name of the device. The device that connected should no longer show in the list. You can then deduce the name of the device name to use with screen by disconnecting and reconnecting device while running ls /dev/tty.usbmodem* (if you know of a better way of doing this, please let us know.

Next, copy your preferred USB modem device name into the terminal prompt after screen, for example:

$ screen /dev/tty.usbmodem1412 115200

Next steps

Connect to your Ocean with ssh