Shop OBEX P1 Docs P2 Docs Learn Events
Simple + Reliable enc28j60 TCP/IP example — Parallax Forums

Simple + Reliable enc28j60 TCP/IP example

localrogerlocalroger Posts: 3,452
edited 2009-09-15 15:13 in Propeller 1
A project came up that needed TCP/IP, so I broke out the PropNIC and went looking for code to drive it.· Unfortunately, the driver in the obex is a bit out of date and it pretty much came to picking apart the source for PropIRC or the Ybox2.· I decided to pick apart PropIRC.

This is a much simpler example showing one each server and client, with as little cruft as possible.· It should be clear how to add functionality to repurpose either for custom work.

In the course of doing this I discovered a couple of bugs in the stack which would cause it to hang if the connection was interrupted at the wrong time; I fixed those by adding a couple of states to an existing timeout detector.· I don't know if the result is RFC compliant or totally comprehensive, but with a little extra automation it hit the telnet server in an Anybus-S card over 100,000 times last night with about 60 misses, and was running with no hung sockets when I checked it this morning.· This was through the router that handles all of our internet traffic AND a wifi bridge.

I'm not putting this in the obex because the PropIRC drivers by Harrison Pham are GPL'ed, not MIT license.

Beware, Harrison was running out of RAM for PropIRC so this stack doesn't respond to PINGs.· There's a place in the driver where this could clearly be added, but I haven't gone into the code in enough detail to do that myself.
Sign In or Register to comment.