--- In l..., bonzadog wrote: >
> Hi all,
>
> I know very little about IP Stacks or LAN in embedded systems.
> Can one one recommend ( ie that have actually used the Book) any Books ?
> many thanks
>
> BD
>
>
A simpler alternative: outboard the IP stack using one of these devices. The
microprocessor side is simply a socket interface via SPI commands/responses.
Getting an IP stack with ARP, ICMP, IP, TCP, DHCP, for several concurrent
connections, with DHCP renewal, and multi-tasking is difficult.
wiznet's Wiz820IO module.
--- In l..., "rtstofer" wrote: >
> --- In l..., bonzadog wrote:
> >
> > Hi all,
> >
> > I know very little about IP Stacks or LAN in embedded systems.
> > Can one one recommend ( ie that have actually used the Book) any Books
?
> > many thanks
> >
> > BD
> >
> If you want to USE a stack, the documentation is the place to start. The
Microchip stack, uIP & lwIP all have documentation. Normally the stack is
provided by others and all that remains is to interface the application to the
stack. Sometimes the lowest level hardware drivers need to be written. The
stack itself is a block in the middle between the hardware drivers and the
application. Most stacks provide a variety of protocols (ARP, DHCP Client, DNS
Client, TCP, UDP, IP, etc).
>
> If you want to WRITE a stack, all of the RFCs (Request For Comments) are
useful as are any of the text books by Comer such as "Internetworking with
TCP/IP" Volumes 1 & 2.
>
> "The TCP/IP Guide" by Kozierok might be useful. I have been working my way
through it.
>
> The Microchip stack for the PIC32 is nicely done and there is a TON of code
and a comprehensive demo program. I am using it for a rather simple project but
along the way I decided WiFi would be nice. All of the necessary code is
included - many other stacks (uIP, lwIP) don't get involved with WiFi,
instead leaving it for the user to implement.
>
> Richard
>
Reply by rtstofer●June 4, 20122012-06-04
--- In l..., bonzadog wrote: >
> Hi all,
>
> I know very little about IP Stacks or LAN in embedded systems.
> Can one one recommend ( ie that have actually used the Book) any Books ?
> many thanks
>
> BD
> If you want to USE a stack, the documentation is the place to start. The
Microchip stack, uIP & lwIP all have documentation. Normally the stack is
provided by others and all that remains is to interface the application to the
stack. Sometimes the lowest level hardware drivers need to be written. The
stack itself is a block in the middle between the hardware drivers and the
application. Most stacks provide a variety of protocols (ARP, DHCP Client, DNS
Client, TCP, UDP, IP, etc).
If you want to WRITE a stack, all of the RFCs (Request For Comments) are useful
as are any of the text books by Comer such as "Internetworking with TCP/IP"
Volumes 1 & 2.
"The TCP/IP Guide" by Kozierok might be useful. I have been working my way
through it.
The Microchip stack for the PIC32 is nicely done and there is a TON of code and
a comprehensive demo program. I am using it for a rather simple project but
along the way I decided WiFi would be nice. All of the necessary code is
included - many other stacks (uIP, lwIP) don't get involved with WiFi,
instead leaving it for the user to implement.
Richard
Reply by bonzadog●June 4, 20122012-06-04
Hi all,
I know very little about IP Stacks or LAN in embedded systems.
Can one one recommend ( ie that have actually used the Book) any Books ?
many thanks
BD
Reply by prgjz●June 4, 20122012-06-04
--- In l..., Nils Springob wrote: >
> Hi,
>
> Does anybody use TNKernel (http://www.tnkernel.com/) in combination with the
TCP/IP stack?
> It is working on my LPC2378, but I have some questions regarding the
datails....
>
> Nils
> Hi Nils,
I use TNKernel + TCP / IP stack are already a couple years. LPC2378 and LPC1769
now on first. Have not had any problems working very well. Consumes 16KB SRAM
AHB + approx 4KB on-chip SRAM.
Johann
Reply by Chris●June 4, 20122012-06-04
> an embedded TCP/IP stack works just like they are
used to on a PC (and
> ignore totally the differences in RAM/MHz).
Yes doing high performance TCP in an relatively small MCU is not trivial.
Some of the stacks I tested needed nearly 100K of RAM just to startup.
Try using those on an MCU with 64K RAM. Not going to happen.
They were designed for much bigger MCUs like ARM9 or external RAM.
I tested other stacks that used little RAM, but also had low performance.
Getting robust high performance in small RAM is very tricky.
This is where LWIP excels, especially using the Raw/Native interface.
Then you get into testing on a real LAN with traffic, going through multiple
routers, hops,
collisions, multicast, random delays, etc. and then things get really
interesting.
A 1MB file gets chopped into a zillion packets and those packets
do not necessarily come back in by the correct linear sequence.
The Stack has to put all those random packets back together again in the
right order.
Doing that in small RAM requires a lot of tricks.
You find out real quick whether all those other features your stack is
suppose to have
actually work, have bugs, or even exist at all.
I spent over 6 months on my Enet/Stack code
until I got everything working the way I wanted. It's very hard stuff
to
debug too
because there are so many layers of protocols on top of each other,
and the MCU hardware is so heavily involved with the packet processing.
Performance tests under so many different conditions
and scenarios requires a lot of testing and tuning time as well.
It is a big learning curve.
Chris.
Reply by 42Bastian●June 4, 20122012-06-04
Hi Chris
> All TCP stacks are not created equal. It depends on
what kind of
> performance you need and resources.
Well spoken, I'd like to forward this to some of our customers, who
think,
an embedded TCP/IP stack works just like they are used to on a PC (and
ignore totally the differences in RAM/MHz).
> thanks for the answer! The LWIP looks very
interesting and seems to be high quality.... > The most interesting facts about the LWIP stack is
the zero-copy approach and > the three layer api design!
> But the TNKernel stack is not bad and is already running successfully on my hardware, I > am interested in tuning details ;-)
All TCP stacks are not created equal. It depends on what kind of
performance you need and resources.
You can make a crude TCP stack that runs on an 8b PIC MCU, but it may only
do 5KB/sec transfer rates.
If you need very high performance, MB/sec, then that is a much more
sophisticated complex stack and resources.
I tested many different TCP stacks several that were commercial high priced
code that costs $$$$.
Even some of those had problems, lower performance, or required so much RAM
I could hardly run them on LPC2468.
Eventually I went back to LWIP because it requires very little RAM/ROM, and
runs extremely fast and clean.
I could easily get 2.5MB/sec TCP transfer rates on E100 network. That's
very fast data throughput.
I use it with FreeRTOS and the stack uses about 70% of MCU time pumping data
through at that rate.
The truth is all TCP stacks require a lot of optimization time if you want
maximum performance.
There is no free lunch here, it is not the kind of code you can just plug in
and you're done.
This stuff takes a lot of tuning and optimization and you end up having to
learn far more about
IP and TCP packets than you ever wanted to know. You will spend a lot of
time with WireShark.
In my case I needed quite a few other features such as CGI and SSL support
etc. I built all that into LWIP.
Ethernet and IP is a very large spectrum of different applications and
protocols. It's very complex stuff.
Chris.
Reply by Nils Springob●June 3, 20122012-06-03
Hi Chris,
thanks for the answer! The LWIP looks very interesting and seems to be high
quality....
The most interesting facts about the LWIP stack is the zero-copy approach and
the three layer api design!
But the TNKernel stack is not bad and is already running successfully on my
hardware, I
am interested in tuning details ;-)
Nils.
Am 01.06.2012 23:56, schrieb Chris: >> Does anybody use TNKernel (http://www.tnkernel.com/)
in combination with
> the TCP/IP stack?
>> It is working on my LPC2378, but I have some questions regarding the
> datails....
>
> I may have tried it on a previous LPC2468 project, I tested many TCP
stacks.
> But I ended up using LWIP. Very small code that runs very fast.
>
> All TCP stacks can be a pain to setup and tune. You have to get to know
> them well, no free lunch here.
> LWIP is very well supported and heavily used.
>
> Chris.
>
>
Reply by stevec●June 2, 20122012-06-02
yes... external NIC makes sense for low volume. Look at mbed on the 1768..
after, what, 2 years, they still don't have a stable API to LWIP, nor a
better alternative.
--- In l..., "Donald H" wrote: >
> --- In l..., "stevec" wrote:
> >
> >
> > Easier to use
> >
> > http://www.saelig.com/MFR00088/BRD032.htm
> >
> > all the protocols are off-loaded, including ARP, IP, TCP, ... and buffers
for 8 sockets. SPI interface.
>
> Kind of misses the point of having a MAC on-board, don't it !!
>
> If your doing a one-off project, OK I'll agree.
>
> But, a 1K unit product, why is spending $20K better ??
>