CI20 Headless Setup

This page describes how to set up your CI20 board for headless operation. This is useful if you don't have an HDMI screen available or don't wish to use one.

Setting up SSH using ethernet and keyboard
If you have a keyboard and ethernet plugged in but no HDMI screen, the ethernet will be connected automatically using DHCP. It is then possible to blindly install the SSH server using the keyboard.


 * 1) Give the CI20 plenty of time to boot.
 * 2) Press Ctrl+Alt+F1 to open TTY 1
 * 3) Type root and press enter
 * 4) Type ci20 and press enter
 * 5) Type apt-get install ssh and press enter
 * 6) Give it a moment and press enter a few times

If all went well you should be able to connect to the CI20 with SSH.

Setting up SSH using serial and WiFi/ethernet
It is possible to set up SSH using only serial and WiFi or ethernet, which may be necessary if you don't have ethernet or a USB keyboard handy.

Getting connected to the serial
The default NAND image uses the UART0 signals with a baud rate of 115200. These signals are accessible from the main expansion header near the camera connector. Note that this header is compatible with the Raspberry Pi's expansion header, so much of the RPi Serial Connection article applies to the CI20.

The easiest approach is to purchase a USB to TTL UART adapter. Something like this would probably do (but don't connect the red VCC wire).

The CI20 Ground, TXD and RXD wires are pins 6, 8 & 10 of the header. These are the 3rd, 4th and 5th pins on the row nearest the edge of the board:

+ + | 2 4 [6  8   10] 12 ... | | 1 3  5   7    9  11 ... | | ^                       |


 * Connect the Ground of the serial cable to the ground on the CI20.
 * Connect the serial cable Tx to the CI20 Rx.
 * Connect the serial cable Rx to the CI20 Tx.

See here for more info on why Tx/Rx are swapped when connecting boards.

See RPi Serial Connection for help setting up the serial console.

Boot
When you plug in the CI20's power connector you will see text output on the serial console. This comes first from U-Boot, which offers you a chance to interrupt the autoboot in order to get to U-Boot's interactive prompt (from which you can load a different kernel).

If the autoboot is allowed to continue it will load and start the Linux kernel which will output its own boot log on the serial console.

Eventually Debian will present a login prompt: Debian GNU/Linux 7 ci20 ttyS0 ci20 login:

The default username and password are both "ci20".

Setting up WiFi
One of the first things you may want to do is set up the network so that you can install an SSH server and connect to the CI20 over SSH. If you have ethernet available with DHCP you can skip this section. If you only have WiFi available then this is complicated by the fact you don't have access to the normal graphical interface.

The default Debian image has Network Manager set up, but unfortunately that version of the Network Manager command line tool (nmcli) cannot create a new WiFi connection, so you'll need to find another way.

You can scan for WiFi networks with nmcli, for example: ci20@ci20:/etc$ nmcli dev wifi SSID                             BSSID               MODE             FREQ        RATE       SIGNAL   SECURITY   ACTIVE 'PlusnetWirelessXXXXXX'          XX:XX:XX:XX:XX:XX   Infrastructure   2412 MHz   54 MB/s    41       WPA WPA2   yes

Network Manager stores system wide connection information in /etc/NetworkManager/system-connections. You'll need to become root to add one (the default password is "ci20"): ci20@ci20:~$ su Password: root@ci20:/home/ci20# cd /etc/NetworkManager/system-connections/

Write a new text file for the WiFi network using your favourite text editor. For example: root@ci20:/etc/NetworkManager/system-connections# nano PlusnetWirelessXXXXXX

If you already have a Linux machine connected to the WiFi network, the contents of the file can come directly from that machine. You will however need to delete any "mac-address=XX:XX:XX:XX:XX:XX" line to allow it to connect.

For example: [connection] id=PlusnetWirelessXXXXXX uuid=68f0fd52-cbb4-4f64-bbbb-65d5c6da68d1 type=802-11-wireless [802-11-wireless] ssid=PlusnetWirelessXXXXXX mode=infrastructure security=802-11-wireless-security [802-11-wireless-security] key-mgmt=wpa-psk psk= [ipv4] method=auto [ipv6] method=auto

Save the file and change the permissions so that only root can read it: root@ci20:/etc/NetworkManager/system-connections# chmod 0600 PlusnetWirelessXXXXXX

Now restart Network Manager: root@ci20:/etc/NetworkManager/system-connections# /etc/init.d/network-manager restart

You can check that the connection was valid by checking that nmcli can see it: root@ci20:/etc/NetworkManager/system-connections# nmcli con list NAME                     UUID                                   TYPE              TIMESTAMP-REAL Wired connection 2       63f0b880-1003-414a-8798-95492d5b1e77   802-3-ethernet    Mon 18 Aug 2014 00:45:11 BST Wired connection 1       6fec7fea-803b-4112-ac6f-e24be941cd09   802-3-ethernet    Mon 18 Aug 2014 00:45:11 BST PlusnetWirelessXXXXXX    68f0fd52-cbb4-4f64-bbbb-65d5c6da68d1   802-11-wireless   Mon 18 Aug 2014 00:45:16 BST

And if your configuration is correct it should automatically connect to the WiFi network: root@ci20:/etc/NetworkManager/system-connections# nmcli dev DEVICE    TYPE              STATE wlan0     802-11-wireless   connected usb0      802-3-ethernet    unavailable eth0      802-3-ethernet    unavailable

You may be able to see the CI20 from other devices on your network. If not you can use /sbin/ifconfig to find its IP address.

Setting up SSH
How that you are connected to the internet you can install an SSH server. Switch to root (the default root password is "ci20"), and use apt-get: ci20@ci20:~$ su Password: root@ci20:/home/ci20# apt-get install ssh

When it completes you should be able to connect to the CI20 with SSH.

Setting up VNC
If you want to use the graphical interface to the CI20 over the network you can use VNC. Setting it up is pretty standard.

Install tightvncserver as root: ci20@ci20:~$ su Password: root@ci20:/home/ci20# apt-get install tightvncserver

Exit back to the normal user and start the vnc server: root@ci20:/home/ci20# exit exit ci20@ci20:~$ vncserver You will require a password to access your desktops. Password: Verify: Would you like to enter a view-only password (y/n)? n New 'X' desktop is ci20:1 Creating default startup script /home/ci20/.vnc/xstartup Starting applications specified in /home/ci20/.vnc/xstartup Log file is /home/ci20/.vnc/ci20:1.log

You can now connect to the VNC server (as e.g. ci20:1) using your favourite VNC client. You may wish to connect through an SSH tunnel for extra security.