Cubieboard/TTL

From linux-sunxi.org
Jump to: navigation, search

Exclamation-red.png WARNING: DO NOT CONNECT THE RED LINE TO VCC.

Contents

Connection

If you get a USB-Serial adapter from somewhere else, please check the cable colors of it at the vendor. The RX pin on the adapter should be connected to the TX pin on the Cubieboard and the adapter TX pin vice versa, so that the serial wires are crossed.

The CubieBoard (Rich package) is currently supplied with a Prolific PL2303 USB cable. This cable provides VCC power on the red cable. The Cubieboard does NOT require power (red cable), and it may damage your board if connected. The CubieBoard provides a pin header with 4 pins for TTL UART connection.

Exclamation-red.png Warning! Some PL2303 wires, like the PL2303HX 5V, could damage your Cubieboard. See UART-USB Dongle for more details.

If you are using the supplied PL2303 cable, then the connection should be as follows:

How to connect to a Cubieboard 1 or 2
Cable Pin on Cubieboard
GROUND (BLACK) GND
MUST NOT BE CONNECTED VCC
PIN2 (GREEN) RX
PIN1 (WHITE) TX

Exclamation-red.png WARNING: DO NOT CONNECT THE RED LINE TO VCC.

Pictures

Availability

Driver

Linux Driver

Driver for the PL2303 is inside the kernel. It will work with default settings.

OS X Driver

The opensource driver on github works and the binary version is on the link below.

It is at least confirmed to work on Mac OS X 10.6.8 32 bit version.

There is also a vendor-made driver;

  • Go to http://www.prolific.com.tw/US/index.aspx
  • Click support
  • Login with GUEST / GUEST
  • Click on "click here for PL2303 USB to Serial drivers"
  • half way down, download the file md_PL2303_MacOSX10.6_dmg_v1.4.0.zip

Windows Driver

Windows Driver for Prolific PL2303 is installed automatically. If your "Device Manager" mark the PL2303 device (Prolific USB-to-Serial Comm Port) with yellow exclamation mark and the status of the device shows "code 10", then you probably got counterfeit (fake) cable or you are using the cable with Windows 8. In both cases you just have to install older version of Prolific drivers (1.6.0, 1.7.0, 1.8.0 or later won't work).

Software

Linux

cu

cu is an utitlity that comes with popular system distributions like Fedora, Debian, Ubuntu, NetBSD, etc. It can be used to talk to a device connected to a serial port. On Linux with the serial cable as the only USB serial port

 stty -F /dev/ttyUSB0 -crtscts  # turn off hardware flow control - the cable has no wires for that
 cu -s 115200 -l /dev/ttyUSB0

screen

Another option is GNU screen

 screen /dev/ttyUSB0 115200

gtkterm

With gtkterm, a serial terminal tool with minimum graphic interface :

gtkterm -p /dev/ttyUSB0 -s 115200

Troubleshooting

You might get the following error when trying to access the serial port

 $ sudo cu -s 115200 -l /dev/ttyUSB0
 cu: open (/dev/ttyUSB0): Permission denied
 cu: /dev/ttyUSB0: Line in use

The reason why you cannot access the serial port even if you are root, is due to additional kernel-level security restrictions (such as AppArmor or SELinux). For the case of Ubuntu, which has AppArmor, your account needs to be member of the group dialout. To add your account to the dialout group, run the command

 $ sudo usermod --append --groups dialout myusername

Then, log out and log in again.

Consider some other solutions listed here.

Windows

On Windows you can use software like TeraTerm or Putty or similar which can connect over serial line.

Configuration

It seems the default setting for uBoot and terminal serial is 115200 8N1:

Serial line /dev/ttyUSB0 or COM1
Speed (baud) 115200
Data bits 8
Stop bits 1
Parity None
Flow control None

Windows users can determine proper COM port from Device Manager.

Sample output

See http://pastebin.com/p77V8xdC for sample output. It shows the boot process of the Cubieboard.

Personal tools
Namespaces

Variants
Actions
Navigation
Tools