Configuring a New Heron (Front Seat) Computer


The M300 instruction manual includes instructions for logging into the vehicle and the OEM default username and password. The steps below can be followed when logged in to the default account.

Log Onto the Front Seat


To connect to a factory-fresh M300 Heron:

  • With the M200 turned off, connect an ethernet cable between the payload port of the Heron and a laptop.
  • Configure the laptop to have an ethernet IP of 192.168.1.10, and subnet mask of 255.255.255.0. Clear other settings.
  • Turn off the wifi or other network connections on the laptop.
  • Turn on the Heron.
  • After a couple of minutes, use $ ping 192.168.1.11 to identify when the front seat is up and ready.
  • Connect to the front seat using the default login $ ssh administrator@192.168.1.11 with password clearpath.

Give the Heron and MIT Name


The factory-fresh M300 Heron has a computer name with no meaning on the MIT network. To change the name to one of our choice (using evan as the example):

  • Log into the vehicle
  • Edit /etc/hostname and replace the file contents with the new name
  • Edit /etc/hosts and replace any occurrence of the old name with the new name

Configure the Heron to use the PavLab Network


These instructions describe how to set up the Heron for the PavLab's wireless network which uses WPA2-AES security with PSK Authentication. For instructions on finding the key wpa-psk f*********c used below, follow the instructions for WPA passphrase.

Each vehicle has an ID number related to the first letter of its name. Evan is 5, Felix is 6. The /etc/network/interfaces file from Felix looks like this:

          auto lo
          iface lo inet loopback

          auto wlan0
          iface wlan0 inet static
              address 192.168.1.176
              netmask 255.255.255.0
              gateway 192.168.1.1
              dns-nameservers 8.8.8.8 8.8.4.4
          # if using WPA2-AES with PSK Authentication 
          # use the wpa lines below     
              wpa-driver wext
              wpa-ssid ubntWPA
              wpa-ap-scan 1
              wpa-proto RSN
              wpa-pairwise CCMP
              wpa-group CCMP
              wpa-key-mgmt WPA-PSK
              wpa-psk f*********c
          # if using WEP encryption, comment the wpa lines above
          #  and uncomment the lines below that start with wireless            
              #wireless-essid ubnt
              #wireless-mode  Managed
              #wireless-key1 s:hove*******23
              #wireless-keymode open

          auto eth0
          iface eth0 inet static
              address 192.168.6.1
              netmask 255.255.255.0
              broadcast 192.168.6.255

Logging Back in to the FrontSeat


Now we are ready to disconnect the Ethernet cable between your laptop and the Heron and attempt to log back in over the wireless network.

  • Disconnect the Ethernet cable to the Heron
  • Make sure both Heron antennas are in place
  • Make sure the PavLab WiFi is on, the bullet antenna is plugged in and looking healthy, and that your laptop is connected with a 192.168.1.X IP address (if you're a regular lab user, you may want to get a fixed IP address for your machine).
  • Power cycle the Heron
  • Ping the vehicle
   $ ping 192.168.1.17X   (Where X=4:Jing, 5:Evan, 6:Felix, 7:Gus, 8:Hal, 9:IDA)
  • If you have a ping, go ahead and log on:
   $ ssh administrator@192.168.1.17X

Configuring the DHCP Server


Once you are logged back on to the Heron computer, we want to install a few extra applications. The primary goal at this stage is to install, configure and run a DHCP server on the Heron front-seat to serve computers connected to the Heron Ethernet port - in particular our PABLO computer. To install packages, we'll need access to the internet. Check to confirm access by pinging oceanai or any other external machine:

    $ ping 18.38.2.158

Here are some packages to install:

    $ apt-get install emacs, tcsh, isc-dhcp-server

The last of these packages is the DHCP server. This website: https://help.ubuntu.com/community/dhcp3-server describes in general how to configure a DHCP server. To configure the server for the M300 Heron:

  • Edit /etc/dhcp/dhcpd.conf to look like this (remember to replace .X. with the relevant vehicle number):
     ddns-update-style none;
     subnet 192.168.X.0 netmask 255.255.255.0 {
                 range                      192.168.X.100 192.168.X.100;
                 option routers             192.168.X.1;
                 option subnet-mask         255.255.255.0;
                 option domain-name-servers 192.168.1.1;
                 option broadcast-address   192.168.X.255;
                 default-lease-time         20;
                 max-lease-time             60;
               }
  • Also uncomment the line:
     authoritative;
  • Tell DHCP which interface to use. Edit /etc/default/isc-dhcp-server and edit the line as follows:
            INTERFACES="eth0"
  • Enable packet forwarding between the wireless and wired networks. Edit /etc/sysctl.conf and edit the line as follows:
            net.ipv4.ip_forward=1
  • To start and stop the DHCP service:
     $ sudo service isc-dhcp-server restart
     $ sudo service isc-dhcp-server start
     $ sudo service isc-dhcp-server stop 

Set a New "student" User on the Heron


The OEM vehicle has only the default user installed. Our lab adds the user student with administrator access.

  • Log in as the administrator
  • Add a user with this command:
     $ sudo adduser --system --shell /bin/bash --group student
  • Define the student password with this command:
     $ sudo passwd student
  • Add the user to the sudo list with visudo. Note that this command uses vi-style editing:
     $ sudo /usr/sbin/visudo
  • In the section labeled # User privilege specification , add the following line:
     student ALL=(ALL:ALL) ALL
  • Copy the .bashrc and .profile files from the administrator user account (assuming you are still logged in as the administrator user):
     $ sudo cp ~/.bashrc /home/student/
     $ sudo cp ~/.profile /home/student/
  • Exit the terminal and re-login as the student user.