Anyone ever run a webserver off a microcontoller?

  • Thread starter thankz
  • Start date
In summary, a microcontroller can be used to host a web server that would be in any way helpful, meaningful, or useful.
  • #1
thankz
265
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
  • #2
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.
 
  • #3
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.
 
  • #4
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.
 
  • #5
but isn't the microcontroller able to change some of the page values, after all that's the point.
 
  • #6
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?"
 
  • #7
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:

1. Can a microcontroller handle the demands of running a webserver?

Yes, it is possible for a microcontroller to run a webserver. However, it would depend on the specific microcontroller and the complexity of the website being hosted. Microcontrollers with more processing power and memory would be better suited for this task.

2. How does a microcontroller connect to the internet for web hosting?

A microcontroller can connect to the internet through various methods such as Wi-Fi, Ethernet, or cellular networks. This allows the microcontroller to communicate with other devices and host a website.

3. What programming language is typically used for running a webserver on a microcontroller?

The most commonly used programming language for running a webserver on a microcontroller is C/C++. This is because these languages are low-level and can be optimized for the limited resources of a microcontroller.

4. What are the limitations of running a webserver on a microcontroller?

One major limitation is the limited processing power and memory of a microcontroller. This can make it difficult to handle large amounts of website traffic or complex websites. Additionally, microcontrollers may not support certain web technologies or protocols, limiting the functionality of the webserver.

5. Are there any benefits to running a webserver on a microcontroller?

Yes, there are several benefits to running a webserver on a microcontroller. It can be a cost-effective solution for hosting simple websites or for specific applications that require a small, low-power webserver. It can also be useful for projects that require a small, self-contained webserver, such as in the Internet of Things (IoT).

Similar threads

  • Programming and Computer Science
Replies
7
Views
458
  • Computing and Technology
Replies
4
Views
1K
Replies
7
Views
218
  • Electrical Engineering
Replies
1
Views
2K
  • Programming and Computer Science
Replies
16
Views
1K
Replies
13
Views
1K
Replies
12
Views
927
  • Computing and Technology
Replies
22
Views
5K
  • Beyond the Standard Models
Replies
1
Views
2K
  • Electrical Engineering
Replies
2
Views
2K
Back
Top