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:
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 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.
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!
GaryP:
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.
Goes:
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.
Goes:
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:
suvenk:
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.
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.
suvenk:
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.
suvenk:
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!
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.
joseinaciojr:
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).
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!
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.