Post method with the web server of ColdFire TCP/IP Lite by InterNiche.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Post method with the web server of ColdFire TCP/IP Lite by InterNiche.

1,742 Views
fjoli
Contributor I
Hello,

I work on the board 52235EVB with codewarrior V7.0 and I am using the ColdFire TCP/IP Lite by InterNiche.
I would like to know if it is possible to add a post method in order to be able to post a file by the web server.

Is there somebody who has already do it ?
Could somebody help me or show me some example ?

Thanks

Fabien

Labels (1)
0 Kudos
4 Replies

459 Views
NT
Contributor I
Hi fjoli
 
I had the same problem and I was able to do it.
 
Please go to the following link.
 
Thanks,
NT
0 Kudos

460 Views
mjbcswitzerland
Specialist V
Hi Fabien

Take a look at the uTasker project.

It includes the firmware uploading technique that you are working on. It allows uploads via FTP or HTTP post into internal FLASH or external SPI FLASH. On reset it then programs the new firmware in a manor which excludes failure possibilities even when the power is lost at any time during the process.

This requires 2k boot loader space (or 4k with externmal FLASH) and allows also encrypted uploads so that SW can be distributed without competitors being able to read it. Once in the chip it is fully protected from access using the standard inbuilt protection methods.
The project comes with a M5223X simulator so all of this can be simulated in 'real-time' on a PC. It also incudes an OS, TCP/IP stack and device drivers - it also has a dedicated support forum at http://www.uTasker.com/forum/
It is distributed with full source code and is free for use in non-commercial projects.

Regards

Mark

www.uTasker.com


0 Kudos

460 Views
fjoli
Contributor I
Hi Mark,

Thanks for your reply, but I have already take a look to your project and I don't really understand how you do the post method.
I would like to add this method to the web server of the ColdFire TCP/IP Lite by InterNiche.

Could you help me about how to detect that a file have been posted in a web page and how to get this file in the board.

Regards

Fabien

0 Kudos

460 Views
mjbcswitzerland
Specialist V
Hi Fabien

The easiest way to develop such functions is to look at Ethereal/Wireshark recordings and then 'play back' these contents through you new code.

The uTasker method during post is to identify the post by analysing the header sent by the web browser.
There are several tags which need to be identified:
"boundary=" is a mime boundary which splits parts in the post (eg. text, application, binary etc. can be sent in one post).
"Content-Length:" will indicate the size of each file.
"\r\n\r\n" is used also to end most tags.
The following indicate some examples content types which are being sent:
"application/octet-stream\r\n\r\n"
"text/plain\r\n\r\n"
"image/gif\r\n\r\n"

We have an option to define which types of post are supported (application/octet-stream is for example adequate for binary code uploading).
Once you are synchronised to the data content and know its length it can be saved to FLASH (or to a file). When all has been received the file can be closed and a reset commanded if the copy phase should be started.

The uTasker supports playing back Ethereal recordings through its simulator so makes development of such things fairly easy (basically it involves adding a parser to interpret the TCP data). I don't have any experience with your stack and development environment but the parsing part is quite adstract from the stack itself.

Regards

Mark

www.uTasker.com


0 Kudos