[rk_2014_0904] Testing the serial port under Linux is working properly

Source: Internet
Author: User

I. TEST environment

PC1:WIN8, run the Serial debugging tool: Usr-tcp232-test.exe;

pc2:ubuntu14.04;

Connection between PC1 and PC2 using "USB to serial port";

USB to serial port using FT232 chip, related driver please search "ft232r usb uart" Download, with Windows and Linux under the driver. The manufacturer of the chip is FTDI.

ubuntu14.04 under the FT232 chip driver, the identification of the device name is:/dev/ttyusb0.

Two. Test Serial transceiver

1.[PC1->PC2]

In PC1, the Serial debugging tool opens the COM1 and enters in the Send area:

Hello, ubuntu14. Geneva

Then the loop is sent.

Enter in the terminal of the PC2

# cat/dev/ttyusb0

If the serial port is working properly, the PC2 terminal will continue to display:

Hello, ubuntu14. Hello, ubuntu14.  Hello, ubuntu14.  Hello, ubuntu14.          ...

2.[PC2->PC1]
Enter in the terminal of the PC2

echo "Hello, ubuntu14.04" >/dev/ttyusb0

If the serial port is working properly, the receiving area of the PC1 serial debugging assistant will display the following information:

Hello, ubuntu14. Geneva

Three. Precautions

1.USB to the serial port, the serial name in Windows may be COM4, or COM5, and so on. Look in Device Manager, ports (COM and LPT).

2. The serial port parameters at both ends should be configured consistently. If both ends are configured as: "9600,n,8,1".

[rk_2014_0904] Testing the serial port under Linux is working properly

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.