Forums » Software Development »
TFTP (or FTP) Server
Added by Mary Frantz almost 12 years ago
How do you start a tftp (or ftp) server on the ARM? Or how do you transfer files to a remote server programmatically? I need to have the server start up automatically or be started from a function call, not from a shell command line.
Thanks,
Mary
Replies (13)
RE: TFTP (or FTP) Server - Added by Michael Williamson almost 12 years ago
Normally, we use scp to transfer files to a remote server on the ARM.
You can configure ssh keys to allow transfers without having to type a password in, if you need it.
-Mike
RE: TFTP (or FTP) Server - Added by Mary Frantz almost 12 years ago
Yes, I have used that.
We are developing an embedded product. Our application code will run from startup. It will create files. We are also developing a companion application on a host PC to communicate with the embedded application. The PC application needs to transfer files over the network from the embedded MityDSP unit. What is the best way to do that? I need something that can be called from within the PC application. I was thinking of using ftp or tftp rather than writing something custom on both ends. The PC application will be running under Windows.
Mary
RE: TFTP (or FTP) Server - Added by Jonathan Cormier almost 12 years ago
http://stackoverflow.com/questions/3477471/whats-a-decent-sftp-command-line-client-for-windows
SFTP/SCP is automatically available through the ssh dropbear daemon on the embedded device so wouldn't require any special changes on the embedded side.
-Jon C
RE: TFTP (or FTP) Server - Added by Jonathan Cormier almost 12 years ago
Alternatively you could install and setup one of the ftp/tftp servers on your embedded device.
$opkg list | grep ftpd
owftpd - 2.7p28-r0.5 - Anoymous FTP server for 1-wire access
proftpd - 1.3.2b-r0.5 - Secure ftp daemon
proftpd-dev - 1.3.2b-r0.5 - Secure ftp daemon
proftpd-doc - 1.3.2b-r0.5 - Secure ftp daemon
tftpd-hpa - 5.0-r1.6 - HPA's tftp server
RE: TFTP (or FTP) Server - Added by Mary Frantz almost 12 years ago
Running
root@mityomapl138:/etc/init.d# opkg list | grep ftpd
yielded no results.
Running
root@mityomapl138:/etc/init.d# opkg list | more
yielded lots of results, none of them contained "ftpd" or "ftp", only "sftp".
root@mityomapl138:/etc/init.d# opkg list | grep ftp
openssh-sftp - 5.9p1-r5
openssh-sftp-server - 5.9p1-r5
Does that mean there are no ftp servers for this distribution of Linux?
RE: TFTP (or FTP) Server - Added by Jonathan Cormier almost 12 years ago
Try running
opkg update
This will ask the update server for a new list of packages and then you can rerun the opkg list command. This will hopefully result in better results, otherwise its possible they don't have a ftpd package for the version of angstrom you are running.
RE: TFTP (or FTP) Server - Added by Mary Frantz almost 12 years ago
Ok, tried that ... here's the results. I don't think the update worked.
root@mityomapl138:/etc/init.d# opkg update
Downloading http://feeds.angstrom-distribution.org/feeds/v2012.05/ipk/eglibc/arm
v5te/base/Packages.gz.
wget: bad address 'feeds.angstrom-distribution.org'
Downloading http://feeds.angstrom-distribution.org/feeds/v2012.05/ipk/eglibc/arm
v5te/debug/Packages.gz.
wget: bad address 'feeds.angstrom-distribution.org'
Downloading http://feeds.angstrom-distribution.org/feeds/v2012.05/ipk/eglibc/arm
v5te/gstreamer/Packages.gz.
wget: bad address 'feeds.angstrom-distribution.org'
Downloading http://feeds.angstrom-distribution.org/feeds/v2012.05/ipk/eglibc/arm
v5te/machine/mityomapl138/Packages.gz.
wget: bad address 'feeds.angstrom-distribution.org'
Downloading http://feeds.angstrom-distribution.org/feeds/v2012.05/ipk/eglibc/all
/Packages.gz.
wget: bad address 'feeds.angstrom-distribution.org'
Downloading http://feeds.angstrom-distribution.org/feeds/v2012.05/ipk/eglibc/arm
v5te/perl/Packages.gz.
wget: bad address 'feeds.angstrom-distribution.org'
Downloading http://feeds.angstrom-distribution.org/feeds/v2012.05/ipk/eglibc/arm
v5te/python/Packages.gz.
wget: bad address 'feeds.angstrom-distribution.org'
Collected errors:
* opkg_download: Failed to download http://feeds.angstrom-distribution.org/feed
s/v2012.05/ipk/eglibc/armv5te/base/Packages.gz, wget returned 1.
* opkg_download: Failed to download http://feeds.angstrom-distribution.org/feed
s/v2012.05/ipk/eglibc/armv5te/debug/Packages.gz, wget returned 1.
* opkg_download: Failed to download http://feeds.angstrom-distribution.org/feed
s/v2012.05/ipk/eglibc/armv5te/gstreamer/Packages.gz, wget returned 1.
* opkg_download: Failed to download http://feeds.angstrom-distribution.org/feed
s/v2012.05/ipk/eglibc/armv5te/machine/mityomapl138/Packages.gz, wget returned 1.
- opkg_download: Failed to download http://feeds.angstrom-distribution.org/feed
s/v2012.05/ipk/eglibc/all/Packages.gz, wget returned 1. - opkg_download: Failed to download http://feeds.angstrom-distribution.org/feed
s/v2012.05/ipk/eglibc/armv5te/perl/Packages.gz, wget returned 1. - opkg_download: Failed to download http://feeds.angstrom-distribution.org/feed
s/v2012.05/ipk/eglibc/armv5te/python/Packages.gz, wget returned 1.
root@mityomapl138:/etc/init.d# opkg list | grep ftp
openssh-sftp - 5.9p1-r5
openssh-sftp-server - 5.9p1-r5
root@mityomapl138:/etc/init.d#
RE: TFTP (or FTP) Server - Added by Tim Iskander almost 12 years ago
That looks like either
1 - Your board is not able to see the internet
2 - You don't have a nameserver configured.
- The nameserver is specified in /etc/resolv.conf and is typically (although not always) the same as your gateway. Try
echo nameserver <ADDRESS OF YOUR NAMESERVER HERE> > /etc/resolv.conf
if your resolv.conf is not there.
If you don't know what address to use, try 8.8.8.8
cheers
/Tim
RE: TFTP (or FTP) Server - Added by Mary Frantz almost 12 years ago
Ran the following:
root@mityomapl138:/etc# echo nameserver 8.8.8.8 > resolv.conf
root@mityomapl138:/etc# opkg update
This ran more successfully, but still had this error:
Collected errors:
* opkg_download: Failed to download http://feeds.angstrom-distribution.org/feed
s/v2012.05/ipk/eglibc/armv5te/machine/mityomapl138/Packages.gz, wget returned 1
root@mityomapl138:/etc# opkg list | grep ftpd
owftpd - 2.8p15-r1 - owfs version 2.8p15-r1
Thanks for the help. My PC app developer now tells me he's found a .NET library for SFTP, so we'll go with that for now.
For completion's sake, the next step would be
opkg install owftpd
right?
RE: TFTP (or FTP) Server - Added by Jonathan Cormier almost 12 years ago
Reading the online page for owftpd doesn't lead me to believe that the owftpd program is a network ftp server. It seems designed for some kind of one-wire serial link...
RE: TFTP (or FTP) Server - Added by Michael Williamson almost 12 years ago
This error:
Collected errors: * opkg_download: Failed to download http://feeds.angstrom-distribution.org/feed s/v2012.05/ipk/eglibc/armv5te/machine/mityomapl138/Packages.gz, wget returned 1
is OK. We don' have any packages for the mityomapl138 registered or deployed through the angstrom feeds. You can ignore this error.
Yes, the next step would be to run the install command.
-Mike
RE: TFTP (or FTP) Server - Added by Mary Frantz almost 12 years ago
Based on Jonathan's comment, it appears that ftp is not supported on this platform. Guess it'll have to be sftp.
Thanks for the help.
Mary
RE: TFTP (or FTP) Server - Added by Michael Williamson almost 12 years ago
If you really must have ftp, you can recompile busybox (this is installed currently, but the option is not enabled) and add ftpd as an option. This is really how you would install it.
There is a really should link here about rebuilding it:
http://support.criticallink.com/redmine/projects/arm9-platforms/wiki/Modifying_Busybox
Certainly, the platform is capable of running ftpd. But you are correct in that we (well, really the Angstrom distribution) do not enable it in our reference filesystem.
I am sorry for the inconvenience.
-Mike