Error when attempting tftp upload
Denys Vlasenko
vda.linux at googlemail.com
Tue Apr 27 06:53:37 UTC 2010
On Tuesday 27 April 2010 07:12, Rob Landley wrote:
> On Wednesday 21 April 2010 06:47:45 Chuck Kuecker wrote:
> > Hello,
> >
> > This might be a simple problem, but so far I've not found a good solution.
> >
> > I am running Busybox in an ARM embedded system. I want to be able to
> > transfer a file from the embedded device to my Linux host. The host
> > system has tftp working - that's how I load the ARM system files.
> >
> > I issue tftp -p -l /mjpeg.api 192.168.0.200 69 at the embedded system to
> > transfer the .avi file to the host machine. I get this error:
> >
> > tftp: server error: (2) Access violation
> >
> > What does this mean. and what should I look at to fix it?
>
> Add an ssh client to your box?
>
> Statically linked dropbear binaries for a bunch of architectures:
>
> http://impactlinux.com/fwl/downloads/binaries
>
> Alternately, if you're asking what you can do with busybox, I'd suggest ftpget
> and ftpput to an ftpd on the host. (The tftp protocol is kind of sat, use
> real ftp.)
>
> But busybox ftpd requires an inetd variant to run under, and the easy way to
> do that (netcat's server mode) is broken in busybox:
>
> $ netcat -l -p 12345 -e cat bigfile &
> $ telnet 127.0.0.1 12345 > outfile
> 127.0.0.1: Connection reset by peer
> Connection closed by foreign host.
> $ ls -l bigfile outfile
> -rw-r--r-- 1 landley landley 22940512 2010-04-26 23:51 bigfile
> -rw-r--r-- 1 landley landley 20775272 2010-04-26 23:54 outfile
>
> That's a basic sanity test this implementation isn't passing.
How did you manage to run busybox nc as "netcat"?
Please show "netcat --help" output.
Why do you think telnet is a good method for downloading
raw binary data? It mangles 0xff bytes, for one.
It tries to respond to TELOPT_TTYPE options (255,24 byte pairs)
by sending back $TERM value. If it happens enough times,
network pipe fills up (since cat doesn't read stdin in this case),
and everything stalls.
On my machine:
/.2/video # busybox netcat
netcat: applet not found
/.2/video # nc -l -p 12345 -e cat Madagaskar.2.2008.D.TC.avi &
/.2/video # nc 127.0.0.1 12345 >outfile </dev/null
[2]+ Done nc -l -p 12345 -e cat Madagaskar.2.2008.D.TC.avi
/.2/video # md5sum Madagaskar.2.2008.D.TC.avi outfile
12b3ef999ad092e87a0ac27123679441 Madagaskar.2.2008.D.TC.avi
12b3ef999ad092e87a0ac27123679441 outfile
/.2/video # ls -l Madagaskar.2.2008.D.TC.avi outfile
-rw------- 1 root root 1467863040 Nov 15 2008 Madagaskar.2.2008.D.TC.avi
-rw-r--r-- 1 root root 1467863040 Apr 27 08:27 outfile
> I used to have this working, but git commit 29fe7265b8c1917ebc blew away my
> code with a completely unrelated external port that doesn't even get the basic
> bidirectional shutdown() stuff right.
Clue me in what is this shutdown() thing.
> It also doesn't have things like the
> persistent server option (-L), or the ability to allocate a tty (-t), or the
> connect to file option (netcat -f) which let netcat attach stdin and stdout to
> an arbitrary char device (such as /dev/ttyS0) instead of a network socket. (I
> was kind of proud of that one.)
Every new reimplementation of nc adds more features. Yours is actually
better than most, because others don't bother to not *break compatibility*.
> Netcat used to be able to replace minicom and act as a poor man's inetd, but
> now we have a minicom applet and we have a tcpsvd, because writing three
> separate applets to perform essentially the same job is smaller and simpler?
--
vda
More information about the busybox
mailing list