Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Jul 2006 12:44:33 -0700
From:      Maksim Yevmenkin <maksim.yevmenkin@savvis.net>
To:        Ray Newman <ray@one.com.au>
Cc:        freebsd-bluetooth@freebsd.org
Subject:   Re: Problem transfering from LG phone
Message-ID:  <44BBE8A1.8080809@savvis.net>
In-Reply-To: <44BB4A9C.6040708@one.com.au>
References:  <44BB4A9C.6040708@one.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------070208090003070300060907
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Ray,

[...]

> hcidump gives the following when I try to transfer an image from my
> LG U8360 phone:

[...]

>  > ACL data: handle 0x0007 flags 0x02 dlen 25
>     L2CAP(d): cid 0x41 len 21 [psm 1]
>         SDP SSA Req: tid 0x1 len 0x10
>           pat uuid-16 0x1106 (OBEXObjTrnsf)
>           max 0x2a0
>           aid(s) 0x0000 - 0xffff
>           cont 00
> < ACL data: handle 0x0007 flags 0x02 dlen 15
>     L2CAP(d): cid 0x40 len 11 [psm 1]
>         SDP SSA Rsp: tid 0x1 len 0x6
>           cnt 0x3
>           cont 00

it appears that your lg phone wants to use "obex file transfer" service 
to transfer the picture. obexapp in server mode only registers "obex 
object push" service.

so, your lg phone does not find the service it looks for and bails out.

i have attached untested patch for obexapp that makes it register both 
opush and ftrn services.

thanks,
max


--------------070208090003070300060907
Content-Type: text/plain;
 name="obexapp.ftrn.diff.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="obexapp.ftrn.diff.txt"

Index: transport.c
===================================================================
RCS file: /usr/local/cvs/ports/obexapp/transport.c,v
retrieving revision 1.10
diff -u -r1.10 transport.c
--- transport.c	9 Dec 2004 22:39:25 -0000	1.10
+++ transport.c	17 Jul 2006 19:42:14 -0000
@@ -162,6 +162,7 @@
 	pid_t			pid;
 	int			s;
 	sdp_opush_profile_t	opush;
+	sdp_ftrn_profile_t	ftrn;
 
 	syslog(LOG_DEBUG, "%s()", __func__);
 
@@ -216,6 +217,23 @@
 		return (-1);
 	}
 
+	memset(&ftrn, 0, sizeof(ftrn));
+	ftrn.server_channel = context->addr.rfcomm_channel;
+
+	if (sdp_register_service(context->ss,
+			SDP_SERVICE_CLASS_OBEX_FILE_TRANSFER,
+			&context->addr.rfcomm_bdaddr,
+			(void *) &ftrn, sizeof(ftrn), NULL) != 0) {
+		syslog(LOG_ERR, "%s(): Could to register FTRN service with " \
+			"local SDP daemon. %s (%d)",
+			__func__, strerror(sdp_error(context->ss)),
+			sdp_error(context->ss));
+		sdp_close(context->ss);
+		context->ss = NULL;
+
+		return (-1);
+	}
+
 	while (1) {
 		addrlen = sizeof(addr);
 		context->tfd = accept(s, (struct sockaddr *) &addr, &addrlen);

--------------070208090003070300060907--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44BBE8A1.8080809>