Serial console

From SolidRun CuBox Wiki
(Redirected from CuBox serial port)
Jump to: navigation, search

CuBox has a self powered USB to serial port RS-232 controller based on Prolific PL2303 (for CuBox v1) or FTDI (CuBox v2). Connect to your computer via a USB to Micro B USB plug cable. The default configuration is 115200 bps, 8bits, no-stop bit and any flow control disabled.

Contents

From Linux

Once you connect the cable, the kernel should load the usbserial module.

dmesg | grep ttyUSB

The above command prints the name of the device, usually /dev/ttyUSB0, if it's the first of this type. Connect to the CuBox using a terminal application of choice.

PuTTY

putty -serial -sercfg 115200,8,n,1 /dev/ttyUSB0

You can download PuTTY here.

minicom

minicom -s
  1. Choose 'Serial port setup'
    Click A, and fill in serial device - for example /dev/ttyUSB0
    Click E, and choose 115200 8N1 by click E,Q, then enter
    Click F to disable Hardware Flow Control
    If needed, click G to disable Software Flow Control, then enter
  2. Select 'Save setup as dfl'. Next time you run minicom without the '-s' flag, the saved parameters will be used
  3. Press exit, leaving configuration and enter console

screen

screen /dev/ttyUSB0 115200

From BSD / OS X

First, install the drivers.

For the PL-2303 driver, you can avoid a reboot if you load the kernel extension

kextload /System/Library/Extensions/ProlificUsbSerial.kext

Once you connect the cable, the kernel should load the usbserial module. Look for the device.

ls -l /dev/*usbserial

Use your terminal program of choice. OS X ships with screen, or install minicom.

screen /dev/tty.usbserial 115200

You can even download ZTerm.

Open Settings, Connection and set the values to 115200 8 N 1 (uncheck Local Echo).
Open File, Transfer Convert and set Binary Data.

From Windows

First, install the drivers. You can also run Linux from a LiveCD.

  • For CuBox v1, the Prolific driver
  • For CuBox v2, the CDM driver

Connect the CuBox to the PC.

PuTTY

  1. Download, install, and launch
  2. In the main screen, select the radio button Serial for Connection type
  3. Change Speed to 115200
  4. If you connect the cable, and the correct driver is installed, a popup balloon will display the COM port CuBox is connected to. If no popup is displayed, just try the different COM ports, starting at COM1.
  5. Try to connect by pressing Open
  6. If nothing happens, change the Serial line to the next COM port (e.g. COM2) until it connects.
  7. Once you know the correct port, save the session. Later open a connection by double-clicking on the session name.

TeraTerm

  1. Download, install, and launch
  2. On the initial screen, select the Serial option. Select the COM port the cubox is connected to. Press OK
  3. Using the top menu, select Setup -> Serial port...
  4. Configure the baud rate to be 115200. Press OK

U-Boot bootstrap

In case the bootloader is broken, we have to temporary load and execute the uboot-uart.bin. After following the instructions for your OS, power on the CuBox while holding down the reset button (can be tricky), and quickly press a key on the host to stop autoboot. Then choose a method to store the uboot-spi.bin (e.g. load again over serial line, network, etc – see firmware update).

See also CuBox boot process and unbricking CuBox

Prepare a paper clip (or similar) to reach the reset button. It's behind a small hole below eSATA (in later versions below ethernet). Assume the CuBox is powered off, and connected to the host computer, where the binaries wait.

From Linux

sx -vv uart.bin < /dev/ttyUSB0 > /dev/ttyUSB0 && minicom -o -D /dev/ttyUSB0

From Windows

In TeraTerm

  1. Open File -> Transfer -> XMODEM -> Send...
  2. Select the file uart.bin and press OK

After power on while holding down the reset button, you should see

CuBox>>

From OS X

screen /dev/tty.usbserial 115200

Press CTRL-A and type

exec !! sx -vv path/to/u-boot-cubox_hynix_cubox_uart.bin

You may need to try again if you do not get the U-Boot prompt after upload.

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox