EmbeddedRelated.com
Forums

Embedded webserver on an 8 bit MCU

Started by zalzon July 17, 2004
"zalzon" <zalzonishappy@zalll.com> wrote in message
news:v0lhf051arjtgu6lstocj60rhhbtu7hrtb@4ax.com...
> Back from the grave. > > To advance my knowledge of embedded systems, I would like to build an > embedded webserver on an 877 PIC microcontroller. Nothing fancy as > far as the webserver is concerned. > > From what I gather, i need to impliment a tcp/ip stack on the MCU and > somehow hook it up to an ethernet card. For now, I've focused my > efforts at learning TCP/IP in as much detail as I can. > > Have any of you guys done such a project and if so what advice can u > give me. I'm just trying to learn so go easy on the abuse...
Have a look at www.edtp.com http://www-ccs.cs.umass.edu/~shri/iPic.html http://www.edcheung.com/awards/pic2k/code.htm http://members.vol.at/home.floery/electronix/picnic/webserver.html http://www.kyllikki.org/hardware/wwwpic2/ http://www.olimex.com/dev/picprojects.html http://web51.hw-server.com/links.html http://www.commlinx.com.au/microcontroller.htm Alex
On Tue, 20 Jul 2004 16:18:58 +1000, "Alex Gibson" <me@privacy.net>
wrote:


>Have a look at www.edtp.com > >http://www-ccs.cs.umass.edu/~shri/iPic.html >http://www.edcheung.com/awards/pic2k/code.htm >http://members.vol.at/home.floery/electronix/picnic/webserver.html >http://www.kyllikki.org/hardware/wwwpic2/ >http://www.olimex.com/dev/picprojects.html >http://web51.hw-server.com/links.html >http://www.commlinx.com.au/microcontroller.htm > >Alex
Thanks Alex, that should prove helpful.
zalzon wrote:
> On Sat, 17 Jul 2004 12:32:18 -0700, DM McGowan II wrote: > > >>http://www-ccs.cs.umass.edu/~shri/iPic.html > > > > That's exactly what I had in mind except I plan not to use an external > EEPROM to store webserver files. In fact I remember visiting the guy's > iPIC server when he first got it up. It attracted so many visitors > that the little iPIC crashed. He had to take it offline and set up a > simulated version of it on a webpage. I remember reading the text file > 'History of the World' on his iPIC though. :) > > Now if only he had provided the TCP/IP code and explained it. He > claims the TCP/IP code fits in just 256 bytes with the EEPROM chip > holding the server's files. Pretty impressive little gizmo.
It's clever, but it's not what the author claims it to be. Here's the rough algorithm for how it probably works: 1. receive header of IP frame (via SLIP) 2. swap destination and source addresses (and ports) 3. send the modified header in reply 4. use the destination port number as EEPROM address 5. send the data found at that address, byte at a time It gives somewhat the appearance of a real TCP/IP stack, but it certainly *not* RFC-1122 compliant as the author falsely claims. For instance: 3.3.2 Reassembly The IP layer MUST implement reassembly of IP datagrams. We designate the largest datagram size that can be reassembled by EMTU_R ("Effective MTU to receive"); this is sometimes called the "reassembly buffer size". EMTU_R MUST be greater than or equal to 576, SHOULD be either configurable or indefinite, and SHOULD be greater than or equal to the MTU of the connected network(s). Obviously, this implementation (and all similar ones) cannot support reassembly because they simply don't have enough memory to store a full frame (which MUST be greater than or equal to 576 bytes). Such implementations are interesting but they are not real TCP/IP stacks any more than a toothpick is a grand piano. Ed