Webserver Summer Project

  • 1
  • 2
  • Page 2 of 2
Gunter
Administrator
Avatar
Gender:
Location: Frankfurt Main / Germany
Posts: 1697
Registered: 02 / 2003
Subject:

Re: Webserver Summer Project

 · 
Posted: 30.12.2010 - 00:38  ·  #9
Hi Neil,

Line 8 is usually emtpy.
Line 9 contains your line 8 (line 3 refers zu line 9)
C:\E-LAB\AVRco\Optimiser\MerlinOptimiser.exe %Mp\%Mb.asm

The -R is abviously in the meantime obsolete.

Gunter
nwrightson
Benutzer
Avatar
Gender:
Location: Newcastle
Age: 62
Homepage: nweha.homeserver.c…
Posts: 362
Registered: 08 / 2003
Subject:

Re: Webserver Summer Project

 · 
Posted: 30.12.2010 - 02:08  ·  #10
Hi Guys,

On the move again.
After adding in the optimiser, my base code as originally posted has come down from 10KB to 7.5KB.
This is the W5100 TCP code with the TCP state machine and the basic web page as per the original code.
Now I can compile with the FAT16 added in and with the following code it comes to 10K.
I might get there yet :-)
Who said the Mega32 is too small to do anything with :-)

Code
function MMC_Check : boolean;
begin
     F16_OK := False ;
     If F16_DiskInit then                              // always the very fist step
        If F16_DiskReset then
           If F16_CheckDisk then
              F16_OK := True;
           Endif;
        Endif;
     Endif;
     Return(F16_OK);
end;



For those that are interested. I will keep you posted and of course provide a link to the AVR.

Neil.
nwrightson
Benutzer
Avatar
Gender:
Location: Newcastle
Age: 62
Homepage: nweha.homeserver.c…
Posts: 362
Registered: 08 / 2003
Subject:

Re: Webserver Summer Project

 · 
Posted: 01.01.2011 - 12:39  ·  #11
Starting to look good :-)

Tell me what you think....

http://121.44.239.39:8080 - Remember this is Dynamic. It could change again. :(


P.S.
I'm having some hardware issues with the W5100.
I think the PCB has a heat sensitive joint somewhere :(
I'm doing constant pings to the web server and every now and then it stops responding.
At this time the web server also stops.
Most times it does recover but.....

Neil.
nwrightson
Benutzer
Avatar
Gender:
Location: Newcastle
Age: 62
Homepage: nweha.homeserver.c…
Posts: 362
Registered: 08 / 2003
Subject:

Re: Webserver Summer Project

 · 
Posted: 01.01.2011 - 21:38  ·  #12
Morning All,

After using my phone, I have found that some web page GET commands can be quite large.
So I've done some changes to the code.
Please try again.
Neil.

Avra, Your in box is full.

I'm back from my bike ride, (having breakfast with the wife) so I thought I would give you a bit more info on what the problem was.

If I browse to the web server via a local ip address ie 10.0.0.250:8080. The actual TCP packet that is sent is about 400 bytes. When I browsed to my device using my external IP address, it was about the same size.
So I made the AVR buffer 500 bytes in size.

When I browse from my mobile phone via a 3G connection, the TCP packet is about 850 bytes.
So that meant 350 extra bytes being read in and overwriting other variables, not good.
When I saw other people browsing from Germany? They also were about 850 bytes in size.

The actual TCP packet coming from your browser has the address of the site doing the browsing. So various paths had different length address's.
nwrightson
Benutzer
Avatar
Gender:
Location: Newcastle
Age: 62
Homepage: nweha.homeserver.c…
Posts: 362
Registered: 08 / 2003
Subject:

Re: Webserver Summer Project

 · 
Posted: 03.01.2011 - 23:10  ·  #13
Hi All,
I've tried the web server from a few locations now and it seems to be coming up ok.
Has anybody else tried it?
Use the link from two posts back.
Neil.
Avra
Schreiberling
Avatar
Gender:
Location: Belgrade, Serbia
Age: 53
Homepage: rs.linkedin.com/in…
Posts: 653
Registered: 07 / 2002
Subject:

Re: Webserver Summer Project

 · 
Posted: 04.01.2011 - 02:18  ·  #14
Quote
http://121.44.33.112:8080 - Remember this is Dynamic. It could change again. :(

This can be solved with www.dyndns.com or some other similar service, and you can have an address like [url=neil.homeip.net]neil.homeip.net[/url].

Quote
Avra, Your in box is full.

Huh, thanks for the tip. I was not aware that inbox was limited to 50 messages. I really think this limit is set too low.

Quote
Has anybody else tried it? Use the link from two posts back.

At first try I have received "zero size reply", then minutes later I have tried again and I could see your main page with time of last edit. Then, few times in a row I have received "zero size reply" for both links on your main page. This is the page received:
Code
ERROR
The requested URL could not be retrieved

While trying to retrieve the URL: http://121.44.33.112:8080/Perf.htm

The following error was encountered:

    * Zero Sized Reply 

Squid did not receive any data for this request.

Your cache administrator is root.
Generated Tue, 04 Jan 2011 01:09:46 GMT by sepn1-4128 (squid/2.5.STABLE14) 


Then the same error for your main page, then suddenly perf.htm succeeded. From those tries, I can say that randomly about once in 5 times I get the html page, and successful reads were extremely slow.
nwrightson
Benutzer
Avatar
Gender:
Location: Newcastle
Age: 62
Homepage: nweha.homeserver.c…
Posts: 362
Registered: 08 / 2003
Subject:

Re: Webserver Summer Project

 · 
Posted: 04.01.2011 - 10:02  ·  #15
Hi Avra,

Thanks for trying it.
On my internal network it all responds quite quickly. However I do see a bit more of a lag when accessing via my external address.
I wonder what other external things might be slowing it down???

Out of curiosity, what browser are you using?

As you can see, I'm only serving static pages at the moment.

The questions is - How do I make them dynamic ie display variables and get input?

To start off with, I would like to be able to edit some basic things such as DeviceName, Time, Date, IP address details etc.

Seeing an input and setting an output would also be nice.

This would probably be pushing the bounds of the Mega32 though. Time to step up to a Mega128 etc.

All quite a learning curve. I only started this two weeks ago.
1) How does a Web server work?
2) How does a browser interface work
3) Design a TCP state machine
4) Make "Hello World"
5) Learn HTML


Neil.
Avra
Schreiberling
Avatar
Gender:
Location: Belgrade, Serbia
Age: 53
Homepage: rs.linkedin.com/in…
Posts: 653
Registered: 07 / 2002
Subject:

Re: Webserver Summer Project

 · 
Posted: 04.01.2011 - 20:51  ·  #16
Quote
Out of curiosity, what browser are you using?
Tests were done with FF 3.5.9 and IE7. I have tried the same today and although response is still very slow (20-30 sec), I couldn't repeat "zero sized reply" error.
Quote
As you can see, I'm only serving static pages at the moment.
The questions is - How do I make them dynamic ie display variables and get input?
Take a look here: http://shop.tuxgraphics.org/el…tware.html
  • 1
  • 2
  • Page 2 of 2
Selected quotes for multi-quoting:   0

Registered users in this topic

Currently no registered users in this section

The statistic shows who was online during the last 5 minutes. Updated every 90 seconds.
MySQL Queries: 15 · Cache Hits: 14   129   143 · Page-Gen-Time: 0.03725s · Memory Usage: 2 MB · GZIP: on · Viewport: SMXL-HiDPI