Implementation for Microchip ENC28J60 Ethernet controller

chiva:
Oh! I forgot, the mega compatibility has the same issue, with shields that do not get SPI signals from the ICSP header, than the old ethernet shield, you have to bend the pins and connect cables to the SPI pins of the Mega board.

http://mcukits.com/2009/04/06/arduino-ethernet-shield-mega-hack/

This should be indicated in the readme, so the newcomers are warned, as the famous nuelectronics shield has this issue, in fact, all the shields listed in the reosurce file have this issue.

Ok, it's on "Usage" section on README.markdown now. Thanks.

chiva:
Also, in the resource file there is a link to http://blog.thiseldo.co.uk/?p=344 , but he has already released a newer one v1.6, http://blog.thiseldo.co.uk/?p=504

It had link to all those posts. Now it is organized and you can read using GitHub's markdown converter: Ethernet_ENC28J60/resources.markdown at master · turicas/Ethernet_ENC28J60 · GitHub

Hello, alvarojusten!

This is great idea to make ENC28J60 - W5100 compatible library!

I spent a lot of time with "official" ENC28J60 lib, yes it works, but any changes or any code writing are kinda hell.

But accidentally, I found another realization of the library:

http://jeelabs.net/projects/cafe/repository/entry/EtherCard

EtherCard based on official ENC lib, but there are a lot rewritten code, DNS realization, cool http server, new tcp-ip stack & etc.

For compatibility with Arduino you must change

#define ENC28J60_CONTROL_CS 8
to
#define ENC28J60_CONTROL_CS 10
at enc28j60.cpp

at least for me it worked.

This lib works not 100% stable, but it pretty simple than original lib.

I hope it can help you or others.

Please continue to develop your library, we all really need for it :slight_smile:

Regars.

WEBAFF:
But accidentally, I found another realization of the library:

http://jeelabs.net/projects/cafe/repository/entry/EtherCard

EtherCard based on official ENC lib, but there are a lot rewritten code, DNS realization, cool http server, new tcp-ip stack & etc.

Nice! I added this library to resources/resources.txt in my repository, thanks.
I saw the code and it still needs improvements since it consists only in helper functions (like the original libraries, but EtherCard is easier to use) - it is not a socket layer and is not compatible with Ethernet.h code. But perhaps I can use some code this guy used (like DNS query) to improve my library.

Server side works great !

Can you tell when client side will be ready ?

Thanks

Hi Alvaro.
I'm from brazil too.
It's a good implementation, your interface is clean equal the oficial etherShield.

what is the function of the D2 connection on the shield?

Allows you to catch interrupts from the network. D2 is one of the pins that can use "AttachInterrupt()"
It appears to require bridging a small jumper/solderbridge connection before it is actually connected.

megouri:
Server side works great !

Can you tell when client side will be ready ?

Server side has a lot of limitations, but work in some simple cases. :slight_smile:
I'm now implementing TCP three-way handshake for TCP client connections but don't know yet when it'll be done.

Great, great, great new !
Good luck and please keep in touch !

Have you planned to fully develop all the functions like the Wiznet ?

Goes:
Great, great, great new !
Good luck and please keep in touch !

Have you planned to fully develop all the functions like the Wiznet ?

Hello Goes, excuse me for the delay.
Yes, I'm planning to implement a TCP/IP stack compatible with the stack implemented for Wiznet W5100.
For now server-side TCP connections work (with a lot of limitations) and I'm working on client side.

alvarojusten:

Goes:
Great, great, great new !
Good luck and please keep in touch !

Have you planned to fully develop all the functions like the Wiznet ?

Hello Goes, excuse me for the delay.
Yes, I'm planning to implement a TCP/IP stack compatible with the stack implemented for Wiznet W5100.
For now server-side TCP connections work (with a lot of limitations) and I'm working on client side.

We're all waiting for you... :wink: Keep up the good work!

Edit reason: "up" missing, thx for pointing it PaulS :wink:

Keep the good work!

Wouldn't it be better if he shared it?

PaulS:

Keep the good work!

Wouldn't it be better if he shared it?

Indeed, it seems that these 2 "up" letters remained in my keyboard :wink:

Finally I got my project started and assembled.
I have communication ok, I can program the MCU.... ethernet circuit is alive, at least it is powered, but I'm not sure if it's really talking with the prosessor. When I open browser and try to connect any IP inside the subnet, this blinks the green light like somebodys knocking, but I can't get response from it.

I have checked this dirty PCB so many times in last two days, that I'm just blind if there's shortcuts or missing links. Schematic has been turned upside down while tracing the problem, components are correct values. Voltages are in tolerances.

WebServerDebug don't give anything.

Hmm, what is the purpose of these dip swithes? I didn't put them for two reason; I don't have suitable and I don't know if it is nessessary in basic testing.

About codes, I only changed the IP-address to much my network, everything else is intact.

It just don't play the game with me, any tips left? Thanks!!!

Cheers,
Kari

Tkanks for your reply

So, UDP are fully implemented ? We are able to send & receive packets correctly ?
For TCP, it work too ? You just don't have implemented file server for the access by browser (& GET requests, etc ...) ?

Good luck, it's a good job that will surely help the community

I have see nice, cheap (10$) & small boards with the chip:

Nice for DIY projects ...
8)

++

Hmm, I have probably confused with the topic I just posted.

This was the one I built...

Back to the problem!

Cheers,
Kari

No problem anymore, never was, just wrong libraries. Ethershield...
:disappointed_relieved:

Cheers,
Kari

Goes:
I have see nice, cheap (10$) & small boards with the chip:

Nice for DIY projects ...

Yeah, these look great. Where have you seen them for $10?! I've only seen them for $17.

Hello alvarojusten
I have been using your library and webserver examples for the enc28j60 and they work great. Thank you for your work.
My idea is to use a microSD breakout board with the enc28j60, read files from the sd card and send them over ethernet.
I have been using this > EmbeddedMarket.com
and >EmbeddedMarket.com
Using the simplified library(Simon Monk's) I can read from the sd card and send files over the ethernet.
However there are a few problems:

1.With Simon Monk's library the size of the files that can be sent is limited by the buffer size. To send the contents of the buffer I have to use the e.respond(); which closes the connection to the client and no more data can be sent.
2. With your library if I only write this one line #include <SD.h> and make no other additions to the sketch the webserver example stops working (the board replies to pings but if i open the address in a browser it just keeps waiting). I assume the problem is a buffer overrun.

Regarding this I have a few questions I will be thankful if you can help.
Is it possible fill the buffer with chars and send the contents of the buffer to the client without closing the connection?
To explain further : Read single chars from the file on sd card > fill the buffer with these chars > send the packet when the buffer is full > continue reading from file and begin filling buffer again > repeat till the whole file is sent.

If we can implement this, we can have fully functional web servers working off the arduino+enc28j60.
Hoping you can help me with this. Bravo for the good work again !!

I tried the code from GitHub - turicas/Ethernet_ENC28J60: [NOT MAINTAINED, NOT COMPLETED] Implementation of an Arduino-compatible socket layer library that uses Microchip ENC28J60 Ethernet controller. change the IP then upload the program. Upon entering the address in a web browser it didn't load. What do you think is the problem?

I have a different ethernet board but I wired it the same way as the one from http://www.nuelectronics.com/estore/?p=12. I already tested it with other code like the one from http://blog.thiseldo.co.uk/?p=344.

Hope I can make progress with this code since I find it easier to use.

Hi Alvaro !

Any news about your famous library :slight_smile: ?

Cheers!