ARM S3C6410開發板與VM中虛擬機ftp傳文件

開發板:tiny6410   

VM:6.5.3  

linux:REHL5


需要VM虛擬機中的linux與開發板進行文件傳輸,


文檔中給出了3中傳文件的方法:

1、U盤或SD卡

2、串口調試助手

3、ftp文件發送


問題:

1、開始編寫linux程序發現總是在開發板和虛擬機中插拔U盤,麻煩的不行。

2、串口可能是我用的U轉串質量不怎麼樣,傳輸速度慢不說,非常的不穩定。很難傳輸大於10k的文件。

3、佔用偶的網口和網線,操作命令麻煩。


下面介紹配置ftp的方法。

首先在開發板中新建一個用戶用於文件接收 adduser 之後輸入密碼即可完成

[root@FriendlyARM /]# adduser rzy
Changing password for rzy
New password:
Retype password:

主機和開發板用網線聯通。設置開發板IP和主機在一個段上。例如本例   開發板IP:192.168.162.122   主機IP:192.168.162.1(即最後一段不一樣即可)


linux IP設置方法:ifconfig

 [root@FriendlyARM /]#ifconfig eth0 192.168.162.122


主機我是用的window xp 運行cmd

輸入ipconfig查看ip狀態。


虛擬機設置橋接,點選下面的複選框。


在這裏我爲了保證能用,重啓了下虛擬機。


相互ping一下:(開發板方)

[root@FriendlyARM /]# ping 192.168.162.11
PING 192.168.162.11 (192.168.162.11): 56 data bytes
64 bytes from 192.168.162.11: seq=0 ttl=64 time=22.755 ms
64 bytes from 192.168.162.11: seq=1 ttl=64 time=1.289 ms
64 bytes from 192.168.162.11: seq=2 ttl=64 time=1.074 ms
64 bytes from 192.168.162.11: seq=3 ttl=64 time=0.958 ms
64 bytes from 192.168.162.11: seq=4 ttl=64 time=1.020 ms
64 bytes from 192.168.162.11: seq=5 ttl=64 time=0.886 ms
64 bytes from 192.168.162.11: seq=6 ttl=64 time=1.055 ms
64 bytes from 192.168.162.11: seq=7 ttl=64 time=1.061 ms
64 bytes from 192.168.162.11: seq=8 ttl=64 time=1.152 ms


OK~~網絡連接已通!開發板默認開機打開了ftp服務。


VM虛擬機側:

[root@localhost ~]# ftp 192.168.162.122        //登陸ftp服務
Connected to 192.168.162.122.
220 FriendlyARM FTP server (Version 6.4/OpenBSD/Linux-ftpd-0.17) ready.
500 'AUTH GSSAPI': command not understood.
500 'AUTH KERBEROS_V4': command not understood.
KERBEROS_V4 rejected as an authentication type
Name (192.168.162.122:root): rzy                     //輸入用戶名和密碼
331 Password required for rzy.
Password:
230 User rzy logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> put hello.zip                                                    //put命令用來傳文件
local: hello.zip remote: hello.zip
227 Entering Passive Mode (192,168,162,122,135,99)
150 Opening BINARY mode data connection for 'hello.zip'.
226 Transfer complete.
207 bytes sent in 0.015 seconds (14 Kbytes/s)

在開發板這裏,文件傳輸到/home/rzy (home目錄下你的用戶名中)

[root@FriendlyARM rzy]# ls
hello.c    hello.zip

找到文件,大功告成


至此還是沒有解決相互傳送文件命令多麻煩的問題。

在虛擬機中下載安裝gftp,相互之間傳送文件輕鬆愉快。界面如下,會用windows系統的人都會使。


下面介紹安裝方法,參考   http://linux.chinaunix.net/techdoc/desktop/2007/05/16/957827.shtml

我下載的是gftp-2.0.18的源代碼包。解壓縮後打開終端,輸入

./configure

                    #生成Makefile。

在缺省目錄下輸入

make

然後

make install

進行安裝


安裝完成後終端任意目錄下,輸入,gftp,就可以打開上面的界面了。


從此,媽媽再也不用擔心我的文件傳遞。












發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章