Let me introduce yet another simple TCP/IP implementation. It cooperate with enc28j60 Ethernet chip. Attached example with simple www server implementation takes 6930 bytes for code and 224 bytes for ram.
At this moment it's not validating received packets checksum, but i think we can live without it ;]
Please edit beginning of make.bat file in order to compile it ;]
But can we standardize the Ethernet library and add the enc28j60 driver?
I would think a better thing to do is take the Ethernet lib in arduino, use that as a interface, split out the wiznet 5100 calls(they are hardcoded), separate the drivers, and be more generic. That way if one day yet another ethernet chip appears it can be added without too much pain.
Cause as it stands now, I cant use the snmp lib because its written against Ethernet lib, and that doesn't support the pic ethernet.....
Thanks for letting me vent in your thread. I know its rude, I'm sorry.
I'll look at your code, cause I plan on doing just what I said, even tho its a big project.
Initially I was thinking about the same thing - make it compatible with Ethernet library. And as you can see, top level methods are very similar.
You could also check enc28j60 driver files where i made some functions which aim was to make it at all possible to achieve compatibility with Ethernet library.
However, for me the most important thing was to make it work with the least space taken and to provide simple interface with basic functionality.
It's good starting point to make it compatible with Ethernet library for anyone who would have time for it
Another plus is if for some reason you have to change hardware. I always hate having to go back and recode wholesale sections.
Which is why I modded the LCDI2C to use the same calls as LiquidChrystal, that was far easier than recoding the whole application that used it. Reminds me I need to post those mods too...
I trying to test your code but i have some trouble to get the make file to work.
I have made changes to the "make file"
See:
set arduino_sketch_path=H:\Users\HP\Documents\Arduino\network1
set arduino_external_libs=?? what should i write here??
if "%arduino_sketch_path%" == "" set arduino_sketch_path=%CD%
set arduino_ide_path=H:\Users\HP\Desktop\arduino-0021
set arduino_ide_version=21
set arduino_core_path=%arduino_ide_path%\hardware\arduino\cores\arduino
A ok
But i dont get it to work. (i dont know how i should work :o )
Should i get a .pde file if it´s works?
Looks like this when i run the .bat file:
Linking all
H:\Users\HP\Desktop\arduino-0021\hardware\tools\avr\bin\avr-ar: .\build\Arduino\
network1.a: No such file or directory
avr-gcc: .\build\Arduino\network1.a: No such file or directory
H:\Users\HP\Desktop\arduino-0021\hardware\tools\avr\bin\avr-objcopy: '.\build\Ar
duino\network1.elf': No such file
H:\Users\HP\Desktop\arduino-0021\hardware\tools\avr\bin\avr-objcopy: '.\build\Ar
duino\network1.elf': No such file
All done.
Linking all
H:\Users\HP\Desktop\arduino-0021\hardware\tools\avr\bin\avr-ar: .\build\Arduino\
network1.a: No such file or directory
avr-gcc: .\build\Arduino\network1.a: No such file or directory
H:\Users\HP\Desktop\arduino-0021\hardware\tools\avr\bin\avr-objcopy: '.\build\Ar
duino\network1.elf': No such file
H:\Users\HP\Desktop\arduino-0021\hardware\tools\avr\bin\avr-objcopy: '.\build\Ar
duino\network1.elf': No such file
All done.
Some error with "network1.elf"
Edit:
I get it to work now, hade type something wrong i the .bat file.
One tip about improving stability for the enc28j60. That chip can take up to 180mA, so if you are using USB as a power supply you have to change settings on Ardiuno's ft232 chip via "FT Prog".