Show Posts
Pages: 1 2 [3] 4 5 ... 67
31  Forum 2005-2010 (read only) / Troubleshooting / Re: Ethernet Shield sending byte by byte? on: March 28, 2009, 12:38:22 am
Quote
Additional information: apparently no one involved in developing the Ethernet Library has tested communications with web servers other than Apache. The library as-is will not communicate with lighttpd. Phil's modification above does allow communication, you will need to take care to render each line into a complete string before trying to println() it; multiple print() commands per line will not work.
Hmmm, that's interesting. Is that standards compliant behaviour? I would have thought it didn't matter how the bytes arrived to the server, just that they did...

--Phil.
32  Forum 2005-2010 (read only) / Troubleshooting / Re: Ethernet Shield sending byte by byte? on: March 11, 2009, 10:42:57 am
Great, thanks for the feedback.

--Phil.
33  Forum 2005-2010 (read only) / Troubleshooting / Re: Ethernet Shield sending byte by byte? on: March 11, 2009, 09:34:03 am
Quote
I can't get your code ?? Is your site down?
Unfortunately, it appears so. That was bad timing. :-/

Put this at the end of Client.cpp:
Code:
#if 1
#include <string.h>
void Client::print(const char c[]) {
  send(_sock, (uint8_t *) c, strlen(c));  
}

void Client::println(const char c[]) {
  print(c);
  print("\r\n");
}
#endif

And then this in the appropriate place (use the first and last lines to show you where) in Client.h:

Code:
 friend class Server;
#if 1
  void print(const char c[]);
  void println(const char c[]);
  using Print::print;
  using Print::println;
#endif
};

--Phil.
34  Forum 2005-2010 (read only) / Troubleshooting / Re: Ethernet Shield sending byte by byte? on: March 07, 2009, 07:18:24 am
Hi,

I've taken a look at the code and have produced a modified copy of the Client library--as found in Arduino 0013--the new code provides better Arduino Ethernet transmission efficiency.

It's really only an interim solution and will only work if you make use of the println or print methods and supply a string.

I've only tested it with the standard WebServer example but that resulted in ~75% fewer bytes being transmitted. Even in this scenario there's still a lot of overhead as the numerals are still transmitted one byte at a time. Much more detail and analysis at the link above.

Please let me know how this works for you.

--Phil.
35  Forum 2005-2010 (read only) / Troubleshooting / Re: Ethernet Shield sending byte by byte? on: March 04, 2009, 08:47:10 am
I took a look at this since I was using WireShark to track down another issue (with my code/Adobe Flash not the library :-)).

I can confirm what the OP posted, in my case for each byte of data sent via println 60 bytes were actually being sent on the wire--this includes for the response headers etc.

Unfortunately trying to solve this raises the whole issue of buffering etc which means it's not quite a straight fix of println. Although if the data isn't in PROGMEM then it's probably more straight-forward but that's hardly ideal.

Will ponder.

--Phil.
36  Forum 2005-2010 (read only) / Troubleshooting / Re: Ethernet Shield sending byte by byte? on: March 03, 2009, 11:58:06 am
A quick look at this suggests the reason for the issue is that the client send code is implemented on top of the Print class and at the bottom of the "stack" is a routine that prints a byte. And to print a string that routine gets called multiple times.

I don't know if it's possible to override the higher-level methods but it would seem worthwhile as this must be adding a fair bit of overhead. The underlying ethernet code is certainly capable of sending multiple bytes.

--Phil.
37  Forum 2005-2010 (read only) / Troubleshooting / Re: Ethernet Shield sending byte by byte? on: March 03, 2009, 06:24:58 am
That's a very interesting observation. In theory, yes, I think that should be possible. You'd need to look more closely to see how the library is implemented. Have you tried the Ethernet2 library? If so, does it function the same way?

--Phil.
38  Forum 2005-2010 (read only) / Troubleshooting / Re: How to change avr-gcc settings? on: July 27, 2009, 05:43:06 am
The makefile is not used by the IDE.

AFAIK the only way to change the settings is by editing the IDE source and recompiling the IDE.

--Phil.
39  Forum 2005-2010 (read only) / Troubleshooting / Re: softwareSerial error arduino-0016 in ubuntu on: June 07, 2009, 09:45:12 am
My first guess is that you need to install a more recent version of avr-gcc.

--Phil.
40  Forum 2005-2010 (read only) / Troubleshooting / Re: Could not find main class programming.app.base on: July 18, 2009, 10:50:51 am
Do you get the same result if you run the batch (.bat) file?

--Phil.
41  Forum 2005-2010 (read only) / Troubleshooting / Re: Arduino 16 readlink: command not found - OS X.3.9 on: July 16, 2009, 11:33:24 am
This may or may not be useful: http://code.rancidbacon.com/LearningAboutArduinoOSX102

--Phil.
42  Forum 2005-2010 (read only) / Troubleshooting / Re: Error message when trying to open Arduino 16 on: June 30, 2009, 09:43:56 am
http://arduino.cc/en/Guide/Troubleshooting#macupdate
43  Forum 2005-2010 (read only) / Troubleshooting / Re: NoClassDefFoundError in processing.app.Editor on: June 08, 2009, 10:56:41 pm
Might this be the main issue:

Code:
Caused by: java.lang.ClassNotFoundException: javax.swing.TransferHandler not found

--Phil.
44  Forum 2005-2010 (read only) / Troubleshooting / Re: NewSoftSerial not working under Arduino 016 on: June 05, 2009, 09:31:31 am
Quote
But it would not hurt to zip up everything that supposed to be the new release, and make an announcement in the forums here, about two weeks before the public release. It's called a beta, or release candidate...
Actually, that does happen but it happens on the developer mailing list. e.g. [Developers] Arduino 0016 RC3 available.

--Phil.
45  Forum 2005-2010 (read only) / Troubleshooting / Re: NewSoftSerial not working under Arduino 016 on: June 05, 2009, 09:28:54 am
Quote
It would be near impossible for the Arduino team to test and fix all user contributed non IDE core libraries with each version upgrade, it's just the nature of the beast I guess.
I'm working on some regression testing infrastructure that will hopefully improve this situation. My aim is to test (at least at the compilation stage initially) third-party libraries against SVN revisions of the IDE/core.

--Phil.
Pages: 1 2 [3] 4 5 ... 67