On Thursday 10 April 2008 20:58, Reuben Balik wrote: > I'm trying to use tftpd on my TI-OMAP board with busybox and am unable to > transfer a file. > I made a /var/tftp directory and put a file in it called test > I then run on the board the command: > udpsvd -v -E 0 69 tftpd /var/tftp/ > > In a pc's tftp client I set it to ascii mode and type "get test" > In the client I see: > tftp> get test > getting from 128.174.133.205:test to test [netascii] > sent RRQ <file=test, mode=netascii> > received ERROR <code=0, msg=malformed packet> > Error code 0: malformed packet > > And on the board I see: > udpsvd: listening on 0.0.0.0:69, starting > udpsvd: start 897 128.174.133.205:69-128.174.133.196:32846 > tftpd: malformed packet > udpsvd: status 1/30 > udpsvd: end 897 exit 1 > udpsvd: status 0/30
I'd like to see the packet being sent. Can you show "tcpdump -nlieth0 -s0 -xX port 69" output? The code which says "malformed packet" is: error_msg = "malformed packet"; opcode = ntohs(*(uint16_t*)block_buf); if (result < 4 || result >= sizeof(block_buf) || block_buf[result-1] != '\0' || (USE_FEATURE_TFTP_PUT(opcode != TFTP_RRQ) /* not download */ USE_GETPUT(&&) USE_FEATURE_TFTP_GET(opcode != TFTP_WRQ) /* not upload */ ) ) { goto err; } local_file = block_buf + 2; ... mode = local_file + strlen(local_file) + 1; if (mode >= block_buf + result || strcmp(mode, "octet") != 0) { goto err; } I'd hazard to guess that your mode is not "octet" but "ascii", and bbox's tftpd doesn't support that. But seeing packet capture results will be much better than just guessing. -- vda _______________________________________________ busybox mailing list busybox@busybox.net http://busybox.net/cgi-bin/mailman/listinfo/busybox