Linux环境中USB转串口的应用(minicom)

原创 2012年03月26日 21:04:52

看到网上很多人写的都是PL2303驱动,甚至还有人上传了原代码。

自己也准备下载编译一下。

突然发现

jerry@ubuntu:~/tmp$ lsusb
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 004: ID 1a86:7523 Unknown HL-340 USB-Serial adapter
Bus 006 Device 002: ID 046d:c52f Logitech, Inc.
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 003: ID 17ef:4808 Lenovo
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
jerry@ubuntu:~/tmp$ 
我使用的是HL-340 USB,虽然是Unknow adapter, 但是

jerry@ubuntu:~$ dmesg | tail
[ 2428.736594] usb 6-1: configuration #1 chosen from 1 choice
[ 2428.739491] ch341 6-1:1.0: ch341-uart converter detected
[ 2428.752572] usb 6-1: ch341-uart converter now attached to ttyUSB0
[ 3101.732162] usb 6-1: USB disconnect, address 4
[ 3101.732432] ch341-uart ttyUSB0: ch341-uart converter now disconnected from ttyUSB0
[ 3101.732460] ch341 6-1:1.0: device disconnected
[ 3104.376321] usb 6-1: new full speed USB device using uhci_hcd and address 5
[ 3104.538928] usb 6-1: configuration #1 chosen from 1 choice
[ 3104.541585] ch341 6-1:1.0: ch341-uart converter detected
[ 3104.554698] usb 6-1: ch341-uart converter now attached to ttyUSB0
看上去好像可用。

于是开始设备,minicom

(1) $ sudo apt-get install minicom

(2) $ su -

(3) # minicom -s

            +-----[configuration]------+
            | Filenames and paths      |
            | File transfer protocols  |
            | Serial port setup        |
            | Modem and dialing        |
            | Screen and keyboard      |
            | Save setup as dfl        |
            | Save setup as..          |
            | Exit                     |
            | Exit from Minicom        |
            +--------------------------+
(4) set "Serial port setup" as follow:
    +-----------------------------------------------------------------------+
    | A -    Serial Device      : /dev/ttyUSB0                              |
    | B - Lockfile Location     : /var/lock                                 |
    | C -   Callin Program      :                                           |
    | D -  Callout Program      :                                           |
    | E -    Bps/Par/Bits       : 115200 8N1                                |
    | F - Hardware Flow Control : No                                        |
    | G - Software Flow Control : No                                        |
    |                                                                       |
    |    Change which setting?                                              |
    +-----------------------------------------------------------------------+
(5)  set "Modem and dialing" as follow:
 +--------------------[Modem and dialing parameter setup]---------------------+
 |                                                                            |
 | A - Init string .........                                                  |
 | B - Reset string ........                                                  |
 | C - Dialing prefix #1.... ATDT                                             |
 | D - Dialing suffix #1.... ^M                                               |
 | E - Dialing prefix #2.... ATDP                                             |
 | F - Dialing suffix #2.... ^M                                               |
 | G - Dialing prefix #3.... ATX1DT                                           |
 | H - Dialing suffix #3.... ;X4D^M                                           |
 | I - Connect string ...... CONNECT                                          |
 | J - No connect strings .. NO CARRIER            BUSY                       |
 |                           NO DIALTONE           VOICE                      |
 | K - Hang-up string ......                                                  |
 | L - Dial cancel string .. ^M                                               |
 |                                                                            |
 | M - Dial time ........... 45      Q - Auto bps detect ..... No             |
 | N - Delay before redial . 2       R - Modem has DCD line .. Yes            |
 | O - Number of tries ..... 10      S - Status line shows ... DTE speed      |
 | P - DTR drop time (0=no). 1       T - Multi-line untag .... No             |
 |                                                                            |
 | Change which setting?       (Return or Esc to exit)                        |
 +----------------------------------------------------------------------------+
ps: delete A, B and K

(6) save setup as dfl, save as default settings.

            +-----[configuration]------+
            | Filenames and paths      |
            | File transfer protocols  |
            | Serial port setup        |
            | Modem and dialing        |
            | Screen and keyboard      |
            | Save setup as dfl        |
            | Save setup as..          |
            | Exit                     |
            | Exit from Minicom        |
            +--------------------------+
(7) exit minicom and exit root user

(8) $ minicom

可以正常使用minicom了。

版权声明:本文为博主原创文章,未经博主允许不得转载。

相关文章推荐

linux下USB转串口的应用和minicom的设置(ubuntu)

我的USB串口转换器使用的芯片是PL2303,可以在Linux终端输入lsusb命令查到设备信息 # lsusb [root@localhost ~]#  lsusb Bus 002 Devic...

Ubuntu Linux下USB转串口的应用和minicom的设置

USB串口转换器使用的芯片是PL2303(Deebug推荐!),可以在Ubuntu Linux终端输入lsusb命令查到设备信息 # lsusb [root@www.linuxidc.com ~]...

LINUX下(虚拟机中的LINUX系统)串口通讯 part3------fedora 9下USB转串口的应用和minicom的设置(转载)

原链接地址:http://hi.baidu.com/%D0%C4%B5%AD%C8%E7%D4%C2/blog/item/500b33b5fe4038798ad4b24f.html我的USB串口转换器...

minicom 学习 usb转串口 在ubuntu11.10 环境下 而不是虚拟机的ubuntu

硬件环境: ubuntu 11.10 blackfin 源码包:   =========================    我   是   分   割    线...
  • jinn3
  • jinn3
  • 2012-03-29 09:38
  • 593

虚拟机Linux(Fedora10)下USB转串口的使用, minicom: cannot open /dev/ttyUSB0的解决

网络上有很多Linux下USB转串口的使用方式,但在我这边好像总是出现 minicom: cannot open /dev/ttyUSB0:No such file or directory 或no ...

ACE版虚拟机linux下usb转串口minicom与s3c6410通信——有图有真相哦!

步骤如下: 1、关闭linux电源时打开Vmware workstation ,单击菜单栏上的VM下的setting,进入virtual       machine setting对话框 ...

v虚拟机Linux(Fedora10)下USB转串口的使用, minicom: cannot open /dev/ttyUSB0的解决

转 网络上有很多Linux下USB转串口的使用方式,但在我这边好像总是出现 minicom: cannot open /dev/ttyUSB0:No such file or dir...

转:linux下使用USB转串口线的方法-minicom和hl-340/341(usb转串口线)驱动

安装配置minicom--------------------------------------------------# lsmod | grep usbserial (如果直接使用串口线,而没有...

ubuntu11.04下使用USB转串口-minicom

前言 搞了半天,想在Linux下通过终端控制ARM板,开始想用VM的Swrial Port 结果我的VM不知道怎么无法识别com口,就直接用usb接口吧...

centOS安装与配置minicom(串口转USB)

centOS安装与配置minicom(串口转USB) 1、安装minicom 以及 文件传送工具 sudo yum –y installminicom lrzsz  2. 在使用串口之前必须查看你的电...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:深度学习:神经网络中的前向传播和反向传播算法推导
举报原因:
原因补充:

(最多只允许输入30个字)