Pages: 1 ... 3 4 [5] 6 7   Go Down
Author Topic: Implementation for Microchip ENC28J60 Ethernet controller  (Read 35092 times)
0 Members and 1 Guest are viewing this topic.
Rio de Janeiro, Brazil
Offline Offline
Jr. Member
**
Karma: 1
Posts: 85
Software developer, free software activist
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Guys, excuse me for this so long delay answering you - I did a lot of trips to free software conferences, had some healthy problems and (unfortunately) Arduino Forum stopped sending emails to my inbox when someone post here.
Let's go - my next comments will have the answers for you!
Logged

Blog pt_BR: http://blog.justen.eng.br/
Curso de Arduino (Arduino Course, in Brazil) - http://www.CursoDeArduino.com.br/

Rio de Janeiro, Brazil
Offline Offline
Jr. Member
**
Karma: 1
Posts: 85
Software developer, free software activist
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Are you using a shield/module based on ENC28J60 Ethernet controller? If yes, please try to run WebServerSimple example (do not run Debug example) and do a request with a light Web client (like wget or curl) -- actually the library stores all the request and, as it is using a lot of memory, if your browser send a lot of information on request it can stop the sketch because of full memory. In future I'll optimize it, but this library will *aways* use more memory than Wiznet W5100 since with ENC28J60 we need to control everything since Ethernet layer.
Logged

Blog pt_BR: http://blog.justen.eng.br/
Curso de Arduino (Arduino Course, in Brazil) - http://www.CursoDeArduino.com.br/

Rio de Janeiro, Brazil
Offline Offline
Jr. Member
**
Karma: 1
Posts: 85
Software developer, free software activist
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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


No, UDP is not implemented yet and I'm working on client-side TCP now (server-side works with some limitations). My roadmap is to finish TCP (even limited), implement UDP and then start to remove limitations and do optimizations.

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



Very nice! Where did you find it?
I found one bigger for $10 at Sure Electronics:
- http://www.sureelectronics.net/goods.php?id=1180
And more two (one with the same size, other bigger), but for $17 at MDFLY:
- http://www.mdfly.com/index.php?main_page=product_info&cPath=9_41&products_id=484
- http://www.mdfly.com/index.php?main_page=product_info&cPath=9_41&products_id=109
Logged

Blog pt_BR: http://blog.justen.eng.br/
Curso de Arduino (Arduino Course, in Brazil) - http://www.CursoDeArduino.com.br/

Rio de Janeiro, Brazil
Offline Offline
Jr. Member
**
Karma: 1
Posts: 85
Software developer, free software activist
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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 > http://www.embeddedmarket.com/products/ENC28J60-Ethernet-Module/
                      and   >http://www.embeddedmarket.com/products/Micro-SD-card-Interface-Breakout-Module-for-3-3V-and-5V-Logic-Level/
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.

Wow, there are *a lot* of companies that assembles ENC28J60 modules. I really need to buy more modules to test compatibility! If do you know people at these companies and you think they can give me one board (free) for testing, please contact me via direct message!
Actually, my library also have this limitation. I need to implement the calculation of TCP packet number so we can send more than one packet per connection. Now I can't do it because I'm working on TCP client-side (3-way handshake), but it is in the roadmap.

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.


It looks like a memory issue (when you include SD library, it uses more RAM and ATMega can't store all the request info). Please try to do a light request, using wget or curl.

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 !!

For now we can't do it. But, as I said, it is a known limitation and is planned to be removed soon. :-)
Thanks for using and helping the project!
Logged

Blog pt_BR: http://blog.justen.eng.br/
Curso de Arduino (Arduino Course, in Brazil) - http://www.CursoDeArduino.com.br/

Rio de Janeiro, Brazil
Offline Offline
Jr. Member
**
Karma: 1
Posts: 85
Software developer, free software activist
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I tried the code from https://github.com/turicas/Ethernet_ENC28J60 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?


Can you ping the board? If yes, probably your browser is sending too much information in headers, so use a light HTTP client (like wget and curl) - I'll try to remove this limitation.

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.



The code from http://blog.thiseldo.co.uk/?p=344 works?
Logged

Blog pt_BR: http://blog.justen.eng.br/
Curso de Arduino (Arduino Course, in Brazil) - http://www.CursoDeArduino.com.br/

Rio de Janeiro, Brazil
Offline Offline
Jr. Member
**
Karma: 1
Posts: 85
Software developer, free software activist
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I tried WebServerSimple and it worked. I can ping my board and access it from a browser.
But only for a while. After that I get the connection lost. No more ping or browser access.

Do you have any idea. I've been struggling for 3 days and nothing.

Hello Inacio,
did you do any modifications in WebServerSimple example? Please try to use a lighty HTTP client such as wget and curl, do a lot of subsequent requests (without concurrency) and tell me if the sketch stopped to work (if yes, with how many requests using wget/curl).
Logged

Blog pt_BR: http://blog.justen.eng.br/
Curso de Arduino (Arduino Course, in Brazil) - http://www.CursoDeArduino.com.br/

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for working on this.  I'm sure it will be a big help to the community.   

I recently purchased one of the eBay EtherShields with the intention of using it in conjunction with the iPhone app Ardumote (which uses only UDP messaging), but once I started digging around trying to code anything using the supplied ENC28J60 library I realized it wasn't worth the effort and ordered an Arduino W5100 Ethernet Shield.  With your efforts however, I'm sure I will find a use for my ENC28J60 based shield one day and many others will benefit from the lower cost ethersheild!

Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Has anyone experience with this library and the nanode ? (http://wiki.hackspace.org.uk/wiki/Project:Nanode)

I tried to edit the file enc28j60.c as follows : #define ENC28J60_CONTROL_CS     8
without any success.
Logged

London
Offline Offline
Tesla Member
***
Karma: 10
Posts: 6255
Have fun!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

it would be easier to help if you said what the error was.

did you change also change the following?
   #define SPI_SS      8

did the sketch compile and run with the default CS/SS pin?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The sketch uploads without any problem.
What happens is that the board does not respond to either a ping or a http request, even after modification of the SPI_SS constant.
Logged

Rio de Janeiro, Brazil
Offline Offline
Jr. Member
**
Karma: 1
Posts: 85
Software developer, free software activist
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Has anyone experience with this library and the nanode ? (http://wiki.hackspace.org.uk/wiki/Project:Nanode)


Where can I buy a nanode for testing?
Logged

Blog pt_BR: http://blog.justen.eng.br/
Curso de Arduino (Arduino Course, in Brazil) - http://www.CursoDeArduino.com.br/

Seattle, WA
Offline Offline
God Member
*****
Karma: 11
Posts: 673
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Where can I buy a nanode for testing?

Sent you a PM with details.
Logged


Sydney, Australia
Offline Offline
Full Member
***
Karma: 3
Posts: 230
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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


Where did you find this for $10?


Cheers,
Logged

Is life really that serious...??!

Atlanta, GA
Offline Offline
Jr. Member
**
Karma: 0
Posts: 86
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I see that the picture has an embedded name on it - I found an ebay listing with that pictures' users name with the same item the listing was buy it now for 15.95 + 6 shipping from hong kong.



Logged

Rio de Janeiro, Brazil
Offline Offline
Jr. Member
**
Karma: 1
Posts: 85
Software developer, free software activist
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I see that the picture has an embedded name on it - I found an ebay listing with that pictures' users name with the same item the listing was buy it now for 15.95 + 6 shipping from hong kong.



Can you supply the link, please?
Logged

Blog pt_BR: http://blog.justen.eng.br/
Curso de Arduino (Arduino Course, in Brazil) - http://www.CursoDeArduino.com.br/

Pages: 1 ... 3 4 [5] 6 7   Go Up
Jump to: