安裝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] -->
注: 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協議
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 |
+-----------------------------------------+
轉自: http://hi.baidu.com/zengzhaonong/blog/item/8427c633c835de40ac4b5f47.html ############################################################## 系統: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 做相應調整