[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-chat] TCP/IP : practical guide to implementing ? (LONG post...)

From: Vincent Trouilliez
Subject: [avr-chat] TCP/IP : practical guide to implementing ? (LONG post...)
Date: Mon, 11 Jun 2007 18:03:01 +0200

Hello list,

I apologize in advance for the longer than normally accepted post...

I am back on the list, after a very long while off, due to my hobby AVR
project stalling... so first of all, hi to the few who may remember
me and are still on the list ;-)

I would like to receive input from the engineers among you, who have
knowledge of, and practical experience implementing, TCP/IP in
micro-controller based products.

The quick story is that last Friday I got contacted by a company
( www.evolis.com ) who is recruiting. They are looking for someone to
work on micro-controllers (I don't know if it's to maintain their
existing products, or to develop new ones, though, but whatever...).
They design little printers for plastic cards,
some of them feature a network port. I had an initial 25 minute
interview over the phone with the HR girl, during which she asked if I
knew TCP/IP... Sadly I don't ! The interview was otherwise very
positive I felt, and she will contact me again in around 2 weeks (the
time to interview other candidates) to tell me the outcome, and if
positive, I will have a second interview, face to face this time, and I
presume this time I will face engineers not just HR people. So I would
rather like to be able to demonstrate to them that I am motivated to
get up to speed rapidly on the subject (which I am), if I want a chance
to get the job. A job which is massively important for me, to get
started in embedded programming, which is what I would like my debuting
professional life to be. So the length of this post is only
proportional to how stressed/panicked/under pressure I am, about
doing my best to get that job...

So, that's two weeks to learn as much as possible about this subject...
rather short given the complexity that I fully anticipate ! :-/
Hence why I am asking the experienced/professionals among you : how did
you learn ? Are there any really good books to get started on the
subject ?  Some reading to understand the fundamental concepts and
define what TCP/IP is exactly, so that I can then feel comfortable when
going to the next stage : reading about the practical details of
implementing it in embedded products, tutorials, code examples that
work, any material that can help get a working knowledge of the subject
to allow one to actually get things done.

Are there some particularly well known resource/material somewhere
(free/on-line preferred, but would consider a printed book if known to
be really good/helpful), which would cover the theory/concepts, then go
into the practical details of the implementation, with tutorials,
commented code examples that actually work, whatever helps ?

Basically, I know near zero about the subject, and need to gain as much
practical knowledge as possible, in just 2 weeks ! So any pointers to
good materials you could suggest, would be gratefully received
indeed ! :-)

To give you an idea of how clueless I am so you know what fool you
are presently dealing with ;-) , this is the sum of the very vague
understanding I have of the subject, sometimes just assumptions:

 1) TCP/IP is itself based on number of underlying, lower level
protocols, which partly (mostly?) makes for its overall complexity.

 2) There exist things called TCP/IP "stacks", which are ready made,
turnkey libraries that do most most of the dirty/hard/low-level work
for you, hide it from you, and give the programmer convenient,
high-level functions to help him do what he needs to do over TCP/IP,
with little need to worry about the internals of the stack. I assume
the stack would also provide error handling mechanisms, and propagate
errors to the top of the stack, for the programmer to deal with as

 3) I have seen mentions of "full" TCP/IP stacks, which presumably
means that TCP/IP offers numerous "services"/features, but that not all
of them are strictly necessary to make use of a TCP/IP link. So,
although TCP/IP is very complex, one maybe doesn't HAVE to be an expert
with each and every aspect of it, but can, in practice, concentrate his
efforts on learning only the particular bits/features that he needs
for the application/project he has at hand.

 4) I remember seeing, 7 years ago or so, a proof-of-concept thing:
someone/some company, picked a tiny 8 bit MCU, a PIC 12C series IIRC,
and managed to fit a (massively stripped down of course) web server on
it ! It would serve a couple HTML pages (stored on an external EEPROM
I think) containing a bit of text (like "Hello World, I am a little PIC
serving this page, isn't that incredible ?!") , a little image and
hyperlink to another similar page. This means I guess, that although
TCP/IP is vastly intimidating to me, it may be that it is possible to
do great things without necessarily mountains of mega complex code.

 5) TCP/IP runs by design, over an Ethernet link (which I don't know
much about either ! :-/ ). So I would need practical knowledge of
that too, I presume, in order to implement a TCP/IP link.

 6) Internet devices cannot (to avoid chaos) come with a fixed IP that
would be hard-coded. You are forced to implement some mechanism to
retrieve a suitable IP address from a suitable device on the network
your embedded product happens to be connected to.

 7) Until your device is allocated and communicated its IP address,
communication is done at the lowest level (Ethernet). 

 8) Ethernet controllers have, by design, (controlled by some
worldwide authority somewhere...) a unique identifier, their "MAC"
address, hard coded into their chip. Any and all Ethernet controller
chip, be it fitted in a 25 year old network card, a cable modem, or a
one of these lovely compact modules for hobby use, as well as the
millions, millions of consumer electronic devices built to date, and
going to be built in the future, none, NONE of them can possibly have an
identical MAC address. Any and all semiconductor manufacturer who wants
to produce and sell Ethernet controllers for whatever use, HAS A LEGAL
OBLIGATION to request unique/available MAC ID's from that mysterious
organism, that must be there somewhere to keep an eye on what MAC
addresses have been used so far, and which ones are still up for grabs.
The sticker under my cable modem shows its MAC address which
appears to be coded on 6 bytes, so presumably, the address space is
indeed sufficiently vast to allocate a unique ID to each and every
device on earth, past, present and to come.

 9) Whenever sending frames over the network to communicate, Ethernet
controllers embed their MAC address into the frame headers to
identify themselves, so that the interested devices can pick them up,
and so that devices that don't care about the sender, can just ignore
all that traffic, and do something more interesting with their time.
Presumably, the sender also specifies the MAC address of the

That's all I know, that's where have to start from.... :-/

Lurking on Avrfreaks.net, I found a link to a stack called "uIP" :


There appears to be lots of links and information on there. Is it worth
spending time on this site, or are there better, and more straight to
the point, resources elsewhere ?
Also, this site site about practical implementation, so I would still
need guidance to locate good material to learn the concepts first, the
theory, so that I have a sufficient understanding of what's involved, to
be able to make sense of the code examples. Otherwise I would be
progressing blind-folded so speak. 
I bet could spend my life reading zillions of web sites, but again, I
have only 2 weeks, so I really need your help to locate the best, most
useful/helpful resources now. I can't afford to waste to much time
erring all around the web indefinitely, I have to go straight to the
point :-/

Sorry again for the length of this post, I hope you will understand...
and be able to assist with your experience and wisdom ;-)

Thanks much in advance... :o)

Best regards to all,

Vincent Trouilliez, from Frog land

reply via email to

[Prev in Thread] Current Thread [Next in Thread]