Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

help: set up link between MCU and web server

Status
Not open for further replies.

seebing

Newbie level 4
Joined
Jan 26, 2006
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,353
www.mcu.ac.in port 80

I am currently using freescale microcontroller MC9S12NE64. The MCU has ethernet media access controller(EMAC) with intergrated 10/100 Mbps Ethernet physical transceiver (EPHY). It has 64K Flash ROM and 8K RAM.

I would like to use the internet to control the MCU. I need help on this and to set up the link between MCU and web server. is there any reference source code for this? I used to write assemble langguage for MCU but has no experience in embeded C.
 

seebing

Newbie level 4
Joined
Jan 26, 2006
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,353
setup uplink

thanks for your help alzomol. The links are in ftp format. I can't download the ftp files as they are all block by the server firewall.

I find the following site and want to share it. the document

contains the full source code to uIP as well as the documentation in PDF and HTML formats. It is a very good document.


https://www.sics.se/~adam/uip/download.html


now I have another question.

if I were to build a simple GUI web server in MCU, how should I do that?
should I build the GUI in VB or VC in windows (I know how to do this) and then link them to the MCU firmware. any example source code on embeded GUI web server?
 

banh

Advanced Member level 1
Joined
Dec 16, 2004
Messages
458
Helped
17
Reputation
34
Reaction score
5
Trophy points
1,298
Activity points
3,937
mcu doing a get command to html

i think what you need to do is to build a simple web server on your MCU.
a web server will listen to port 80 (TCP) and responds to request.
responds and requests conform to HTTP. hence the GUI you need to build has nothing to do with VB or VC. it is in HTML.

if you want to have simple control for the MCU, your web server should be able to handle simple form (simplest way is GET method; or you can try handling POST method).
 

seebing

Newbie level 4
Joined
Jan 26, 2006
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,353
mcu web server

what is POST method and GET method. please elaborate. how to build a simple GUI web server in MCU? what are the steps and sample code?


yes. you are right, banh I want to have a simple control on MCU with GUI Web server.
 

banh

Advanced Member level 1
Joined
Dec 16, 2004
Messages
458
Helped
17
Reputation
34
Reaction score
5
Trophy points
1,298
Activity points
3,937
how to set a link to file server on web server

I think you should gradually read up..

Try searching for "TCP/IP Lean" book in this forum. It might be helpful.
 

seebing

Newbie level 4
Joined
Jan 26, 2006
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,353
uip cgi example

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
 

Truclam

Junior Member level 1
Joined
Nov 11, 2005
Messages
16
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,489
mcu web server html

Hi all,
I have a circuit about tcp/ip system.But I don't know how to transfer data from AVR microcontroller to web servers.



Does anyone help me?Please give me a sample
if I want to transfer "12345" string from AVR to web servers or from web servers to AVR .
My email is : luongvinhphu1003(at)yahoo.com
Best regards.
 

LBdgWgt

Member level 5
Joined
Mar 6, 2006
Messages
83
Helped
5
Reputation
10
Reaction score
0
Trophy points
1,286
Activity points
2,066
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,
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top