Using TFTP
-
- Posts: 624
- Joined: Mon May 12, 2008 10:55 am
Using TFTP
I would like to add TFTP as a server to my NANO project. But the functions in tftp.cpp appear to be designed only for client use. Is there a server option available for the v2.9.5/6/7 version of the tools?
Re: Using TFTP
Server sourcing files or receiving files?
Where are the files the server is getting/sending coming from?
Programmatically generated/consumed?
To/From SDRAM?
Device Flash.
Device Flash file system
external SD Fat file system?
TFTP is a really simple protocol would not be hard to do, please be specific about the details...of what transactions you want this server to perform?
Where are the files the server is getting/sending coming from?
Programmatically generated/consumed?
To/From SDRAM?
Device Flash.
Device Flash file system
external SD Fat file system?
TFTP is a really simple protocol would not be hard to do, please be specific about the details...of what transactions you want this server to perform?
-
- Posts: 624
- Joined: Mon May 12, 2008 10:55 am
Re: Using TFTP
We only need to source/send a file. The file is installed at the factory during the manufacturing process via a different method and stored in EEPROM.
We receive a TCP command to prepare for file transfer, which causes the file to be copied to a buffer in sram. File size is around 128k.
It seems like a simple task could be created that just listened on UDP port 69, and when a WREQ command arrived, it would ack the command and call a modified version of function SendTFTP to send the file.
This is a rather convoluted process to send a file, but we need to be backward compatible with legacy processes.
We receive a TCP command to prepare for file transfer, which causes the file to be copied to a buffer in sram. File size is around 128k.
It seems like a simple task could be created that just listened on UDP port 69, and when a WREQ command arrived, it would ack the command and call a modified version of function SendTFTP to send the file.
This is a rather convoluted process to send a file, but we need to be backward compatible with legacy processes.
Re: Using TFTP
I'll try and get this working this week...
Re: Using TFTP
Would this work for you:
TFTP_Server MyServer(port_num);
//Now add files to the server....
TFTP_Server_File(MyServer,"Filename.dat", pFileData, file_len);
TFTP_Server_File(MyServer,"Filename2.dat", pFileData2, file_len2);
*
*
*
etc for as many files as you want to serve.
TFTP_Server MyServer(port_num);
//Now add files to the server....
TFTP_Server_File(MyServer,"Filename.dat", pFileData, file_len);
TFTP_Server_File(MyServer,"Filename2.dat", pFileData2, file_len2);
*
*
*
etc for as many files as you want to serve.
-
- Posts: 624
- Joined: Mon May 12, 2008 10:55 am
Re: Using TFTP
Yes. We only have one file to send.
Re: Using TFTP
Done, submit a support request to get the code.