1. Home
  2. Serial Debugging

Serial Debugging

You can debug Mixtile Blade 3 on Windows, Ubuntu, or Mac either using serial debugging or using Android Debug Bridge (ADB). This document describes serial debugging of Blade 3 on Windows, Ubuntu, and Mac.

For details about how to debug Blade 3 using ADB, see Debugging Using ADB.

Preparations

  • A USB to TTL converter (for example: FT232)
  • A PC: Windows, MacOS, or Ubuntu
  • A serial debugging tool (for example: SecureCRT)

On Windows

Step 1. Connect hardware

  1. Connect the GND, TXD, and RXD pins of the USB to TTL converter to the GND, RXD and TXD pins of Mixtile Blade 3, respectively. 
  2. Connect the USB to TTL converter to your PC.

Step 2. Download and install a driver

  1. Download a driver according to the USB to TTL converter that you’re using. In this document, FT232 is used and FT-32 driver is installed. For details, see USB TO TTL
  2. Unzip the driver zip file and select the corresponding file (.exe) to install based on the PC architecture (32-bit or 64-bit). If only one installation file (.exe) is available, select it to install.

On your PC, open Device Manager and check your Mixtile Blade 3’s serial port.
Windows Device Manager - Serial port

Step 3. Install and configure a serial debugging tool

SecureCRT is one of the serial debugging tools generally used on Windows, and is used for illustration in this document.

  1. Select the SecureCRT file (.exe or .msi) to install according to the PC architecture (32-bit or 64-bit).

2. Open SecureCRT and configure the serial debugging tool. Specifically, on the Quick Connect configuration directory that is displayed, complete the settings as shown in the following figure. Then click Connect.
Setting serial port parameters on Windows

You’ll see the following output.

SecureCRT output on Windows

On Ubuntu

Step 1. Connect hardware

  1. Connect the GND, TXD and RXD pins of the USB to TTL converter to the GND, RXD and TXD pins of Mixtile Blade 3. 
  2. Connect the USB to TTL converter to your PC.

Step 2. Install a serial debugging tool

Picocom is one of serial debugging tool generally used on Ubuntu, and is used for illustration here.

sudo apt-get update

sudo apt-get install picocom

Step 3. View serial device number

After the USB to TTL converter is connected to the PC, the device number of the serial is displayed in the /dev directory as ttyUSB[0, 1, 2....]. Take ttyUSB0 as an example:

username@ubuntu:~$ ls /dev/ttyUSB0 /dev/ttyUSB0

Step 4. Run the following command in the command-line terminal:

sudo picocom -b 1500000 /dev/ttyUSB0

The command output is as follows:

port is        : /dev/ttyUSB0
flowcontrol    : none
baudrate is    : 1500000
parity is      : none
databits are   : 8
stopbits are   : 1
escape is      : C-a
noinit is      : no
noreset is     : no
nolock is      : no
send_cmd is    : sz -vv
receive_cmd is : rz -vv -E
imap is        :
omap is        :
emap is        : crcrlf,delbs,

Type [C-a] [C-h] to see avaiable commands

Terminal ready
console:/ $
console:/ $
console:/ $
console:/ $

Step 5. Exit picocom.

  1. Press the key combination CTRL+A.

2. Keep pressing CTRL but release A.

3. Keep pressing CTRL and press Q.

On macOS

Step 1. Connect hardware

  1. Connect the GND, TXD and RXD pins of the USB to TTL converter to the GND, RXD and TXD pins of Mixtile Blade 3.
  2. Connect the USB to TTL converter to your PC.

Step 2. Install a serial debugging tool

Picocom is one of serial debugging tool generally used on macOS, and is used for illustration here.

$ brew install picocom

Note: You need to install the brew tool before using the above command. You can use the following demand to install brew.

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Step 3. View serial device number

After the USB to TTL converter is connected to the PC, the device number of the serial is displayed in the /dev directory as ttyUSB[0, 1, 2....]. Take ttyUSB0 as an example:

username@ubuntu:~$ ls /dev/ttyUSB0
/dev/ttyUSB0

Step 4. Operate the serial debugging tool

-b is to set the baud rate.

sudo picocom -b 1500000 /dev/ttyUSB0
picocom v2.2

The command output is as follows:

port is        : /dev/ttyUSB0
flowcontrol    : none
baudrate is    : 1500000
parity is      : none
databits are   : 8
stopbits are   : 1
escape is      : C-a
noinit is      : no
noreset is     : no
nolock is      : no
send_cmd is    : sz -vv
receive_cmd is : rz -vv -E
imap is        :
omap is        :
emap is        : crcrlf,delbs,

Type [C-a] [C-h] to see avaiable commands

Terminal ready
console:/ $
console:/ $
console:/ $
console:/ $

Step 5. Exit picocom.

  1. Press the key combination CTRL+A.

2. Keep pressing CTRL but release A.

3. Keep pressing CTRL and press Q.

Was this article helpful?