Guide for setting up the CarPC with Ubuntu+ROS, auto-logon to Campus Wi-Fi, and SSH server.
The Car PC:
- Plug the CarPC into a 12v battery (or bench power supply), linking the battery's black ground terminal to CarPC's black wire and the battery's voltage terminal to both the Red and White wires on the CarPC. (Connect up your keyboard/mouse/monitor as well)
- Make a bootable thumbdrive containing a fresh ISO download of Ubuntu 14.04 (download it here: http://releases.ubuntu.com/14.04/ubuntu-14.04.4-desktop-amd64.iso), plug the thumbdrive into a USB port on the CarPC, and push the red button on the back of the Car PC to turn the CarPC on. The CarPC should boot into an Ubuntu installer.
- If it doesn't boot into the installer, reboot the CarPC, go into the CarPC's BIOS settings by holding down the Tab key (or ESC key) and chang the boot order priority to boot from your USB thumbdrive first before any other devices (e.g. Hard Drive)
- Install Ubuntu to the hard drive, ignoring the prompt to join a Wi-Fi network. This will take awhile. Reboot if prompted.
- Open a terminal window on the CarPC and make a new directory in your home directory by typing the following:
- cd ~
- mkdir dodcert
- From a different computer, download the DoD Cert file from the NPS website (DoDRootCA3.crt) and put it on a thumbdive. Use the thumbdrive to then copy the DoD certificate file over to the CarPC's hard drive. Put the DoDRootCA3.crt file in the directory you just made, ~/dodcert.
- Get the CarPC on the Campus Wi-Fi's network. In the upper right hand corner of Ubuntu, click on the Wi-Fi icon and try to connect to NPS Wireless. Enter the below Wi-Fi settings when prompted :
Security (if asked): WPA & WPA2 Enterprise
Anonymous Identity: (leave this blank)
CA certificate: (point it to the file DoDRootCA3.crt in the directory ~/dodcert)
PEAP version: Automatic
Inner Authentication: MSCHAPv2
Username: (your NPS username)
Password: (your NPS password)
Note: Give Ubuntu at least 1 minute to try and connect to the NPS Wireless network. You may have to load/reload Firefox a few times and confirm a Security Exception.
- If you want to use the CarPC on the campus network using a wired Ethernet connection, you first need to get the hardware MAC address for your CarPC's Ethernet adapter(s), of which the CarPC has 2 (plus a Wi-Fi adapter). Find out what your Ethernet MAC addresses are by opening a terminal and typing ifconfig. Write down the series the 12 Hexadecimal characters separated by colons that follow the word HWaddr. There should be one MAC address for eth0 and one for eth1, for instance, 3c:07:54:63:3d:dd and 3c:07:54:63:3d:de. Send an email to email@example.com and request that these ethernet MAC addresses be whitelisted for the campus ethernet network.
- Go to https://wiki.nps.edu/display/RC/Ubuntu+14.04%2C+ROS+Indigo+and+MATLAB+2015b and follow all the instructions there (run all scripts unless marked as for "Desktop" or "Laptop" computers). This step will install ROS Indigo.
- These CarPC machines will likely be running in headless mode (no monitor/keyboard/mouse), so setup Ubuntu to log into to your account automatically on boot (since there will be no keyboard/monitor connected to type a username/password). Go to System Settings -> User Accounts and select "Automatic Login".
- One side effect of enabling Automatic Login, is that the user will still be asked to type in a "keyring" password on every single boot-up (the keyring password allows Ubuntu to access the stored Wi-Fi password and log onto NPS Wireless) . As we're going to run headless, we need this to bypass this keyring password prompt and, instead, force Ubuntu to automatically get on the Campus Wi-Fi. So do the following:
Open the password/keyring manager from settings (or run it directly by typing seahorse in the terminal)
In the sidebar, under 'passwords' create a new keyring 'Unprotected'
Right-click the new keyring, and 'set as default'
Right-click the new keyring and set its password as empty
In the 'Login' keyring, delete the network secret for your Wi-Fi network.
Go to the network manager and add the Wi-Fi network again (Step 6 above) - its secret should appear in the default keyring, which has no password.
Set the default keyring back to Login.
- Since the CarPC will be headless, we need to enable an SSH server to let us remotely log into the CarPC from another computer. Install openssh-server by opening a terminal and typing:
sudo apt-get install openssh-server
- Find your CarPC's Wi-Fi IP address on the NPS Wireless by opening a terminal and typing ifconfig. Your IP address will be listed under wlan0, will be immediately followed by the text "inet addr", and will likely start with 172 (e.g. 172.20.145.89).
- From a separate computer on the campus Wi-Fi network, open a terminal window and confirm that you can remotely log into the Car PC via SSH. The format for SSH is: