I'm in the process of seeing what I can do with µIP, it seems to have better checksum handling at least. And I wouldn't mind switching as µIP has a much better stack and properly support tcp.
EDIT: Doesn't seem like such a good idea. uIP is a little too feature complete for a mega168. And I won't even talk about OpenTCP. Looks like I'm going to stick with AVRLib.
The code is now under version control using SVN. You can checkout a copy at svn+http://svn.mlalonde.net/Ethduino or browse the repository on the Trac site. Packets are still not getting received by applications, but they are getting sent (i can tcpdump them). As far as I can see, the checksum is definitely to blame. If anyone has an idea about this I'd really like to ear. As for running on the Mega168, so far so good... there's a good 6~8k free without all the debugging stuff which laves enough room for some business logic. (there's still definitely more things that could be done to reduce code size even further)
I sorry if this post is rather dry when it should be rather high, but I don't have anything to show (I don't have LCD at hand to do the ethernet LCD or something). But here it is...
I have the honour to present you the very first ping replies!
PING 192.168.0.126 (192.168.0.126) from 192.168.0.12: 56 data bytes
64 bytes from 192.168.0.126: icmp_seq=0 ttl=64 time=1.341 ms
[...]
64 bytes from 192.168.0.126: icmp_seq=4 ttl=64 time=1.245 ms
--- 192.168.0.126 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max/stddev = 1.235/1.283/1.341/0.039 ms
I've written functions to allow using the ENC's internal checksum functions. And it worked! This is an issue however because as noted in the errata #15, use of the DMA for checksuming can cause drop packets. I guess for some this would be fine; it has the added advantage of having a zero footprint in the stack! Either ways this is a huge step as it confirms that the hardware is up and running and that most of the software runs fine!
Congratulations! I hope you plan to share your hard work and success with the rest of us by posting a schematic and some code.
I don't recall what your final application is? You're probably quite close to a working serial proxy app right now; a TCP connection (to allow HTTP) may be a bit more work...
Kuk: at this stage there is no plan for TCP support. The mega168 is small and TCP processing is heavy. I'm not saying it won't come but there are other priorities. Just like kg4wsv was saying were closer from an EthProxy than anything... I will post details (schematic, doc, etc) very soon. Meanwhile, the code is available above.
A shield sounds good, but IMO it would need to be "stackable" or otherwise expandable. An ethernet Arduino is cool and all, but what will you do with it? I'd interface sensors or buttons or an LCD or something, and that something needs a place to be attached.
It would be nice to be able to get a little kit that had the "magnetics" in it.
This does sound a lot like the device from Olimex that was mentioned previously (although their price of US$34 sounds a bit steep to me).
I think atmega168 is too small for having tcp/ip stack + http... if you can fit it, there will be no room available for anything else. Why don't you put the whole tcp/ip stack outside of arduino? You can add a PIC MCU next to the ENC chip and use the free tcp/ip implementation by microchip (includes http). Or use Wiznet TCP/IP on hardware chip (TCP/IP + Ethernet) and implement only HTTP in Arduino, using SPI.
An Arduino web server shield could be very useful, to verify pin status, interface with Arduino, control an Arduino remotely, etc etc etc
SP is the skinny plastic DIP package. i/sp is the industrial temperature version of the chip ( -40degrees c verses 0 degrees). The datasheet has the specifics.
i know that link was for sample shopping cart. i just attached so that ppl can see diff types of enc28j60 ics and can answer to my question propelry. i still cant understand ur answer can u explain a bit further.
i need to interface ATmega 88 with enc28j60. can i use any of them i.e sp or -i/sp. is there any other major diffence except the temp.
Hi all!!
I have too a Enc 28J60 and my Arduino.
Now what i want to do is this, some basic parts of the library are missing.
DHCP and DNS-Query are basic for a Outgoing connection.
We can use fixed IP, but we must know the gateway IP and the DNS ip, in the most common cases both are the same, this is the network router IP.
So, what i found to do this, a Microchip .C libraries, this are wrote in C come so it must work with some small changes at Arduino.
We can found here several examples of DHCP and DNS:
DNS is easy, the only thing that we need is a UDP client and a DNS-query format packet. Send this query to the DNS server in the router at the 53 port and the response will be the internet ip. :o