Linux under the USB switch to the serial port settings __linux

Source: Internet
Author: User
Tags dmesg

http://blog.csdn.net/david_xtd/article/details/24542595

The use of SMS modem in Linux to send text messages, because the SMS modem uses USB Serial converter (chip for PL2303), the process and methods in the configuration and debugging in this record, want to have the same needs of colleagues to provide a little help.

"One", driving related instructions:
If you use the serial port directly, and do not use USB to turn serial device, you do not need to install the driver.
If you use a USB to the serial port, generally do not need to install the driver, the current Linux system has included the driver, can be automatically identified, but also through the following command to confirm whether support.
To view the condition of a module load:
Reference # Lsmod |grep pl2303
pl2303 18629 0
Usbserial 29865 1 pl2303
If you see the information similar to the above, you will be able to identify the device correctly or install the device driver.

And you can look at some information about the system.
Reference # DMESG | Tail-f
。。。。。。
DRIVERS/USB/SERIAL/USB-SERIAL.C:USB serial support registered for PL-2303
pl2303 3-1:1.0:pl-2303 Converter Detected
USB 3-1: PL-2303 Converter now attached to ttyUSB0
usbcore:registered New Driver pl2303
Drivers/usb/serial/pl2303.c:prolific PL2303 USB to serial adaptor driver v0.11
。。。。。。

If you see similar to the above information, we can know that USB to the serial chip PL-2303 driver has been registered to load, the corresponding system equipment is/dev/ttyusb0 (the next to the serial port settings need to use)

Linux system under the PL2303 chip driver can be downloaded to its website: http://www.prolific.com.tw/Eng/downloads.asp?ID=31
If you do not need to install drivers in the following situations:
Linux Kernel 2.4.10 and above already includes built-in for drivers. Linux Kernel 2.4.31 and above already includes built-in for drivers, pl-2303h and Pl-2303xa/hxa. Note:google Android OS is also based on Linux kernel so it also supports PL2303.

"Two", minicom configuration:
Of course, first check whether the next minicom has been installed, the specific installation is no longer described here.
Home to the root user login to the Linux system, after the implementation:
1.#minicom-s


2. Select serial Port setup:
"A-serial Device" to be configured to/DEV/TTYUSB0 (this value and the previous DMESG query to the information consistent, if the direct use of the serial line, generally configured to/DEV/TTYS0) "E-bps/par/bits" set to "9600 8N1" "F- Hardware flow control is set to "No" as shown below:

Follow the prompts to modify the required content, such as selecting "E-bps/par/bits" as shown in the following image:

When the above three modifications are complete, press ENTER to return to the main options directory.
3. Select modem and dialing
If it is not used to control the modem, the general need to modify this option, the specific configuration is as follows:

The modification finishes pressing ENTER to return to the main options directory.
4. Save configuration exit (be sure to remember this step)
Select Save Setup as DFL when the settings are complete to store the current settings as the default settings. Choose Exit Exit.

To this has been basically configured well, you can enter at the command simple test under the serial communication.


Original address: http://sjsky.iteye.com/blog/1060342

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.