Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1757528
  • 博文数量: 293
  • 博客积分: 10574
  • 博客等级: 上将
  • 技术积分: 5085
  • 用 户 组: 普通用户
  • 注册时间: 2006-12-22 17:00
文章分类

全部博文(293)

文章存档

2011年(27)

2010年(84)

2009年(62)

2008年(120)

我的朋友

分类: LINUX

2009-12-01 09:55:30

安装配置minicom
--------------------------------------------------

# lsmod | grep usbserial (如果直接使用串口线,而没有用到USB转串口设备,此步可以跳过)
   如果有usbserial,说明系统支持USB转串口。

安装minicom (Fedora自带有minicom,此步可以跳过)
   apt-get install minicom
  
apt-get install lrzsz
配置minicom
   # minicom -s
   Serial port setup [Enter]
    +-------------------------------------------------------------+
    | 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?                                    |
    +-------------------------------------------------------------+
注: 如果没有使用USB转接口,
Serial Device要配置为/dev/ttyS0

  
Save setup as dfl
  
Exit from Minicom




使用minicom传输文件
--------------------------------------------------
# minicom
(Ctrl + a) --> s --> zmodem --> [Okay] -->
   
    +-----------------------------------------+
    |No file selected - enter filename:       |
    |> /home/zxl/ssl/codes/led/lls_led.ko     | [Enter]
    +-----------------------------------------+






注: download kernel by minicom in ubuntu
--------------------------------------------------
    When I download linux kernel by x protocol in minicom, it says "Failure executing protocol, press any key to continue".
    The problem is the x protocol isn't installed bye ubuntu by default, so you should install it by hand:
    # apt-get install lrzsz
    After successful download and install, you can send files by x protocol in minicom.
    lrzsz包括了x/y/zmodem协议




安装lrzsz
--------------------------------------------------
1. 从下面的网站下载lrzsz-0.12.20.tar.gz
  

2. tar zxvf lrzsz-0.12.20.tar.gz
3. 查看里面的INSTALL文档了解安装参数说明和细节
4. # cd lrzsz-0.12.20
5. # ./configure --prefix=/usr/local/lrzsz
6. # make
7. # make install
8. 建立软链接
   # cd /usr/bin
   # ln -s /usr/local/lrzsz/bin/lrz rz
   # ln -s /usr/local/lrzsz/bin/lsz sz
   这样minicom就可以使用zmodem传输文件了





配置文件所在目录
--------------------------------------------------
Ctrl + a     o

         +-----[configuration]------+
         | Filenames and paths      |
         | File transfer protocols -|
         | Serial port setup        |
         | Modem and dialing        |
         | Screen and keyboard      |
         | Save setup as dfl        |
         | Save setup as..          |
         | Exit                     |
         +--------------------------+

+-----------------------------------------------------------------------+
| A - Download directory : /home/zxl                                    |
| B - Upload directory   : /tmp                                         |
| C - Script directory   :                                              |
| D - Script program     : runscript                                    |
| E - Kermit program     :                                              |
| F - Logging options                                                   |
|                                                                       |
|    Change which setting?                                              |
+-----------------------------------------------------------------------+

    A - download 下载的文件的存放位置          
    B - upload   从此处读取上传的文件
    download     开发板 ---> PC
    upload       PC     ---> 开发板

    B - Upload directory   : /tmp
    PC机向开发板发送文件,需要发送的文件在/tmp目录下(PC机上的目录)。做了此项配置后,每次向开发板发送文件时,只需输入文件名即可,无需输入文件所在目录的绝对路径


开发板 ---> PC
--------------------------------------------------
    开发板上的(操作)命令
    # sz filename
    开发板上的文件filename将被传输到PC机上/home/zxl目录下




录制开发板输入信息:
--------------------------------------------------
Ctrl + A + L

    +-----------------------------------------+                
    |Capture to which file?                   |                
    |> /tmp/minicom.cap                       |                
    +-----------------------------------------+
                

 
 
 
##############################################################
 
 
系统:Centos5.1 (linux-2.6.24的内核才支持该设备)
uname -a: Linux localhost 2.6.18-53.el5 #1 SMP Mon Nov 12 02:22:48 EST 2007 i686 i686 i386 GNU/Linux
1. tar -zxf ch341.tar.gz
2. cd ch341
3. make
4. 把error行注释掉
5. 再make,提示error再把相关行注释掉
6. modprobe usbserial
7. insmod ch341.ko
8. hl-340串口线,发现新文件/dev/ttyUSB0
9. minicom -s 做相应调整
 
文件: ch341.tar.gz
大小: 6KB
下载: 下载
文件: USB-COM(HL340 for win).rar
大小: 62KB
下载: 下载
 
阅读(1734) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~