Go Down

Topic: State of Arduino Ethernet Library (Read 7363 times) previous topic - next topic

MelissaM


So I changed the Ethernet.h and Ethernet.cpp files (Arduino IDE 1.0.3)

How have you changed them? I mean, what have you changed in them?
My article about Beeminder

SurferTim

Look for this in the code. The additions are between these:
Code: [Select]
//*************************************

There are two additions in each file. I have not checked the code changes for operation.

Jack Christensen


@Jack: Let me know how it does for you. If good, then we only have one more to go. The ENC28J60.


@Tim, for a week or more now, I've been running a Cosm test sketch which posts six data points to each of five data feeds once per minute, with five seconds between posts, using a WIZ820io. The new library code seems to work as well as before. This is not to say without issues, but I suspect these are due to a combination of network or web site delays and perhaps my code :smiley-eek-blue:

Probably not perfectly definitive results, but I hope it helps.
MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

SurferTim

#18
Jan 16, 2013, 03:02 pm Last Edit: Jan 16, 2013, 03:08 pm by SurferTim Reason: 1
Thanks, Jack. What are the issues? Does the code fail? I tested mine by creating issues, and insuring the condition did not crash the sketch. Three of my favorite issues to create:

  • Attempt to connect to a server that doesn't exist.

  • Attempt to get a dhcp ip address with no dhcp server.

  • Connect to a known large website and break the connection during the server response. Google home page is large, so I used that for my test.



That last one should work fine with the code I posted in the playground. It shows "Timeout" on the serial monitor when the transport connection fails, but goes back to downloading again when the transport connection is fixed. I broke the connection by unplugging my router CAT5 cable from the cablemodem.

Jack Christensen


Thanks, Jack. What are the issues? Does the code fail?


The code doesn't fail, but I have not been able to achieve the reliability that I would like in posting data to sites like Cosm and Thingspeak, meaning that sometimes the data just doesn't get there. My main application is logging data from wireless (XBee-based) sensor networks to these web sites. For instance, one network I have has five sensor units, each transmitting five or six data points once per minute. Each unit has its own time slot to transmit, and these are spaced five seconds apart. These all funnel to a central unit with the Ethernet interface.

The code does the usual thing, posts the data, waits for the server to respond and disconnect, then it disconnects. Sometimes the response doesn't arrive or the server doesn't disconnect before the next sensor's data arrives. Some amount of this is understandable due to network or server delays. If this happens, the code will disconnect, i.e. client.stop(), reset the WizNet module, and carry on. Sometimes the data gets posted on the web site OK even though a response didn't arrive (or didn't arrive quickly). I assume that could be network delays, etc. But sometimes it just doesn't get posted.

Initially I thought I had a reasonable aggregate data rate, but maybe not, maybe I'm pushing it too hard. I didn't want to get into queueing data, not enough memory for much of that, and while I fully expect that I may lose the occasional post with this approach, it's a matter of degree, I just haven't been able to get to the level of reliability that I'd like.

Sorry for the long story, don't expect you to debug my code necessarily, but if you have ideas I'd be glad to hear them too. I'll have a look at the code in the playground and see what I can learn from it. I very much appreciate your efforts for the community!
MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

SurferTim

Thanks for the input. Here is a link to that client code.
http://playground.arduino.cc/Code/WebClient

I forgot my best issue to create. I have a network available with over 300 clients on it, so it gets a bit busy. That generates delays with my code, but not a failure. Unless the server is localnet, and you control that server and localnet, there will be occasional delays. BTW, I have a couple of those localnet servers. One on a busy network, and one on my personal network.


@Jack: Let me know how it does for you. If good, then we only have one more to go. The ENC28J60.



is there an updated library for ENC28J60? actually im using this module ryt now.. i just want to run a W5100 based sketch on this module.. is there a way?

SurferTim

@pisayjames: AFAIK, there is not a library that will work with the ENC28J60 using the w5100 code. It seems like it should be possible by changing the include file, but nobody has developed one. At this time, I have only the w5100 shield.

Go Up