build mcu server
seebing said:
I think the steps to build an embeded web page are as below
1) build the web page or html file using front page , macromedia dreameaver & etc
2) convert the html and the picture (Jpg, gift...) file to c with c header and c source
3) a function in the main to transfer the web page through the port
please clrrect me if I am wrong
Added after 1 hours 43 minutes:
and for active web page which mean remote control the mcu then we should use programming like asp ,php , cgi to develop the web.
again correct me if I am wrong
I did this thing before, I use AVR 8 bit uCs (ATMEGA16-16KB Flash, 1KB SRAM) and it worked quite fine.
I don't know much about active web page as php, asp,etc. but I use simple HTML form(buttons) for remote controling purpose. and if you read something about basic HTML form i think you can find that it is quite easy to get the command stored inside any HTTP request from from the browser.
just read some reference in the internet (from slides courses, I even don't understand RFC
)
and yes, you're right to convert them to C headers, i did change the files (html codes, small picture files) into constant variables.
so instead of declaring:
const char html_codes[] = {"<html> ...... "};
i think it is better to change it in this way:
const char html_codes[] = {0x3c, 0x68, 0x74......};
because you can put newline characters (0x0d, 0x0a) inside this const variables.
I made a program by c++ in PC before, to convert text file (for .html files) and binary file (for pic files) in this text files containing hexadecimal values of each bytes of the files. then i put this new text file in my c codes.
regards,