Console and Debug Output

From Ubicom Developer

Jump to: navigation, search

Contents

Introduction

You can access console and debug logs either through Ubicom dongle or through UART serial connection. Look in build help pages for instructions about enabling console through dongle or serial connection.

Linux Console using the UART Connection

You can access debug logs and also console through UART. Enable UART in Linux build by selecting during make menuconfig under section Customize kernel Settings.

Menuconfig
	Customize Kernel Settings
		Kernel Hacking->Kernel Boot Parameter:-
			console=ttyUS0 
		Device Drivers->Character devices->Serial drivers->Ubicom serial port support:
			Turn this option on.

Enabling UART in OpenWrt distribution

The equivalent of doing via menuconfig can be done by enabling config options as noted below.

Edit files openwrt/target/linux/ubicom32/IP7160RGW/config.2.6.28.xxxxx

around line ~768 comment console output via mailbox

#CONFIG_SERIAL_UBI32_MAILBOX=y
#CONFIG_SERIAL_UBI32_MAILBOX_CONSOLE=y

Add lines
CONFIG_SERIAL_UBI32_SERDES=y
CONFIG_SERIAL_UBI32_MAILBOX_SERDES=y


Terminal settings

On your terminal set the baud rate to 11520bps and Connection to match the port you have connected to. For example, on minicom you would do

Connection: COM1
Baud rate (bps): 115200
Flow control: none

Linux Console using the Ubicom Dongle

You need to change kernel settings to enable console and Debug-logs through dongle. Please see build help pages for more details instructions.

Menuconfig
	Customize Kernel Settings
		Kernel Hacking->Kernel Boot Parameter:-
			console=ttyUM0 

Open a terminal and bring up a telnet to <dongle_ip_address> at port 50. Basic linux commands should work.

telnet <dongle_ip_address> 50 

NOTE: Please make sure that you quit gdb for linux console of port 50 to work.



Ultra debug-logs using the Ubicom Dongle

Debug logs from ipOS can accessed only through dongle. Open a terminal and bring up a telnet to <dongle_ip_address> (replace <dongle_ip_address> by the ip address of your dongle). Note there is no port specified. You should see debug outputs from the packages in sdk/pkg on the console

telnet <dongle_ip_address>


UART/Dongle Combo

If you would like to have Debug-logs on UART and Linux console via dongle you could use the combo method by doing following in Linux configuration.

Menuconfig
	Customize Kernel Settings
		Kernel Hacking->Kernel Boot Parameter:-
			console=ttyUS0 console=ttyUM0
		Device Drivers->Character devices->Serial drivers->Ubicom serial port support:
			Turn this option on.