Anyone ever run a webserver off a microcontoller?

  • Thread starter Thread starter thankz
  • Start date Start date
Click For Summary
SUMMARY

This discussion centers on the feasibility of running a web server on a microcontroller, specifically the PIC18F67J60. Participants explore various aspects, including TCP implementation, handling of HTTP requests, and the limitations of memory for serving web pages. While some hobbyists have successfully created basic web servers on microcontrollers, the consensus is that for practical applications, using a basic Linux micro-PC is more efficient. The conversation highlights the potential for microcontrollers to provide simple web interfaces for devices without the overhead of a full PC.

PREREQUISITES
  • Understanding of PIC TCP implementation
  • Knowledge of HTTP protocols, specifically HTTP/1.0 and HTTP/1.1
  • Familiarity with microcontroller memory limitations, particularly on the PIC18F67J60
  • Basic networking concepts, including IP addressing and broadcast addresses
NEXT STEPS
  • Research how to implement a web server on the PIC18F67J60 microcontroller
  • Learn about handling HTTP requests and responses in embedded systems
  • Explore the differences between TCP and UDP for web server applications
  • Investigate the use of minimalistic web server software for microcontrollers
USEFUL FOR

Embedded systems developers, hobbyists interested in microcontroller applications, and anyone looking to implement lightweight web interfaces for networked devices.

thankz
Messages
265
Reaction score
40
I have a few questions:

particularly for the pic tcp implementation.
what happens when you send data to to port 0.0.0.0?
is 255.255.255.255 usable as a broadcast address?
I'm guessing you can change the ip address in software?
does it use a loopback address for anything?
do you have to run http only on port 80?
how does it handle a put request?
do you actually host an index.html page?
is it binary values that just change from 1 to 0 in a change of state event during the get request?
if so, does that mean you need a smart client side program to interpret the data?
how often can the client poll the data?
is http part of the tcp stack or do you have write that?
http1.0 or 1.1?
if going through a switch do you need a gateway address?
does it have standard http error messages?
can you run with udp also?
how much html can you actually fit on the pic18F67J60? <--:edit I guess I could figure that out buy translating ascii into bytes.

tia
 
Engineering news on Phys.org
I can't imaging that you could get even the most primitive server software into 4K of memory. You might get some really minimal transaction software but nothing like a real set of server software.
 
but it is possible to make a 1k web page, I just put some letters into notepad to see the size and one character equals one byte, I ignored ntfs 4k block size.
 
Sure, but that's not what you asked about. Could you serve that page up to a browser from a microcontroller? Even if you could, that would be just a single fixed page. Not much of a server.
 
but isn't the microcontroller able to change some of the page values, after all that's the point.
 
thankz said:
but isn't the microcontroller able to change some of the page values, after all that's the point.
Yes. Maybe I'm interpreting your question differently than you meant it. Let me tell you the question that I have been attempting to answer and if it not the question you are asking, then my answers are not as pertinent as I thought.

The question I have been attempting to answer is "Can a microcontroller be used to host a web server that would be in any way helpful, meaningful, or useful?". You might be asking "is it possible for a microcontroller to perform some trivial basic functionality that has some of the aspects of a web server?"
 
It seems some people have done so, more as a hobby than a practical solution as it is probably easier, faster, less expensive and more efficient to use a basic linux micro-pc.

But the issue shouldn't be the size of what you serve, the server just needs to address it and stream it.

Saw this : http://www.drdobbs.com/embedded-systems/building-your-own-web-server/211300170

I can see a reason for using a microcontroller though, to provide a web interface to a device, forvwhich only a basic server would be needed and a pc would be overkill. I.suspect this might be how some simple network devices that have a web interface do it.
 
Last edited:

Similar threads

  • · Replies 9 ·
Replies
9
Views
4K
  • · Replies 4 ·
Replies
4
Views
2K
Replies
7
Views
3K
  • · Replies 16 ·
Replies
16
Views
2K
Replies
13
Views
2K
  • · Replies 22 ·
Replies
22
Views
5K
Replies
12
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 2 ·
Replies
2
Views
4K