lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] Re: [lwip] lwIP or uIP


From: Adam Dunkels
Subject: [lwip-users] Re: [lwip] lwIP or uIP
Date: Wed, 08 Jan 2003 22:13:52 -0000

Hi Peter!

On Wednesday 10 October 2001 22:25, you wrote:
> I'm trying to implement uIP on my little motorola 6809 CPU board (10K
> usable ram for data and code) connected via serial port at my linux home
> server. I'm so far that i can do a ping.

Great! How much of the code space is used by uIP?

> Making a TCP connecting isn't working yet, because of checksum errors.
> My 6809 GCC compiler doesn't support 32 bit integers, so i've to redo the
> checksum routines.
> Where can i find the details about the TCP-checksum calculation (IP
> checksum works great).
> It goes wrong when the amount of databytes are odd.

There is a bug in the uIP checksum code when compiled for big endian systems. 
The bug is quite easily fixed: the code in uip_arch.c that looks like this:

  /* add up any odd byte */
  if(len == 1) {
    acc += (u16_t)(*(u8_t *)sdata);
  }

is changed to:

  /* add up any odd byte */
  if(len == 1) {
    acc += htons((u16_t)(*(u8_t *)sdata) << 8);
  }

> Now the worst part. I saw that uIP is to obsolete. lwIP will take over uIP.
> But today i was examining that lwIP and came to the conclusion that i can't
> use it for my 6809-board.
> lwIP is designed to be used with an OS. And my little board doesn't have
> such an OS and i've no intention to do this. (shortage of free time)
> My intention is to reduce that board to one microcontroller (PIC, AVR, ....
> suggestions??)
> Is it possible to keep uIP alive for none OS driven systems.

No, uIP is not obsolete in any way. lwIP and uIP are completely different 
projects with somwhat different goals - the only thing that they have in 
common is their author. Both projects are actively developed.

uIP is intended for systems that have very limited memory and therefore 
doesn't provide the full TCP abilities that lwIP has. Application programming 
for uIP is also vastly different.

> Another question: I want to use a uIP for my home-controlling system.
> (every chamber will have his own controller) Therefore i want to use little
> micro-controllers connected with RS485 to each other (Yes, it will work
> half-duplex) and my linux-server. Can i use the uIP protocol (with SLIP) to
> communicate over such a RS485 network.
> Have somebody tried this before ? what are your experiences ? Other ideas

I have no experience with RS485, but I believe it is a multipoint link type 
(?). If so, it might need some address resolution protocol such as ARP. But I 
do not have any experience in this field, so you probably shouldn't listen to 
me.

By the way, that's an interesting project (connecting a home controlling 
system with IP and uIP)! Have you made a homepage for your project?

/adam
-- 
Adam Dunkels <address@hidden>
http://www.sics.se/~adam
[This message was sent through the lwip discussion list.]




reply via email to

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