[mini2440]tftp download file to arm

1. Arm already had tftp client, because busybox include "tftp" command.

2.Install tftp server in ubuntu, see appendix.

3.Connect arm board to main computer network, such as connect to a same router.

Make sure that vritual machine using "bridge" mode as below:

Config mini2440 network.

vi /etc/eth0-setting

Note: vi must using "h","j", "k", "l" to move edite place.

After reboot the arm board, using "ping" command to test if connect to virtual machine ubuntu (Both bing ok to each other).

As below: (Of cause, not always need ping www.baidu.com)

Error: Sometime doesn't connet to the net, maybe need use computer to login the net first.

4.Get file from server.

tftp -g -r test.txt 192.168.xxx.xxx

Appendix 1 TFTP server in win7

1.Download from official site: http://tftpd32.jounin.net/tftpd32_download.html Then install.

(to be continue ...)

Appendix 2 TFTP server in ubuntu.

NOTE: 'NAT' mode also work, although ip is not in same stage, but if can ping ok each other, so can send file.

1.Install TFTP.

sudo apt install tftp-hpa tftpd-hpa

2.Creat directory.

cd 
mkdir tftpboot
cd tftpboot
vim test.txt

3.Config

cd /etc/default/
vim tftpd-hpa

tftp-hpa is:

# /etc/default/tftpd-hpa

TFTP_USERNAME="tftp"
TFTP_DIRECTORY="~/tftpboot" # 这里是你的tftpd-hpa的服务目录,这个想建立在哪里都行
TFTP_ADDRESS=":69"
TFTP_OPTIONS="-l -c -s" # 这里是选项,-c是可以上传文件的参数,-s是指定tftpd-hpa服务目录,上面已经指定 

4.reset

sudo service tftpd-hpa restart

5.test

$ tftp localhost
tftp> get test.txt
tptp> put text1.txt

(end)

猜你喜欢

转载自blog.csdn.net/zhuohui307317684/article/details/85250930