I can serve tiny web pages from my Uno + Ethernet shield... the "latest" one at 7/11, the one with a microSD socket but no version number...
But if I modify my program, asking my little server just to send a longer, bigger, whatever you want to call it, webpage, things go wrong.
I don't know if I am confusing the Arduino Ethernet Library or the W5100 chip at the heart of my Ethernet interfacer.... but SOMETHING becomes unhappy. And it doesn't grace me with good error messages, either. Buffer overflow?
So...
Is there a simple "you can send pages of up to xx characters" limit? What is xx? Is there any way to send a longer page in response to a browser's access of my server?
Is there a simple "you can send pages of up to xx characters" limit? What is xx? Is there any way to send a longer page in response to a browser's access of my server?
No, there is no simple rule. The literal strings you want to send are stored in SRAM along with a lot of other stuff, including the stack and heap.
As the program executes, the size of the stack and heap change. When you run out of space for the stack or heap to grow, bad things happen.
Exception handling is not really possible with the Arduino architecture, so you must design the code so that exceptions do not occur. Frustrating, yes.
You can store the page to send on the sd card, and read each line from the card, and send it out. Much less SRAM usage that way, but not as fast.
I can serve tiny web pages from my Uno + Ethernet shield... the "latest" one at 7/11, the one with a microSD socket but no version number...
But if I modify my program, asking my little server just to send a longer, bigger, whatever you want to call it, webpage, things go wrong.
I don't know if I am confusing the Arduino Ethernet Library or the W5100 chip at the heart of my Ethernet interfacer.... but SOMETHING becomes unhappy. And it doesn't grace me with good error messages, either. Buffer overflow?
So...
Is there a simple "you can send pages of up to xx characters" limit? What is xx? Is there any way to send a longer page in response to a browser's access of my server?
just check out this Tutorial from Ladyada. I´am using it by myself and didn´t get any Error by opening lage Websites.
There is a buffer included, which sends only a specified amount of data per read.
Maybe that´s what you´re searching for.