The UP board can be controlled without a monitor or input peripherals (headless setup), but through a serial connection to a host machine. Various hardware ports can be enabled for this serial console. The following sections document the procedure for each of them.
- 1 10-pin connector CN7 (UART0)
10-pin connector CN7 (UART0)
The UART0 interface can be found in pins 9 and 10 on 10-pin connector CN7 (refer to the connectors description document).
It is enabled as a debug terminal as early as the BIOS stage.
To use it, connect your serial cable to the UP and configure the serial client (such as minicom or picocom, included with ubilinux, or putty, for Windows) on your host with these parameters:
- Speed: 115200 bps
- Data bits: 8
- Parity bit: no
- Stop bits: 1
- Hardware flow control: no
Tips: The port name is Communications Port (COM1) in Windows 10
- 10-pin wafer box connector cable (one such adapter is available from the UP shop)
- 3.3V Serial cable (for example, a FTDI cable)
- Depending on the type of serial cable: jumper wires
Using the provided adapter
The adapter from the UP shop brings three connectors out of CN7:
For serial console usage, the 3-pin connector can then be brought to some other kind of serial cable (for instance, using jumper wires).
For a FTDI cable, for example, the mapping should be:
You can get to the BIOS menu by pressing
Esc on your client after booting the board.
By default, ubilinux allows using UART0 as an interface from installation time to installed system.
To install ubilinux through serial console:
- Configure the terminal as shown above before booting the installation media.
- On the GRUB menu that appears, pick the
Install (serial console)entry.
After installation, a TTY is always available on UART0, no matter how you installed the system in the first place.
To enable the serial console on Ubuntu, first configure GRUB:
$ sudo mkdir /etc/default/grub.d $ sudoedit /etc/default/grub.d/serial.cfg
On that file, add the following config:
GRUB_CMDLINE_LINUX="$GRUB_CMDLINE_LINUX console=tty0 console=ttyS0,115200n8" GRUB_TERMINAL_INPUT="console serial" GRUB_TERMINAL_OUTPUT="gfxterm serial" GRUB_SERIAL_COMMAND="serial --unit=0 --speed=115200"
To finish this step, run
On Ubuntu 14.04 (Trusty), if you also need a terminal on the serial TTY (which is probably the case), Upstart must be configured to start one.
sudoedit /etc/init/ttyS0.conf and add this config:
# ttyS0 - getty # # This service maintains a getty on ttyS0 from the point the system is # started until it is shut down again. start on stopped rc RUNLEVEL= stop on runlevel [!2345] respawn exec /sbin/getty -L 115200 ttyS0 vt102
Finally, enable the terminal:
sudo start ttyS0
40-pin GPIO header (UART1)
- BIOS menus are not available through this interface by default.
- Detailed instructions will be added here. For now, see: Pinout#UART
- Serial cable (for example, a FTDI cable)
- Jumper cables for the GPIO pins may be needed
USB3.0 OTG port in device mode
It is also possible to use the USB3.0 OTG port as an interface for serial console. To enable this feature, ensure that these BIOS settings are in place:
Chipset > South Bridge > Default DRD Config: DeviceMode Chipset > South Bridge > USB OTG Support: PCI mode
This switches the OTG port role from host mode to device mode.
The functionality should work out of the box from BIOS version 2.1. No bios settings modification are needed.
For Linux UP2 devices, you will need to create your own disk partition and enable the g_mass_storage module:
First, create a device image for your partition, in this case 400MB memory space:
sudo dd if=/dev/zero of=/usb-up2.img bs=1M count=400
Then, you must format your device as FAT32:
sudo mkdosfs -F 32 /usb-up2.img
Finally, the g_mass_storage must be loaded for your new device:
sudo modprobe g_mass_storage file=/usb-up2.img stall=0
For Linux hosts, If you connect your USB OTG port, you should see your new device automatically.
For Windows hosts, you will need to reformat your UP2 storage device, using diskpart tool, for example:
Run CMD in Windows as an Administrator and execute the diskpart tool:
Note the number assigned to your disk and replace X in the next command with that number
select disk X
create partition primary
format fs=fat32 label="UP2-USB"
Your UP2 storage device will be lauched automatically if the format disk was done successfully.
- Device mode USB3.0 cable
Once the BIOS is correctly configured, you can follow these steps to test USB3.0 serial console:
- Plug the device end of the cable to the UP board and boot the board.
$ sudo modprobe g_serial $ sudo systemctl start getty@ttyGS0
- Plug the host end of the cable to your host and look for a new TTY device entry in /dev (for example, /dev/ttyACM0).
You should now be able to access a TTY from your host device:
$ sudo picocom /dev/ttyACM0