TFTP to the mini2440

davef 2009-08-26 11:59:04 Link
Has anyone been able to TFTP from a Linux PC to the mini2440?  Thought it
would be good idea to check this out BEFORE using u-boot to upgrade the
kernel.

I can FTP files from my Linux box running Kubuntu 9.04  to the mini2440,
but only get timed out messages (on the Linux PC) using tftp.  I have been
through quite a few "how to help sheets" on setting up the TFTP server on
the Linux box, but never get a response from the mini2440.

Also, if I try to tftpd from the mini2440 all I get is <Connection
refused>.  I am more interested in being able to tftp files TO the
mini2440.

Appreciate any pointers.

Tnx

paulw 2009-08-26 14:34:06 Link
Yes, that's how I normally download applications during development.  I had
the same problem initially. The last obstacle was configuring the firewall
on the PC (Fedora 11) to allow it.

puma 2009-08-27 15:48:47 Link
Hi davef,

Linux box should be fined with TFTP. In case your host is behind the
router, you need to open the port 21 with your local ip address.

Thanks,
puma

davef 2009-08-27 21:39:16 Link
puma,

Thanks for the hint, however after another evening trying to get it to work
I realised that I can't even transfer files on the Linux PC . . . from one
directory to another!

I had to install the TFTP server following this:

http://www.davidsudjiman.info/2006/03/27/installing-and-setting-tftpd-in...

and then found this to test it:

http://book.opensourceproject.org.cn/embedded/addembed/opensource/ch04le...

I am using a ADSL router in the system and when I get things to that stage
I will check out your suggestion.

Cheers

davef 2009-08-28 12:41:27 Link
To save someone the time.

After installing the TFTP server on the Linux box as found in the 1st link
above, put the files to transfer in /tftpboot on the Linux PC
(192.168.1.3).  Test it as described in the 2nd link.

To GET a file at the FriendlyArm from the Linux PC:
   from root # tftp –l my_tmp/test.txt –r test.txt –g 192.168.1.3
(my_tmp is a directory that you put on the FriendlyArm with chmod 777)

To PUT a file from the FriendlyArm to the Linux PC:
   from root # tftp –l my_tmp/test.txt –r test.txt –p 192.168.1.3

The syntax is not that clear on tftp in the BusyBox commands docs, well it
wasn't to me.

Now I think the reason I can't tftp from the Linux box to the FriendlyArm
is because there is no TFTP (client?) running on the FriendlyArm after
boot-up.  I see a clue in the usage for tftpd if you just type in tftpd
without any options.

paulw 2009-08-28 14:26:41 Link
You won't be able to initiate a TFTP transfer from the PC side unless you
have a TFTP server (TFTPD) running on the FriendlyARM

puma 2009-08-29 03:07:23 Link
hi davef,

You don't have to install a tftp server on mini2440 since it has already an
ftp pre-installed. I recommend to use FileZilla client Linux and everything
would be fine for you. I've been using it to my Ubuntu 8.04.

thanks,
puma

davef 2009-08-29 06:02:02 Link
puma and paulw,

Thanks both of you for the hints.  I can FTP fine to the mini2440.  Being
able to TFTP was part of a self-imposed learning experience before
launching myself headlong into u-boot and kernel compiling territory.

There is a line which I believe needs to go into inetd.conf . . .

69 dgram udp nowait root tftpd tftpd files/to/serve

which I am about to try.  Then u-boot here we come.

Cheers,
davef

davef 2009-08-29 07:58:52 Link
Reading inetd(8) man pages I made a directory in root called <files>

in /etc/inetd.conf I added

tftp dgram udp nowait root /usr/bin/tftpd /usr/bin/tftpd /files

Go to the Linux PC and in my tftpboot directory, where I have a file
<test>:
tftp 192.168.1.230
tftp> put test
Error code 0: malformed packet

A search on Google shows up 4 threads for this error, none of which helped.

I tried <69> for the initial field entry as per the line you see when you
type tftpd in with no options in terminal (on the FriendlyArm).

One more hint :)

Tnx

davef 2009-08-29 11:34:42 Link
Don't bother with further suggestions.  Installed WireShark on the Linux PC
and proved that the tftp client doesn't even send out anything to the
FriendlyArm.

sab 2009-11-10 17:17:02 Link
Hi,

I cannot ftp/tftp to Mini from Ubuntu 9.04.
Please kindly share steps to do so.

thanks
-Sab.

Prasad 2010-02-05 19:45:05 Link
I cannot ftp/tftp to Mini from Ubuntu 9.04.
Please kindly share steps to do so.

davef 2010-02-05 20:57:15 Link
Give this a go, there could errors.



Installing TFTP on the Linux PC running Ubuntu 9.04

The tftp server starts with xinetd on the Linux PC.
The tftp client start when you do tftp

1. Install tftpd and related packages.

$ sudo apt-get install xinetd tftpd tftp

2. Create /etc/xinetd.d/tftp and put this entry:

service tftp
{
protocol   = udp
port    = 69
socket_type  = dgram
wait    = yes
user    = nobody
server    = /usr/sbin/in.tftpd
server_args  = -s /tftpboot
disable  = no
}

3. Make /tftpboot directory in root

$ sudo mkdir /tftpboot
$ sudo chmod -R 777 /tftpboot
$ sudo chown -R nobody /tftpboot

4. Re-start tftpd through xinetd

$ sudo /etc/init.d/xinetd restart

5. Testing. Transfer a file test from 192.168.1.3 (Client using tftp) to
192.168.1.3 (Server 192.168.1.3). 

$ chmod 777 /tftpboot/test

6. Create a temp directory, chmod and cd to it.

$ sudo mkdir /temp
$ sudo chmod -R 777 /temp
  cd temp

7. Get a file from /tftpboot while in /temp on 192.168.1.3

$ tftp 192.168.1.3
tftp> get test
Received 22 bytes in 0.0 seconds
tftp> quit

8. Put a file in /temp to /tftpboot on 192.168.1.3

$ tftp 192.168.1.3
tftp> put tftpboot_test
Received 34 bytes in 0.0 seconds
tftp> quit

9. Can’t put or get files at the Linux box from/to the FriendlyArm
(see comments above in this thread)

To GET a file at the FriendlyArm from the Linux PC:
from www  # tftp -l dave.txt –r hda.txt –g 192.168.1.3
from root  # tftp –l www/dave.txt –r hda.txt –g 192.168.1.3

To PUT a file from the FriendlyArm to the Linux PC:
from www  # tftp –l index.html –r index.html –p 192.168.1.3
from root  # tftp –l www/index.html –r index.html –p 192.168.1.3


In order to have a tftpd client running on boot-up in /etc/inetd.conf I
added the line:

tftp  dgram  udp  nowait  root  /usr/bin/tftpd  /usr/bin/tftpd  /files

Prasad 2010-02-06 11:30:59 Link
Hai davef

Thank you for your post.
This helped me out tranfer files to ARM.

I need to develope a Gui App using Qutopia. 
Could you please share how to setup Qutopia on my ubuntu 9.04.
Please kindly share steps to do so

davef 2010-02-07 11:22:59 Link
Haven't done that, so can not offer any advice.  I assume you have read the
other Qtopia threads on this site.

Start another thread if none of them fits your needs.

Prasad 2010-02-07 12:25:45 Link
Hai davef, 

THANK YOU for your reply.
Iam switching to Wince because iam bit familar with c#.

Piyush 2011-02-04 09:33:59 Link
Hello Davef

I am trying to communicate to my mini2440 through the FTP and for that I
installed the tftp on my Linux Ubuntu 10.04 lucid .

I have done upto the installing and creating those directories and files .

But when it comes to the testing of my FTP I am not able to that , because
I am not clear of few things actually like:

1.As you said in the testing portion "Testing. Transfer a file test from
192.168.1.3 (Client using tftp) to 192.168.1.3 (Server 192.168.1.3)." here
you have used the same IP for both the server and the client , so why is
this so.

2. the ip address of my mini is 192.168.1.230 so how should I proceed in
this direction.

Thank you

davef 2011-02-04 11:35:27 Link
Piyush,

This is almost one year ago and don't think ever used it after I got most
of it working!

Looks like it should be:

Testing. Transfer a file test from
192.168.1.230 (Client using tftp) to 192.168.1.3 (Server 192.168.1.3).

192.168.1.3 was the static address for the Linux host or server.

I did have problems, most likely due to my poor understanding of the whole
client server setup.

Good luck

Piyush 2011-02-04 18:34:32 Link
Hello Davef

Have you used the nfs service to transfer the files from your PC to the
mini2440.

Please give me some help on it that how I can transfer the files from the
Linux PC to the mini2440 through the nfs protocol.

If you have some blog or document on it ..please do share with me.

Thank you

davef 2011-02-04 23:12:06 Link
http://billforums.station51.net/viewtopic.php?f=1&t=17

Maybe?

naveen 2012-02-02 15:18:34 Link
Hi all, i have successfully port u-boot, and its working fine with the jffs
filesystem, but i unable to transfer a file using ftp, tftp, and i even i
followed the above procedure to transfer file, one more thing my SDCARD is
not getting detecting, otherwise i would have copy from it to the fs. can
any body give me the solutions for the above two problem,

i have created a file called /etc/inetd.conf, and the contents are

tftp dgram udp nowait root /usr/bin/tftpd /usr/bin/tftpd /files

if i transfer a file from linux pc to friendly arm i got this error
/tftpboot# tftp 192.168.1.230
tftp> put file.txt
Transfer timed out.


if i try to get file from linux pc to friendly arm, i got this error
[root@(none) /files]# tftp -l file.txt -r file.txt -g 192.168.1.3
tftp: server error: (0) Undefined error code             

can any one help me please, 

waiting for your reply

Juergen Beisert 2012-02-02 18:00:53 Link
Did you run a TFTP server on your Mini2440 when you tried to transfer a
file from your host (Linux PC) to the Mini2440? (the "put file.txt" case)

Is your network up and running and configured correctly at both sides (host
and Mini2440)? Did you see the accesses from the Mini2440 in the logfiles
at your host (Linux PC)?

amol 2012-02-07 05:24:49 Link
MINI2440# tftp 0×31000000 uImage
dm9000 i/o: 0×20000300, id: 0x90000a46
DM9000 : running in 16 bit mode
MAC:08:08:11:18:12:27
TFTP from server 10.0.0.1; our IP address is 10.0.0.2
Filename ‘uImage’.
> > Load address: 0×31000000
> > Loading: T T T T T T T T T T
> > Retry count exceeded; starting again
thanks for your reply

luc 2012-02-09 18:10:07 Link
Hi,

Same problem here...
As I run ubuntu in a virtual machine, I used tftp32 on my windows machine.
Now it works.
I have to say i am complete newbie in linux ...

Luc

ashen 2012-02-09 20:29:28 Link
amol: there's bug in ubuntu's 'tftpd', use atftpd instead.

amol 2012-02-13 08:06:15 Link
ashen:how to use atftpd, means the command to transfer the kernel image is
same or different. If you know any document or website then please inform
me.

Reply

Name
eMail (not visible)
Subject (no text only in upper case; no HELP, URGENT...)
Text
HTML tags are not supported and links are generated automatically if they start with http or ftp.
Please submit long source code or log files as attachment (only registered users).
Please enter the number 1421