[uip-users] uip_connect 0.9 problem

31 views
Skip to first unread message

Ghazali, Izrie

unread,
Mar 1, 2007, 8:40:19 AM3/1/07
to uip-...@sics.se

HI there,

I’ve ported uip 0.9 to LPC-E2124 board by olimex. I found no problem with webserver demo provided in the package. However, when I try to make a simple uip_connect program that connect to a listening server, which I developed using Java eclipse, it turned out to be the listening server output an error message of “connection reset”. I have confirmed that there is no problem with the java server. I suspect the problem arose due to uip_checksum or uip_connect(??). The code is as follows:

 

#include "report.h"

#include "uip.h"

 

void report_init(void)

{

u16_t ipaddr[2];

            uip_ipaddr(ipaddr, 192,168,1,68);

            uip_connect(ipaddr, HTONS(1234));

}

 

void report_app(void)

{

            if (uip_connected() || uip_rexmit())

            {

                        uip_send("hi/n",3);

 

                        return;

            }

}

 

The problem arose as soon as I call the function report_init(). Don’t even have the chance to test the report_app(). Any body could help with this?


--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.5/706 - Release Date: 28/02/2007 4:09 PM

Berg, RR van den

unread,
Mar 1, 2007, 9:47:47 AM3/1/07
to uip-...@sics.se
Hi,

I had this problem also. Just adjust your code like this:

#include "report.h"

#include "uip.h"

void report_init(void)

{

u16_t ipaddr[2];

uip_ipaddr(&ipaddr, 192,168,1,68);

uip_connect(&ipaddr, HTONS(1234));

}

void report_app(void)

{

if (uip_connected() || uip_rexmit())

{

uip_send("hi/n",3);

return;

}

}


________________________________

winmail.dat

Ghazali, Izrie

unread,
Mar 1, 2007, 2:03:05 PM3/1/07
to uip-...@sics.se

Have you tested the modified code? I think it cannot be done that way since the compiler outputs an error message: “incompatible types in assignment” at the line you modified. I use GNUARM GCC compiler. Is there any other suggestion?

 

Regards,

izrie

 



--
No virus found in this incoming message.


Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.5/706 - Release Date: 28/02/2007 4:09 PM

Reply all
Reply to author
Forward
0 new messages