Pages: 1 [2]   Go Down
Author Topic: Ethernet library -- Smaller and more functional  (Read 9887 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 28
I need more space !!! Everyone is closing in on me
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm bummed ... I was hoping that this new ethernet library would solve my problem ... It didn't after five connections the Arduino the arduino actively refuses the next connection.

I have the information about my program:

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

(Most of it is on the second page)

The long and short of it is ... I have a .net app on my computer that sends IR timing pairs to the arduino then it flashes a IR led ... if I wait a min or so between commands it works ... but I want to turn a ipaq in to a remote ... any ideas would be very helpful ... it anyone has any ideas why it would work four or five times then stop working for a min ???
Logged

Forum Administrator
Cambridge, MA
Offline Offline
Faraday Member
*****
Karma: 12
Posts: 3538
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The Ethernet library only supports 4 connections at once.  So if the connections are being disconnected right away, you might be using them all up.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 28
I need more space !!! Everyone is closing in on me
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

is there any way to close those connections when I'm done with them ... I'm sure thats what happening ... Or do I have to wait for it to timeout/close them its self
Logged

Forum Administrator
Cambridge, MA
Offline Offline
Faraday Member
*****
Karma: 12
Posts: 3538
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You can use client.stop().
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 28
I need more space !!! Everyone is closing in on me
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

yeah, I am using client.stop() and I still get the same issue ... its like it doesn't do anything ?
Logged

London
Offline Offline
Sr. Member
****
Karma: 1
Posts: 330
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


Are there any known problems with the ide version 13 and ethernet2?
Before I start posting up code I just wanted to see if anyone else has used ide ver13 or if its just my fiddling that has broken it.

Im getting multiple definitions from the arduion core print.cpp and the ethernet2 print.cpp stuff.

Thanks

Gordon
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 28
I need more space !!! Everyone is closing in on me
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I had the same problem with the print.cpp ... I just removed the old print from the core folder ... and everything seems to be working great ...
Logged

London
Offline Offline
Sr. Member
****
Karma: 1
Posts: 330
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


Hasnt that got a knock on effect for other libraries?
Or does the Ethernet2 print.cpp take over and serial.print and others use that?

Gordon
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 28
I need more space !!! Everyone is closing in on me
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

everything seems to be working so far ... serial.print and all
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 8
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

For what it's worth, I've had a sketch running with the Ethernet2 library for 18 hours. The sketch does a TCP connect/read/close cycle and the Duemillanove on which it is running is still going strong after 254,000 connects.

As an aside, the Ethernet library of arduino-0015 still borks after four connect/close pairs.
Logged

Indiana
Offline Offline
Full Member
***
Karma: 1
Posts: 234
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
As an aside, the Ethernet library of arduino-0015 still borks after four connect/close pairs.

See here for a revised version that corrects the connection problems (and fixes a number of other bugs).

And note that the Client.cpp in the Ethernet2 library is basically identical to the one included in the "standard" library (meaning it has the same bugs).
« Last Edit: April 22, 2009, 03:11:28 pm by etracer » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 8
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That seems to work. Thank you.

BTW, with Ethernet2 I get 6064 bytes (of a 30720 byte maximum). The "new" Ethernet is a bit larger than that: same sketch comes in at 7486 bytes.

Logged

New Zealand
Offline Offline
God Member
*****
Karma: 0
Posts: 999
Arduino pebbles
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
BTW, with Ethernet2 I get 6064 bytes (of a 30720 byte maximum). The "new" Ethernet is a bit larger than that: same sketch comes in at 7486 bytes.
AFAIK (and I could be wrong) the "new" Ethernet hasn't yet incorporated the changes from Ethernet2 that made it smaller.

--Phil.
Logged

Pages: 1 [2]   Go Up
Jump to: