"Steven E. Czerwinski" wrote:
>
> Hello -
>
> I am having some trouble using irobex_palm3 to beam information from my linux
> machine to my Palm 3, and I was hoping if someone knew what is going wrong.
>
> I am running 2.2.12 with the latest patch in place. I also have the latest
> irda tools (0.9.4). I believe I have everything set up right.. I can
> sucessfully sync over the IR using pilot-xfer and I can also receive beams
> from the pilot using irobex_receive.
>
> The problem comes when I use irobex_palm3 to beam a message to the pilot.
> It seems to discover the pilot and make a connection with it, but the
> data is never sent. By looking at the dump output, it seems like it gets
> in some sort of infinite loop, looking for something.
>
> Here's the output generated by the irobex_palm3 command: (I also have the
> output of the irda_dump below that.
>
> PUT file /tmp/Barbara.vcs
> This is a Date Book file
> insert_uint_header()
> IrOBEX_ConnectRequest()
> obex_do_event(), event = CONNECT_REQUEST, state = STATE_DISCONNECTED
> obex_state_disconnected()
> obex_connect_request()
> obex_next_state(), STATE_DISCONNECTED
> Sorry, unable to connect!
> root@batman: irobex_palm3 /tmp/Barbara.vcs
> Send and receive files to Palm3
> PUT file /tmp/Barbara.vcs
> This is a Date Book file
> insert_uint_header()
> IrOBEX_ConnectRequest()
> obex_do_event(), event = CONNECT_REQUEST, state = STATE_DISCONNECTED
> obex_state_disconnected()
> obex_connect_request()
> Discovered: (list len=1)
> name: czerwin
> daddr: 143af306
> saddr: ba3aa374
>
> irobex_connect_request(), transport mtu=507
> obex_data_request(), self->response_next=1
> obex_data_request(), len = 7 bytes
> obex_data_request(), sending 7 bytes
> obex_next_state(), STATE_SETUP
> Waiting...
> Got some input!
> obex_data_indication()
> obex_data_indication(), got 7 bytes
> obex_data_indication(), msg len=7
> obex_do_event(), event = RESPONSE_INDICATION, state = STATE_SETUP
> obex_state_setup()
> obex_next_state(), STATE_READY
> obex_connect_confirm()
> version=1.0
> requested MTU=4072, used MTU=4072
> obex_parse_connect_frame(), Allocating new object!
> OBEX_PutRequest()
> Waiting...
> Waiting...
> Waiting...
> Waiting...
I fixed this bug yesterday. Try this patch. Apply it with:
>cd irda-utils-0.9.4
>patch -p1 <connect.c-patch
I don't have time to test the patch myself rigth now, but PUT works in
my tree.
Don't forget to recompile the obex-directory and install the new libs.
/Pontus Fuchs
--- irda-utils-0.9.4/obex/src/obex_connect.c Wed Sep 8 00:03:22 1999
+++ irda-utils/obex/src/obex_connect.c Wed Oct 6 20:16:05 1999
@@ -6,7 +6,7 @@
* Status: Experimental.
* Author: Dag Brattli <[EMAIL PROTECTED]>
* Created at: Wed May 5 11:53:44 1999
- * Modified at: Mon Jun 28 22:36:02 1999
+ * Modified at: Thu Sep 30 09:56:03 1999
* Modified by: Dag Brattli <[EMAIL PROTECTED]>
*
* Copyright (c) 1999 Dag Brattli, All Rights Reserved.
@@ -28,6 +28,8 @@
*
********************************************************************/
+#include <string.h>
+
#include <obex_main.h>
#include <obex_object.h>
#include <obex_header.h>
@@ -226,9 +228,12 @@
DEBUG(4, __FUNCTION__ "()\n");
ret = obex_parse_connect_frame(self, msg);
- if (ret == 0)
- self->notify.connect_indication(self, self->target);
-
+ if (ret == 0) {
+ if(self->notify.connect_indication)
+ self->notify.connect_indication(self, self->target);
+ obex_object_delete(self->object);
+ self->object = NULL;
+ }
return ret;
}
@@ -248,9 +253,11 @@
ret = obex_parse_connect_frame(self, msg);
if (ret == 0) {
self->connected = TRUE;
- self->notify.connect_confirm(self);
+ if(self->notify.connect_confirm)
+ self->notify.connect_confirm(self);
+ obex_object_delete(self->object);
+ self->object = NULL;
}
-
return ret;
}