Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Anyone ever run a webserver off a microcontoller?

  1. May 25, 2015 #1
    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
     
  2. jcsd
  3. May 25, 2015 #2

    phinds

    User Avatar
    Gold Member
    2016 Award

    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.
     
  4. May 25, 2015 #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.
     
  5. May 25, 2015 #4

    phinds

    User Avatar
    Gold Member
    2016 Award

    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.
     
  6. May 25, 2015 #5
    but isn't the microcontroller able to change some of the page values, after all that's the point.
     
  7. May 25, 2015 #6

    phinds

    User Avatar
    Gold Member
    2016 Award

    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?"
     
  8. May 25, 2015 #7

    wabbit

    User Avatar
    Gold Member

    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: May 25, 2015
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Anyone ever run a webserver off a microcontoller?
Loading...