Show Posts
Pages: [1] 2
1  Forum 2005-2010 (read only) / Troubleshooting / Re: Ethernet Shield sending byte by byte? on: March 28, 2009, 10:06:53 pm
I'm having similar problems with Apache, I tried it on multiple servers, no luck..

I managed to use your client.status() to track down part of the problem, see this topic:

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1238295170
2  Forum 2005-2010 (read only) / Troubleshooting / Re: Duemilanove + Ethernet Shield problems on: March 30, 2009, 12:33:47 pm
More people seem to be having these types of problems with the Ethernet shield. See my post here for more details on the long delay bug: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1238295170
3  Forum 2005-2010 (read only) / Bugs & Suggestions / Re: how to get access to the wiki / playground?? on: March 24, 2009, 07:48:21 am
Thanks Andrew! That fixed my problem!
4  Forum 2005-2010 (read only) / Bugs & Suggestions / how to get access to the wiki / playground?? on: March 23, 2009, 06:13:43 pm
I just tried to register on the wiki / playground, so I followed the link to the "register" page: http://www.arduino.cc/playground/Main/LoginForm

Only one UserName and two password fields? that's it? No e-mail address?

I don't get any confirmation or message telling me to login or wait until someone approves my request...

I tried to login with the new username and password combo, but it says wrong password...

There's also a small typo on the create account page: it says passowrd

So how does this work? Did I overlook something?
5  Forum 2005-2010 (read only) / Development / Re: Problem with multpile (fast) client-requests (Eth) on: April 01, 2009, 06:26:41 am
It looks like you guys fixed the problem!

I'm using code based on the example posted by NJPaul and the client.cpp modifications suggested by etracer, great work!

Oh and this patch is meant for the standard Ethernet library, it doesn't work with Ethernet2 yet.

Will this patch find it's way to the official distribution?

6  Forum 2005-2010 (read only) / Development / Re: Problem with multpile (fast) client-requests (Eth) on: March 28, 2009, 10:04:03 pm
I'm having similar problems... did you ever figure out how to fix this?

Here's some more information about this problem:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1238295170
7  Forum 2005-2010 (read only) / Troubleshooting / Re: Ethernet shield problems! Time to update library? on: April 07, 2009, 10:17:20 am
Have you tried the code that etracer posted?

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1238640832/0#0
8  Forum 2005-2010 (read only) / Troubleshooting / Re: Ethernet shield problems! Time to update library? on: April 06, 2009, 12:31:56 pm
The connection problems should be solved when you replaced the client.cpp file (don't forget to delete the client.o file!).

Did you follow the instructions in the thread I posted above?

Can you ping the arduino IP address from a computer in the same network?
9  Forum 2005-2010 (read only) / Troubleshooting / Re: Ethernet shield problems! Time to update library? on: April 06, 2009, 10:25:29 am
I'm working on a write-up about this project, I'll include links, code and schematics, but there are some other things that need my attention now..

There is a problem with the current version of the ethernet library, ports aren't closed properly so it runs out of available ports quickly.. Etracer came up with a good solution, see comment #16 of this thread.. His solution can be found here:

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1238640832/0#0

To get the RFID stuff up and running I used the code that Marc Boon posted last year:

http://trac.mediamatic.nl/picnic/wiki/RfiDuino
10  Forum 2005-2010 (read only) / Troubleshooting / Re: Ethernet shield problems! Time to update library? on: April 05, 2009, 07:36:45 pm
I just wanted to let everyone know that the ethernet shield is working great and it's being used in our custom web connected RFID cardreader system:

http://www.flickr.com/photos/machinecollective/sets/72157616309400121/

Thanks again for everyone who helped finding a quick solution for the connection problems!

The 35 second time out bug still appears every now and then, but for 99% of the time it's working perfectly!
11  Forum 2005-2010 (read only) / Troubleshooting / Re: Ethernet shield problems! Time to update library? on: April 02, 2009, 01:03:04 pm
Smartprojects have this warning in their product description:

Quote
It has 53 IO (including 4 HW UARTs, 14 PWMs, I2C bus) and 16 Analog Input pins.
It can mount and use most of the Arduino Shields (not the ETH actual version).

http://www.smartprj.com/catalog/index.php?main_page=product_info&cPath=1&products_id=37

Perhaps this warning should be added to the Arduino Mega product page too...
12  Forum 2005-2010 (read only) / Troubleshooting / Re: Ethernet shield problems! Time to update library? on: April 01, 2009, 06:27:27 am
etracer came up with a workaround that works for me:

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1235494406/8#8

Thanks again!
13  Forum 2005-2010 (read only) / Troubleshooting / Re: Ethernet shield problems! Time to update library? on: March 30, 2009, 12:44:19 pm
@Mellis: What would be the best way to get these bugs fixed a.s.a.p? I bought a bunch of the official Arduino Ethernet shields for a project, but now we're stuck due to this problem.. We need to send the ID of an RFID tag to a webserver every time a tag has been scanned, any suggestions for possible workarounds? Any help is greatly appreciated!

14  Forum 2005-2010 (read only) / Troubleshooting / Re: Ethernet shield problems! Time to update library? on: March 29, 2009, 10:19:07 am
@mellis: Thanks for your reply! I get the same long delay when I just modify a few numbers in the Google search code example. The code I posted isn't 100% done, it's just one of 1000 solutions that I tried to find out what causes the hang...

The strange thing is that I don't get this delay when I try the Google example over and over again.. but when I connect to an Apache webserver the problem suddenly appears. Could this have something to do with the way connections are handled? I found out that Google runs GWS, google web server, a modified version of Apache.

I tried the ethernet library, I tried updating the client.cpp & client.h files, I tried the ethernet2 libary, I tried looping connection.stop(), but this bug persists.. Can anyone with an Ethernet shield try the example code above with a different webserver? Does it hang the first time? Does it hang after a hard reset?

@macegr: that would be great.. I noticed the led on pin13 going dim during these hangs, which means that it's flashing at a high rate.. so there's definitely some SPI stuff going on as well.. could this be the cause?
15  Forum 2005-2010 (read only) / Troubleshooting / Ethernet shield problems! Time to update library? on: March 28, 2009, 09:52:50 pm
I've been testing various programs and I noticed that the Arduino hangs for about 35 seconds when using the Arduino to load a small status message from an Apache/PHP webserver.

A lot of people are running into problems with the Ethernet shield and/or Ethernet library, here are some topics and possible solutions:

Reducing ethernet traffic by copying new client files to ethernet library directory: http://code.rancidbacon.com/LearningAboutArduinoEthernet

Using client.status() to find out what's wrong:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1235991468

Modding the Ethernet shield to fix cold start hardware bug:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1225354009/29#29

Client.stop() not working properly:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1235494406

Use Ethernet2 library:
http://code.google.com/p/tinkerit/source/browse/#svn/trunk/Ethernet2%20library/Ethernet2

Ethernet2 library topic:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1233499187

All topics have various solutions for the problems that are discussed, but I think the nasty 35 second hang bug still isn't fixed. Here's the code that prints client.status() in an attempt to find out what causes the Arduino to hang:

Quote
Quote

 
#include <Ethernet.h>

byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
byte ip[] = { 192, 168, 1, 66 }; // Arduino IP
//byte server[] = { 64, 233, 187, 99 }; // Google
byte server[] = { 192, 168, 1, 17 }; // desktop pc running wampserver 2.0 and a simple php script that echoes whatever value is supplied in the querystring

// int receivingData = 0;
int isConnected = 0;
int timer = 0;
Client client(server, 80);

void connectMe(){
  client.stop();
  delay(500);
  Serial.println("connecting...");

  if (client.connect()) {
    Serial.println("connected");
    isConnected = 1;
    client.println("GET /?rfidkey=12345678 HTTP/1.0");
    client.println();
    Serial.print("client.status = ");
    Serial.println(client.status(),DEC);
  } else {
    Serial.println("connection failed!");
    Serial.print("client.status = ");
    Serial.println(client.status(),DEC);
  }
}

void disconnectMe(){
  Serial.println();  
  Serial.println("disconnecting...");
  isConnected = 0;
  client.flush();
  client.stop();
  if(!client.connected()){
    Serial.println("disconnect error!");
  }else{
    Serial.println("disconnected");
    Serial.print("client.status = ");
    Serial.println(client.status(),DEC);
  }
}

void setup(){
  Ethernet.begin(mac, ip);
  Serial.begin(9600);
  delay(1000);
  connectMe();
}

void loop(){
  if (client.available() && client.connected() && isConnected == 1) {
      char c = client.read();
      Serial.print(c);
  } else if (!client.connected()){
    if (isConnected == 1){
      disconnectMe();
    }
    delay(1000);
    Serial.print("client.status = ");
    Serial.println(client.status(),DEC);
  }
}




 



And here's a copy of the serial monitor window:

Quote

<UPLOADED ABOVE CODE AND OPENED SERIAL MONITOR>
connecting...
connected
client.status = 28
HTTP/1.1 200 OK
Date: Sun, 29 Mar 2009 02:28:55 GMT
Server: Apache/2.2.11 (Win32) PHP/5.2.9-1
X-Powered-By: PHP/5.2.9-1
Content-Length: 8
Connection: close
Content-Type: text/html

12345678 <REPLY FROM PHP>
disconnecting...
disconnected
client.status = 24
client.status = 24 <AFTER THIS IT HANGS FOR 35 SEC>

client.status = 0 <35 SECONDS LATER: RETURNED TO LOOP>
client.status = 0
client.status = 0
client.status = 0
client.status = 0
client.status = 0 <PRESSED RESET>

connecting... <HANGS FOR 35 SECONDS>
connection failed!

client.status = 0
client.status = 0
client.status = 0
client.status = 0 <PRESSED RESET>

connecting... <NO DELAYS THIS TIME>
connection failed!
client.status = 23 <BOARD CRASHED>




The results are pretty random.. sometimes I can do sequential requests within a minute, but most of the time it just cannot connect  :-/ I think is has to do with the return value of client.status() but I'm not sure... I've tried this code on an Deumilanove with both a 168 and 328. Running arduino 15 on XP. Tried various webservers, but all run Apache.. finally installed WAMP on my local pc to make sure the problem isn't caused by routers/webhosts...

So, Arduino DEV team or any other Arduino pro's, how can we solve this problem? It would be very helpful to update the Wiki or reference.. to save other people the problems that most users encounter when trying to load something over http... Time to add solutions from various topics to Arduino 0016 ?

Edit: another thing I noticed is that client.connect, client.stop and client.connected aren't color coded in the IDE...
Edit 2: similar problem described here: http://forums.ladyada.net/viewtopic.php?f=31&t=10192
Pages: [1] 2