[uip-users] Disconnection Problem

10 views
Skip to first unread message

Neil Jeffery

unread,
Feb 28, 2007, 12:29:50 PM2/28/07
to uip-...@sics.se

Hi,

 

I am using uIP 0.9 on a SPARC processor as part of my final year project.

 

At present I have the httpd example and a simple TCP receiver running, the connected port determines which process runs.

 

At present I can send TCP packets to the port the receiver is listening on and it can receive and process them fine.  However when I close the connection remotely I can never reconnect.

 

When the app is called there is a list of if statements relating to the uip_newdata(), uip_closed() etc. functions.  When the TCP connection is closed the uip_closed() function is true and the program prints “Connection Closed” to the console.  I have noticed however that this is always written twice indicating that the closed event occurs twice.  I have tried doing nothing when uip_closed is true and I have tried running uip_close() neither seem to work.

 

The httpd server allows disconnection and reconnection however.

 

Any ideas?

 

Many thanks

 

Neil Jeffery

Fabio Giovagnini

unread,
Feb 28, 2007, 12:45:37 PM2/28/07
to uip-...@sics.se
Try to read the packet on reconnection with ethereal.

Did you do this already?

Regards

--
Fabio Giovagnini

Aurion s.r.l.
via degli orti 11,
40050 Funo di Argelato (BO)
Tel. +39.335.8350919
Fax +39.051.8659009

www.aurion-tech.com

account telefono VoIP skype (www.skype.com):
aurion.giovagnini

Ghazali, Izrie

unread,
Mar 1, 2007, 8:04:41 PM3/1/07
to uip-...@sics.se

Hi Neil,

 

I am currently using uIP 0.9 as well for my final year project. The only difference is I ported uIP on the top of FreeRTOS 4.0.

 

I have a problem with connecting to a simple listening server which I developed by using java server socket. As I made an attempt to establish a connection to the host server, the server returns an error message on the console of “connection reset”. I am not sure what the problem is. As far as I am concerned, the server works fine when I connect to it using MS telnet. Could you please let me know how exactly I can make a connection and hence transmit packets? And do you have a sample of source code on how it is done? What sort of server are you using? Finally here is my code for my simple client socket software:

 

#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;

            }

}

 

Attached is the java code for my server. Could you please help me with this problem?

 

Thank you,

 

Regards,

Izrie

 



--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.4/705 - Release Date: 27/02/2007 3:24 PM


--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.5/707 - Release Date: 01/03/2007 2:43 PM

DatabaseServer.java
Reply all
Reply to author
Forward
0 new messages