Connecting to the Console Port

There are times when directly accessing the console is required. Perhaps webGUI or SSH access has been locked out, or the password has been lost or forgotten. This guide shows how to regain access directly through the console.

Install the Driver

A Prolific PL2303 USB-to-UART Bridge driver is used to provide access to the console, which is exposed via the USB Mini-b (5-pin) port on the appliance.

If needed, install an appropriate Prolific PL2303 USB to UART Bridge driver on the workstation used to connect with the system.

There are drivers available for Windows available for download.

For Windows, choose Windows Driver Installer Setup Program.

Note

The correct driver should install automatically for Windows 7 and above the first time you connect the workstation to the Netgate appliance. It may take up to 3 minutes for the driver to install.

Note

A new UART chip is being used on SG-5100s shipped after December 30, 2020.

Windows 10 may “just work.” The new driver update has been installed by a regular Microsoft update. There are Windows driver downloads that provide support for this part directly from the manufacturer here: https://prolificusa.com/product/pl2303gc-usb-full-uart-bridge-controller-gpio/

Technical Information for the new UART chip:
Prolific USB to Full UART Bridge Controller with GPIO
Chip Number PL2303GC Product Data Sheet
Part Number PL2303G4ZJG8P2
Chip Product ID 23a3
Part released December 4, 2019
Any operating system prior to this date will not have the driver unless the OS has been updated.

There are drivers available for Mac OSX available for download.

For Mac, choose Mac OS X Universal Binary Driver.

Note

A new UART chip is being used on SG-5100s shipped after December 30, 2020.

We have seen problems using Mac OSX as a serial console connection for the new Prolific UART chip. If you experience problems, please try a Microsoft Windows or Linux connection to the console port.

There are Mac driver downloads that provide support for this part directly from the manufacturer here: https://prolificusa.com/product/pl2303gc-usb-full-uart-bridge-controller-gpio/

Technical Information for the new UART chip:
Prolific USB to Full UART Bridge Controller with GPIO
Chip Number PL2303GC Product Data Sheet
Part Number PL2303G4ZJG8P2
Chip Product ID 23a3
Part released December 4, 2019
Any operating system prior to this date will not have the driver unless the OS has been updated.

There are drivers available for Linux available for download.

Recent versions of many Linux distributions include this driver and will not require manual installation.

Note

A new UART chip is being used on SG-5100s shipped after December 30, 2020.

There are Linux driver downloads that provide support for this part directly from the manufacturer here: https://prolificusa.com/product/pl2303gc-usb-full-uart-bridge-controller-gpio/

Technical Information for the new UART chip:
Prolific USB to Full UART Bridge Controller with GPIO
Chip Number PL2303GC Product Data Sheet
Part Number PL2303G4ZJG8P2
Chip Product ID 23a3
Part released December 4, 2019
Any operating system prior to this date will not have the driver unless the OS has been updated.

Tip:

Linux kernel 5.5 contains the appropriate driver for the newer PL2303GC USB-to-UART bridge. This kernel version is relatively new and consequently is not present on most linux systems. It's possible to upgrade the kernel to version 5.5 or higher to utilize the driver compiled with that kernel. Another option is to compile the latest driver to load separately.

The following steps to compile the latest Prolific PL2303 driver have been tested on Linux Mint 18-19.

1. Download the driver:

curl -o driver.zip https://prolificusa.com/app/uploads/2019/06/PL2303G_Linux_Driver_v1.0.4.zip

2. Extract the driver archive:

unzip driver.zip

3. Navigate to the extracted driver folder:

cd PL2303G_Linux_Driver_v1.0.4

4. Check running kernel version and cd to the directory that best matches the kernel version. Example:

uname -r
   
5.0.0-32-generic
cd 5.0_ok

5. Update the "PWD" string in the Makefile:

sed -i 's/PWD/shell pwd/' Makefile

6. Compile the driver:

sudo make all

7. Copy the compiled module to the appropriate kernel module library:

sudo cp -f pl2303.ko /lib/modules/$(uname -r)/kernel/drivers/usb/serial/

8. Unload the existing pl2303.ko module:

rmmod pl2303.ko

9. Load the compiled driver in it's place:

insmod pl2303.ko

10. Commit the settings to load during reboot:

echo "pl2303" >> /etc/modules

Recent versions of FreeBSD include this driver and will not require manual installation.

Note

A new UART chip is being used on SG-5100s shipped after December 30, 2020.

We are not aware of any new drivers available for FreeBSD.

Connect a USB Cable

Next, locate an appropriate USB cable that has a USB Mini-b (5-pin) connector on one end and a regular USB Type A plug on the other end. These cables are commonly used with smaller USB peripherals such as GPS units, cameras, and so on.

Gently push the USB Mini-b (5-pin) plug end into the console port on the appliance and connect the USB Type A plug into an available USB port on the workstation.

Tip

Be certain to gently push in the USB Mini-b (5-pin) connector on the system side completely. With most cables there will be a tangible “click”, “snap”, or similar indication when the cable is fully engaged.

Locate the Console Port Device

The appropriate console port device that the workstation assigned as the serial port must be located before attempting to connect to the console.

Note

Even if the serial port was assigned in the BIOS, the workstation’s OS may remap it to a different COM Port.

To locate the device name on Windows, open Device Manager and expand the section for Ports (COM & LPT). Look for an entry with a title such as Prolific USB-to-Serial Comm Port. If there is a label in the name that contains “COMX” where X is a decimal digit (e.g. COM3), that value is what would be used as the port in the terminal program.

assignment

The device associated with the system console is likely to show up as /dev/cu.usbserial.

The device associated with the system console is likely to show up as /dev/ttyUSB0. Look for messages about the device attaching in the system log files or by running dmesg.

Note

If the device does not appear in /dev/, see the note above in the driver section about manually loading the Linux driver and then try again.

The device associated with the system console is likely to show up as /dev/cuaU0. Look for messages about the device attaching in the system log files or by running dmesg.

Launch a Terminal Program

Use a terminal program to connect to the system console port. Some choices of terminal programs:

For Windows it is recommended to run PuTTY in Windows or SecureCRT. An example of how to configure Putty is below.

Warning

Do not use Hyperterminal.

For Mac OSX it is recommended to run screen, or cu. An example of how to configure screen is below.

For Linux it is recommended to run screen, PuTTY in Linux, minicom, or dterm. An example of how to configure Putty and screen is below.

For FreeBSD it is recommended to run screen or cu. An example of how to configure screen is below.

Client-Specific Examples

PuTTY in Windows

Open PuTTY and select Session under Category on the left hand side. Next, set the Connection type to Serial. Then, set Serial line to the console port that was located above, in Locate the Console Port Device, and the Speed to 115200 bits per second.

Click the Open button and the console screen will be displayed.

../_images/putty1.png

An example of using PuTTY in Windows.

PuTTY in Linux

Open PuTTY from a terminal by typing sudo putty. Next, set the Connection type to Serial. Then, set Serial line to /dev/ttyUSB0 and the Speed to 115200 bits per second.

Click the Open button and the console screen will be displayed.

../_images/putty-linux.jpg

An example of using PuTTY in Linux.

GNU screen

In many cases screen may be invoked simply by using the proper command line, where <console-port> is the console port that was located above.

sudo screen <console-port> 115200

If portions of the text are unreadable but appear to be properly formatted, the most likely culprit is a character encoding mismatch in the terminal. Adding the -U parameter to the screen command line arguments forces it to use UTF-8 for character encoding:

sudo screen -U <console-port> 115200

Terminal Settings

The settings to use within the terminal program are:

Speed

115200 baud, the speed of the BIOS

Data bits

8

Parity

none

Stop bits

1

Flow Control

Off or XON/OFF. Hardware flow control (RTS/CTS) must be disabled.

Troubleshooting

No Serial Output

If there is no output at all, check the following items:

  • Ensure the cable is correctly attached and fully inserted

  • Ensure the terminal program is using the correct port

  • Ensure the terminal program is configured for the correct speed. The default BIOS speed is 115200, and many other modern operating systems use that speed as well. Some older operating systems or custom configurations may use slower speeds such as 9600 or 38400.

  • Ensure the operating system is configured for the proper console (e.g. ttyS1 in Linux). Consult the various operating install guides on this site for further information.

PuTTY has issues with line drawing

PuTTY generally handles most cases OK but can have issues with line drawing characters on certain platforms.

These settings seem to work best (tested on Windows):

Window

Columns x Rows = 80x24

Window > Appearance

Font = Courier New 10pt or Consolas 10pt

Window > Translation

Remote Character Set = Use font encoding or UTF-8

Window > Translation

Handling of line drawing characters = Use font in both ANSI and OEM modes or Use Unicode line drawing code points

Window > Colours

Indicate bolded text by changing = The colour

Garbled Serial Output

If the serial output appears to be garbled, binary, or random characters check the following items:

  • Ensure the terminal program is configured for the correct speed. (See No Serial Output)

  • Ensure the terminal program is configured for the proper character encoding, such as UTF-8 or Latin-1, depending on the operating system. (See GNU Screen)

Serial Output Stops After the BIOS

If serial output is shown for the BIOS but stops afterward, check the following items:

  • Ensure the terminal program is configured for the correct speed for the installed operating system. (See No Serial Output)

  • Ensure the installed operating system is configured to activate the serial console.

  • Ensure the installed operating system is configured for the proper console (e.g. ttyS1 in Linux). Consult the various operating install guides on this site for further information.

  • If booting from a USB flash drive, ensure that the drive was written correctly and contains a bootable operating system image.