Using Putty for UART serial debugging "turn" under Linux

Source: Internet
Author: User
Tags system log what interface dmesg

This article was reproduced from: http://blog.csdn.net/xzongyuan/article/details/11593101

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Using Putty for serial debugging is very simple. Only need to set the port (Serial line), Linux, the default interface after the serial port is ttyS0, or ttyUSB0 (corresponding to the USB to the serial port), if more than one, will show ttyS1 or Ttyusb1;window, The normal serial port corresponds to the COM1, com2,usb corresponding COM3 (need to install the driver, in the Device Manager to see the specific COM several). Then set the baud rate is OK, only two simple steps. After clicking on the Open button, you can enter the Linux instructions at the command interrupt, without any intermediate steps (Windows Normal USB connection, you have to use the ADB shell into the Android system), but also can view the debug information, the system will automatically print out.

Using Putty to enter the system, you do not need the ADB tools.

Here is the setup details.

This article corresponds to the environment is Linux,window, if it is a desktop, Serial line default is Com1,com2 port. If using USB to serial cable, in the Device Manager, you can see "Other Devices", opened, is the serial device, to install the driver, and then the new device will be shown as COM3. Enter COM3 in serial line.

In the Session tab

Serial line input/dev/ttyusb0; speed input 115200 or 9600 (based on baud rate selection); Connection type Select Serial

In the Window tab

Select translation option

In this option the remote Character set chooses UTF-8 (this is the encoding format, I'm not sure to set this up)

As for how to find ttyUSB0 this option, you can refer to this article

http://blog.csdn.net/cgzhello1/article/details/7938262

Because my is RS232 to USB, so is ttyUSB0, specifically what interface, you can view the/proc/tty/drivers file, there will be some descriptive information.

For information on viewing the kernel, refer to the following

Introduction to log file fetching for Android software testing

http://mysuperbaby.iteye.com/blog/1416742

Summary

o kmsg Crawl

adb shell cat/proc/kmsg > kmsg.txt, open to check Msm_kgsl field

Description: Used to retrieve kernel messages generated with PRINTK. Only one process with superuser privileges can read this file at any time. These messages can also be retrieved using System invoke syslog. These messages are typically retrieved using the tool DMESG or daemon klogd. Proc is a memory file system, each read file kmsg is actually a loop buffer inside the kernel, after each read, the loop buffer thing is considered to have been processed (that is, to become invalid content), so you read again empty is very normal why this process, the loop buffer size is limited, The kernel can write to it at any time, so it's normal to handle it. You go find out if/proc/kmsg's information is associated with the system log, and if so, you can read the log file.

o dmsg Crawl

adb shell DMESG > Dmesg.txt

Note: DMESG is used to display the boot information, kernel will store the boot information in the ring buffer. If you are too late to view the information, you can use DMESG to view it. DMESG is kernel log, usually with kernel related, such as driver out of the problem (camera, Bluetooth, USB, boot, etc.) boot information is also saved in the/var/log directory, the name is DMESG file. More/var/log/dmesg

Development Board connected USB to UART serial port not responding--error debugging

1. First of all, to see the serial port conversion line There is no problem, connected to the USB,/dev should be able to see the ttyUSB0

2. When you open the putty, you can connect. If the keyboard cannot enter data, the serial port of the conversion line does not respond.

3. My Development Board is tiny210, there are two COM ports, one of the useless, I just plug in such a mouth, the result Putty no response--note, as long as you can open the Putty command port, it means you can connect, just no signal, unplug the USB port, the command end will be automatically shut down immediately.

5. Change a COM port, you can use, under Linux, very convenient, do not have to do what configuration.

Ways to get event information--refer to another article

http://blog.csdn.net/xzongyuan/article/details/11597229

Using Putty for UART serial debugging "turn" under Linux

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.