The default was Little endian and I did not change it.

Willi

> I guess you already have this in uip-conf.h?

> #define UIP_CONF_BYTE_ORDER      LITTLE_ENDIAN

> /Daniel


> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
> Of Willi Schulte
> Sent: den 5 mars 2007 15:30
> To: uip-users@sics.se
> Subject: [uip-users] Byte ordering problem with ARM7

> Hi all,

> I try to port uIP 1.0 to the LC2132. First of all I had trouble
> with the uIP Log Message "ip: Invalid version or header length".

> Obviously there is a problem with the linker. Mr. McKenney had the
> same problems and could give me some hints to fix it
> (struct ... __attribute__((packed));)

> Now I had the next problem: ARP does not work. With debug-prints
> I found out that there is an endian problem.

> The quick fix in main() was:
> ---------------------------------------------------------------------
> // uip_ipaddr(ipaddr, 192,168,1,160); // looks good but does not work
>    uip_ipaddr(ipaddr, 168,192,160,1); // looks crazy but ARP works
>    uip_sethostaddr(ipaddr);
> // ... the same change for the netmask and ARP and PING works!
> ---------------------------------------------------------------------
> I can't believe that this is the "solution". Something else
> must be wrong here. Has anyone an idea what had happened?

> I am using GNU-C with KEIL-IDE and the LPC2132 in "little edian"
> mode, also in "uipopt.h".

> Thanks a lot in advance,
> Willi



Reply via email to