Wiznet WIZ110SR

botronics

New Member
I have a Wiznet wiz110SR that is essentially a serial port at an IP address. Its very easy to talk to a picaxe connected to the serial port with a telnet session. In fact, I use my iphone (Mocha Telnet) to turn things on and off and read the temperature. Is it possible to make a tiny server with it. I would like to have a webpage button that I can click on that will send a command to the wiznet with a return of the temperature. Some of your ideas seam to point to a solution. Would I need to use something like java to make the webpage active or can I just write something in HTML? I have written webpages before using Netscape Composer and not to versed with straight HTML.
 

botronics

New Member
Here is what I learned so far: In a browser for an example, if I send a "1" to wisnet's URL http://ip address:pORT#,1 I will get the header GET /1 HTTP1.1 with several more characters of things you don't need.

Right after the GET / will be the character 1, the character I sent at the end of the URL. That character is the control number the picaxe is seeking out to know which relay to turn on.

With the serin command I used GET / as qualifier. Then the preceding character is the command number. I found that the framing rate was messed up if the baud rate for the wiznet was too fast. So I slowed it down to 1200 baud.

As soon as the picaxe gets the command number, the relay turns on. Then, I need to close the connection by sending the following using serout:

HTTP/1.1 200 OK
Content-length 20
Connection:close

After that, I send out some text such as "Relay 1 ON". I can see the characters leave the wiznet, but they do not show up on the browser. Thats where I am stuck. It seems the browser is ignoring all the characters from the TCP connection from the wiznet. What do I need to do to make the browser show those characters?
 

g6ejd

Senior Member
Take a look a tthe Ardunio web page examples for displaying data received from a wiznet. Are you using a correctly formated html page to receive the data and display it - examples on Ardunio.

Example from my Arduino Web Server, principles are the same.

Code:
    while (client.connected()){
      if (client.available()) {
        char c = client.read();
        // if you've gotten to the end of the line (received a newline character) and the line is blank, the http request has ended, so you can send a reply
        if (c == '\n' && currentLineIsBlank) {
          // send a standard http response header
         client.println("<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">");
         client.println("<html xmlns=\"http://www.w3.org/1999/xhtml\">");
         client.println("<meta http-equiv=\"refresh\" content=\"10\">");
         client.println("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" / >");
         client.println("<PRE>");
         //print the current readings, in HTML format:
         client.print("<body>");
         client.print("<body bgcolor=\"#CAE1FF\">");
         client.println("*** ARDUINO Webserver *** (c) G6EJD 2012");
         client.println("Serving Temperature, Air Pressure and Time with Sun Rise and Sun Set");
         client.println("Sensors: BMP085 Temp/Pressure and time is DS1307");
         client.println();
         client.print("Air Temperature  : ");
         client.print(temperature);
         client.println("°C");
         client.print("   Air Pressure  : ");
         client.print(float(int((pressure+548)/10))/10);
         client.println("mB");
         DateTime now = RTC.now();
         client.print("   Current Time  : ");
         if (now.day() < 10) { client.print("0"); }
         client.print(now.day(), DEC);
         client.print('/');
         if (now.month() < 10) { client.print("0"); }
         client.print(now.month(), DEC);
         client.print('/');
         client.print(now.year(), DEC);
         client.print(' ');
         if (now.hour() < 10) { client.print("0"); }
         client.print(now.hour(), DEC);
         client.print(':');
         if (now.minute() < 10) { client.print("0"); }
         client.print(now.minute(), DEC);
         client.print(':');
         if (now.second() < 10) { client.print("0"); }
         client.print(now.second(), DEC);
         // Display sunrise and sunset for tis position
         curYear  = now.year();
         curMonth = now.month();
         curDay   = now.day();
         TimeLord SunRiseSet;
         SunRiseSet.TimeZone(0);
         byte day[] = { 0, 0, 12, curDay, curMonth, curYear }; // noon
         SunRiseSet.Position(LAT, LON);
         if (SunRiseSet.SunRise(day)) {
           client.print("  Sunrise : ");
           if (day[tl_hour] < 10) { client.print("0"); }
           client.print((int) day[tl_hour]);
           client.print(":");
           if (day[tl_minute] < 10) { client.print("0"); }
           client.print((int) day[tl_minute]);
           client.print(" Hr");
           daylengthSR = day[tl_hour] * 60 + day[tl_minute];
         }
         if (SunRiseSet.SunSet(day)) {
           client.print("  Sunset : ");
           if (day[tl_hour] < 10) { client.print("0"); }
           client.print((int) day[tl_hour]);
           client.print(":");
           if (day[tl_minute] < 10) { client.print("0"); }
           client.print((int) day[tl_minute]);
           client.print(" Hr");
           daylengthSS = day[tl_hour] * 60 + day[tl_minute];
           client.print("   Daylight = ");
           if (((daylengthSS-daylengthSR) / 60) < 10) { client.print("0"); }
           client.print((daylengthSS-daylengthSR) / 60);
           client.print(":");
           if (((daylengthSS-daylengthSR) % 60) < 10) { client.print("0"); }
           client.print((daylengthSS-daylengthSR) % 60);
           client.println(" Hr");
         }
         // Predict and display the weather
         weatherDiff = pressure - ePressure;
         client.print("Weather forecast : ");
         if(weatherDiff > 250)
         client.println("Sunny");
          else if ((weatherDiff <= 250) || (weatherDiff >= -250))
         client.println("Partly Cloudy");
          else if (weatherDiff > -250)
         client.println("Rain");
         
         client.println("<BR />");
         client.println("</PRE>");
         client.println("</body>");
         client.println("</html>");
         break;
         }
        if (c == '\n') {
        // you're starting a new line
        currentLineIsBlank = true;
        } 
        else if (c != '\r') {
        // you've gotten a character on the current line
        currentLineIsBlank = false;
        }
      }
    }
 

botronics

New Member
That's the problem, I really don't know how to format the html on my webpage to receive and show the data from the wiznet. In the case with your Arduino, the Arduino is the webpage. I suppose I could program the picaxe to response like a webpage and send out HTML like your Arduino does. That would means the picaxe needs to be the client. I tried having the picaxe send out HTML, but the browser just ignores it. I've been looking at a few examples to figure out how it "connects", just no one explains all the details.
 

g6ejd

Senior Member
You need to be setting up the Ethernet board as a client and have set an IP address with default port of 80.

When a connection is made to the Ethernet card say at 192.168.1.20 then your picaxe needs to supply to the Ethernet the HTML like in my example above, it's only one line of HTML really but without it your browser displays nothing!

This is all the arduino is doing its not running a tcpip stack. So in that respect it is broadly the same as the picaxe.
 

botronics

New Member
I set the board to port 80, mixed mode and tried client mode. Its still not showing html on the browser. I'm missing something with the headers. When I run using hyperterminal in TCP/IP mode, I can see the html come from the wiznet when I send GET /. Why doesn't the browser see that?
 

g6ejd

Senior Member
Yes, which browser. I've found that works well for me in IE9 can in some instances not display anything in another browser. For example in my code snippet above it works well on IE9, but gives an erro and displaysnothing on my ipad. So much for browser standards.

Try copying the text sent into an html file on say your desktop and point your browser at it/double-click it and see if it will display the contents, I'm thinking it's most likely to be your browser too.

You do need those header statements for example in an html page.

I would create an html extension file and put some test contents in to make sure your browser is not the problem:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="refresh" content="10">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" / >
<PRE>
<body><body bgcolor="#CAE1FF">*** ARDUINO Webserver *** (c) G6EJD 2012
Serving out Temperature, Air Pressure, Distance and Time with Sun Rise and Sun Set
Sensors: BMP085 Temp/Pressure, Distance is Ultrasonic HC-SR04 and time is DS1307
Air Temperature  : 23.70°C
   Air Pressure  : 999.30mB
       Distance  : 4.90 cm
   Current Time  : 26/11/2012 17:23:41  Sunrise : 07:44 Hr  Sunset : 16:08 Hr   Daylight = 08:24 Hr
Weather forecast : Partly Cloudy
<BR />
</PRE>
</body>
</html>
I've just copied that from my Arduino web server, so that works on IE9, but not my iPAd /Safari but Chrome OK, etc.
 
Last edited:

lbenson

Senior Member
But of course you need very little for a test web page. This will do it from a command prompt:

echo "<html><body>Bingo!</body></html>" > bingo.html

Then point your browser to bingo.html in whatever folder you put it in, and it should show up.
 

buntay

Senior Member
hey all,

I must say, I have been following this post and the brain has been going, so I must ask if my thought process is off.

First off i have this http://www.4dsystems.com.au/prod.php?id=22
and ordered this http://www.ebay.com/itm/261118702218?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1497.l2649

so here is the thought, 1 picaxe runs a program and serout's data then another picaxe is dedicated to web serving, writing a html file on any new received data and storing this file on the sd card, the Ethernet module receives a call from a web browser and tells the second picaxe to start serouting the html file through the Ethernet module.

in my minds theoretical eye this should work and just be a matter of programming.
if this is true any setup like this could be a webpage server..........i will be receiving the Ethernet module in a couple weeks and want to start testing this.........unless somebody knows something i dont.........Thoughts?
 

g6ejd

Senior Member
Yes that will all work. You could either build a page or pages line by line with print statements then send them to the Ethernet or build them with a editor and copy them to your storage device then pull the file and send it to the network. You should only need one picaxe to do all that.

To view it from the outside world you will need to open your router to the chosen IP address and port ( usually 80 ) and then find your IP address.

If you set your EN to 192.168.1.50 and you port forward outside connections to that address the network will map your global ip to the local ip as above that will generate a connection request and all you need to do is service the serial commands (data) as per the data sheet.

I like the idea.
 

Hemi345

Senior Member
Here is what I learned so far: In a browser for an example, if I send a "1" to wisnet's URL http://ip address:pORT#,1 I will get the header GET /1 HTTP1.1 with several more characters of things you don't need.

Right after the GET / will be the character 1, the character I sent at the end of the URL. That character is the control number the picaxe is seeking out to know which relay to turn on.

With the serin command I used GET / as qualifier. Then the preceding character is the command number. I found that the framing rate was messed up if the baud rate for the wiznet was too fast. So I slowed it down to 1200 baud.

As soon as the picaxe gets the command number, the relay turns on. Then, I need to close the connection by sending the following using serout:

HTTP/1.1 200 OK
Content-length 20
Connection:close

After that, I send out some text such as "Relay 1 ON". I can see the characters leave the wiznet, but they do not show up on the browser. Thats where I am stuck. It seems the browser is ignoring all the characters from the TCP connection from the wiznet. What do I need to do to make the browser show those characters?

Can you post the exact code you're using for the serout commands? Chances are you're not formatting the response correctly or leaving out some required headers.

Code:
HTTP/1.1 200 OK
Content-Type: text/html; charset=us-ascii
Date: Tue, 27 Nov 2012 20:15:40 GMT
Connection: close
Content-Length: 88

<html>
<head>
<title>Picaxe Response</title>
<body>
Hello Visitor!
</body>
</html>
 
Last edited:

botronics

New Member
Picaxe server code

I have been using Firefox. I simplified the code just to turn on 1 relay. When I enter the URL in the browser, I can hear the relay click. So the GET / works. I will try your header example while you read this. Code:

Code:
readport:
serin c.1, T1200_4,("GET /"),b1
sertxd ("b1= ",#b1,13,10) 'optional diagnostic port
if b1 = 49 then 'got a "1"
gosub header1
end if
goto readport
 
header1:
high B.1 'click relay on/off
pause 500
low B.1
serout b.4,T1200_4, ("HTTP/1.1 200 OK",13,10)
serout b.4,T1200_4, ("Content-Type: text/html",13,10)
serout b.4,T1200_4, ("Connection: close",13,10)
serout b.4,T1200_4, ("",13,10)
serout b.4,T1200_4, ("<!DOCTYPE html>",13,10)
serout b.4,T1200_4, ("<html>",13,10)
serout b.4,T1200_4, ("<body>",13,10)
serout b.4,T1200_4, ("Hello!",13,10)
serout b.4,T1200_4, ("</body>",13,10)
serout b.4,T1200_4, ("</html>",13,10)
return
end
 

botronics

New Member
Hemi345, I tried your headers and they didn't help. Its interesting I can click on a relay, so I'm talking to the module. I tried changing to port 80 and got a response from my home router, so I went back to my port 5000. I don't want to mess with the router.
 

Hemi345

Senior Member
You need to be setting up the Ethernet board as a client and have set an IP address with default port of 80.
That's not how I understand the datasheet on it. If the Wiznet was configured as the client, then wouldn't it be need to be configured to point to an server on the ethernet side? I think for your configuration, botsmaker, I would set it to Server. The client (your PC) would send the request to the Wiznet (server) which would pass the command to the Picaxe and return a response back to the Wiznet which would respond back to the client.
 

Hemi345

Senior Member
Hemi345, I tried your headers and they didn't help. Its interesting I can click on a relay, so I'm talking to the module. I tried changing to port 80 and got a response from my home router, so I went back to my port 5000. I don't want to mess with the router.
What kind of response back from your router? It sounds like your Wiznet is using the same IP address as your router's IP. I saw your post on Sparkfun's comments. Try changing the IP of the Wiznet to 192.168.1.252 and configure it for port TCP 80 again.
 

Hemi345

Senior Member
Actually, you're using the serial to ethernet wiznet. I dont think this is possible because the response the wiznet is sending back to the browser is a telnet packet, not a http packet. I'd Wireshark your lan and watch the traffic to get a better idea of what it is doing.
 

botronics

New Member
I downloaded Wireshark and will try it. We should see what we can see. Thanks for the tip. Looks like a interesting program.
 

hippy

Ex-Staff (retired)
Could the simple code posted above be put into a PICAXE and use the SLIP protocol?
Unlikely. SLIP just carries raw data packets and passes them around over serial rather than over RJ45 LAN cable. You would need a full TCP/IP stack to handle everything.
 

lbenson

Senior Member
Do you need to put this at the beginning of your returned html text?

"Content-type: text/html"

Oops, I see you have that. In a working cgi-bin program that I have (so perhaps a different situation) I don't have the line in your code which preceeds that. Nor do I have "Connection: close" (and I don't know what effect that is supposed to have (pure ignorance on my part)).
 

Hemi345

Senior Member
Try:

Code:
serout b.4,T1200_4, ("HTTP/1.1 200 OK",13,10,"Content-Type: text/html",13,10,"Connection: close",13,10,13,10,"<!DOCTYPE html><html><body>Hello!</body></html>",13,10)
 

hippy

Ex-Staff (retired)
There's a whole lot of 'crud' by way of header fields in a request and in a response but most, possibly all, of the response headers can be left out. Some RFC would likely be the definitive resource but a list is here -

http://en.wikipedia.org/wiki/List_of_HTTP_header_fields

What the TCP/IP module does determines what a connected micro will see and what it has to respond with. For a TCP/IP to Serial module the PICAXE likely does need a "HTTP/1.0 200 OK" reply.

Edit : HTTP/1.0 or HTTP/1.1 ? Try 1.0 if 1.1 doesn't work!

It can be a pain to get a browser to display page contents, especially if browser caching is getting in the way, so the best bet is to first Telnet into the server port, issue a GET command and see what comes back. Then try to figure out, if that works, why then a browser doesn't show it. Using "WGET" or similar command line utility will fetch the file, even if a browser won't display it which can help in figuring out what is wrong.
 

botronics

New Member
I discussed the problem with Mark Sherman and he made the following comments:

"Your http header doesn't have content-length, so the browser doesn't know when to close the connection. I think you need the wiznet to close the connection for you. I looked in the wiznet docs, and there's an option you can configure that sets a timeout before the it closes the connection. If you set the timeout to a couple of seconds, then what should happen is a little after your page has been sent through serial, then the wiznet will close the connection after a couple seconds of no activity on the serial port. When firefox detects the connection is closed, it should assume the document is finished and display the text. I think the wiznet minimum timeout is 1 second, so that's not too bad. I've gone to web pages on real servers that take more the 1 second to respond!

Port 80 vs 5000 shouldn't matter, if you put the port in the URL. 80 is just the default: if you go to http://www.google.com, you are really going to http://www.google.com:80. I run web servers at work on non-standard ports all the time. Also, Hemi345 said it won't work because the Wiznet sends telnet packets and the browser wants a http packet. But both protocols use TCP packets, so it doesn't matter; properly formatted text over telnet is http.

Also if you use " Content-Type: text/plain" in header, you don't need html formatting, it can just be plain text."

So this morning, I configured the Wiznet with a 2 second time-out. The webserver now works! When I go to the ip address, the relay clicks and out comes a response!

Now the only problem, it only works with Internet Explorer! Not with Firefox or Chrome. How about that one.
 

hippy

Ex-Staff (retired)
Now the only problem, it only works with Internet Explorer! Not with Firefox or Chrome. How about that one.
Probably time to post your latest complete code. Also in what way doesn't it work with Firefox or Chrome, what does it do and not do, what error messages, etc ?
 

Hemi345

Senior Member
Cool you got it working! I wasn't sure if the Wiznet was doing any sort of negotiation/handshake on the response back for telnet.

I mentioned the port 80 and 5000 thing because your router should not offer a response on port 80 unless you had configured the Wiznet to use the same IP address as the router (I'm assuming you were seeing the router's administration webpage since you didn't specify). It would be easier for you to use port 80 on the Wiznet so you don't have to specify it in the URL, the browser will default to 80. http://192.168.0.252/1 vs http://192.168.0.252:5000/1

If you slow the timeout even further, does Firefox work?

Right-click in Internet Explorer and choose "View Source". Also try this in Firefox and Chrome and compare. Firefox may be getting the response, but if you've included malformed HTML, firefox/webkit isn't as forgiving. If Firefox doesn't have anything, then you must be still missing some headers that those two browsers require. I would still include the following as the minimum:

Code:
serout b.4,T1200_4, ("HTTP/1.1 200 OK",13,10,"Content-Type: text/html",13,10,"Date: Mon, 01 Jan 2000 23:59:59 GMT",13,10,"Content-Length: 76",13,10,"Connection: close",13,10,13,10,"<html><head><title>Picaxe Response</title><body>Hello Visitor!</body></html>",13,10)
Also, using the "Cache-Control: no-cache" header is a good idea to prevent the browser from caching the page in your response back is customized. Like checking whether your relay is on or off.
 

Hemi345

Senior Member
Also, I'd like to know how you connected it. Did you use the DB9 header or solder some pins on to the connection on the side of the board. Thanks.
 

botronics

New Member
Latest Working Picaxe Server

I played with changes in the headers and it seemed to ignore headers. So I striped out all the headers. It worked in Firefox! So next I tested it on the local ip at my desktop and on an external computer through a webpage. With the local link, on this version, the word Bingo! would show on a page saying "Bingo!" On an external computer through a webpage, it would show Bingo! with all the HTML tags in front and back. Man, that's strange! Next I just put the word Bingo! with no HTML tags. At both links the word Bingo! would show.

So now by letting the Wiznet time out and close itself. The picaxe server works. Clicking on the link I get the relay to turn on and text to show.

Next I will play with the code and make a webpage that shows temperature or something. No html needed in the picaxe code, works with Firefox and no port 80.

I made a pc board for this project using ExpressPCB with a DB9 that plugs into the wiznet. I'll post photos if I can figure out how to use this forum's album feature.

I plan to show how all this works in an Instructable, once I work out the bugs.


Code:
'picaxe server
'picaxe 14m2 and Wisnet110SR
'saybingo.bas
'set timer on wiz110sr to 2 sec

settle:
low B.1
pause 1000

readport:
serin c.1, T1200_4,("GET /"),b1
sertxd ("b1= ",#b1,13,10) 'optional diagnostic port
if b1 = 49 then 'got a "1"
gosub header1
end if
goto readport
 
header1:
high B.1 'click relay on/off
pause 500
low B.1

serout b.4,T1200_4, ("Bingo!",13,10)

return


end
 

Hemi345

Senior Member
Nice work. Did you try the code I posted in #97?

It'll be great if you can figure out how to get the HTML working so the webpage has a nicer layout. Otherwise all your output will be on one line. Try putting a simple "<br>" tag in the output to see if any HTML is allowed.

Code:
serout b.4,T1200_4, ("Bingo!<br>Bingo on line 2!<br>Bingo on line 3!",13,10)
 

botronics

New Member
I'll have to experiment with getting html to work. So far I found that LF and CRs do work. So you can display more than one line. I'm going to get a Ethernet shield for my Arduino and try some coding with that. In the Arduino library there's probably routines that handle opening closing of communications that are not visible in the code. The Picaxe still is good for simplicity. I started programming with the Vic-20 and Timex Sinclare and never fully got the hang of C programming.
 

botronics

New Member
At the end of a http request, a blank line is needed to end the request and close the connection. I thought a ("") would be considered a blank line. Checking with wget, a ("") transmitted a hex value of 00. This was confirmed running a simulation with a short program. So what is a "blank line" and how can a picaxe send it at the end of a http request? Extra CRLF's are illegal. As stated at this website. http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html. I did try sending an extra CRLF at the end of a header, and the connection did not close. Photo show the results of the simulation and the hex value of ("").
 

Attachments

Last edited:

hippy

Ex-Staff (retired)
At the end of a http request, a blank line is needed to end the request and close the connection.
That is not the case. A blank line is needed and used to indicate the end of the header fields and to mark the start of any returned data. Blank lines are not the mechanism used to close the connection.

So what is a "blank line"
A blank line is the absence of anything else between two pairs of CR and LF characters, eg two consecutive CR and LF pairs give a blank line.

and how can a picaxe send it at the end of a http request?
It is sent at the end of the header fields as here -

SerOut ... ( "HTTP/1.0 200 OK", CR, LF )
SerOut ... ( "Content-Type: text/html", CR, LF )
SerOut ... ( CR, LF ) ; <---- Blank Line here
SerOut ... ( "<html><body>Hello</body></html>" )

I'm not sure how you would close the connection with what you have. Sending blank lines after the page data would simply be taken as more page data and would not close the connection.

The connection would have to be closed 'out of band' ( using some mechanism other than that used to send the data returned ) and that may not be possible with the Telnet module used, or the receiving browser would have to initiate the close of connection when it has received all the data sent. For the browser to know when the page data has ended it likely has to have received a Content-Length header.

As there are 31 octets (bytes) in the reply data this should work -

SerOut ... ( "HTTP/1.0 200 OK", CR, LF )
SerOut ... ( "Content-Type: text/html", CR, LF )
SerOut ... ( "Content-Length: 31", CR, LF )
SerOut ... ( CR, LF )
SerOut ... ( "<html><body>Hello</body></html>" )
 

botronics

New Member
I will try the last example. The wiznet has a timeout feature after an idle period. I will try it with and without that feature. Thanks.
 

botronics

New Member
Header works!

That works in Firefox, with and with out the timeout feature. Will check with wget and play with the header and see what breaks it. Doing so helps me understand how it works. Will also check with other browsers.

Code:
'picaxe server
'picaxe 14m2 and Wisnet110SR
'hellotest.bas


settle:
low B.1
pause 1000

readport:
serin c.1, T1200_4,("GET /"),b1
sertxd ("b1= ",#b1,13,10) 'optional diagnostic port
if b1 = 49 then 'got a "1"
gosub header1
end if
goto readport
 
header1:


SerOut b.4,T1200_4,( "HTTP/1.0 200 OK",13,10 )
SerOut b.4,T1200_4,( "Content-Type: text/html",13,10 )
SerOut b.4,T1200_4,( "Content-Length: 31",13,10 )
SerOut b.4,T1200_4,( 13,10 )
SerOut b.4,T1200_4,( "<html><body>Hello</body></html>" ) 

high B.1 'click relay on/off
pause 500
low B.1



return


end
 

hippy

Ex-Staff (retired)
Having looked at the WIZNET manual it seems there is no option but to let the browser know the size of data so it displays then tells the WIZNET to close the connection, or have the WIZNET timeout and close after sending the data then the browser hopefully displays what it has received when it sees that close.

What works may depend on the browser. I have a Kodak picture frame that pulls images over the net and that doesn't work unless it is told exactly how much data is being sent with a Content-Length header. Simply having the server close the connection, actively or on timeout, isn't enough to make it work.

The good news is that you should be able to make it work.

Added : Coss-posted, and it seems it does work ! Try taking out the Content-Length line and seeing if it works when using a WIZNET timeout. If so that will probably make things much easier, allow you not to have to worry about how much data you are sending back.

Extra added : And try this ( the rest the same ). It will help let you see if pages are being cached or not ...

SerOut b.4,T1200_4,( "<html><body>Yay-",#b9,"</body></html>")
b9 = b9 + 1 // 10
 

lbenson

Senior Member
Obviously, different circumstances and different browsers have different requirements, but I have never used "Content-Length" in any web page.

Glad you're seeing output.
 
Top