From owner-freebsd-bluetooth@FreeBSD.ORG Tue Oct 26 08:30:37 2010 Return-Path: Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28A4E106566C for ; Tue, 26 Oct 2010 08:30:37 +0000 (UTC) (envelope-from plunky@rya-online.net) Received: from smtp6.freeserve.com (smtp7.freeserve.com [80.12.242.2]) by mx1.freebsd.org (Postfix) with ESMTP id B20F58FC19 for ; Tue, 26 Oct 2010 08:30:36 +0000 (UTC) Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf3j02.me.freeserve.com (SMTP Server) with ESMTP id C9B03300008B; Tue, 26 Oct 2010 10:30:35 +0200 (CEST) Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf3j02.me.freeserve.com (SMTP Server) with ESMTP id BD1CD3000095; Tue, 26 Oct 2010 10:30:35 +0200 (CEST) Received: from rya-online.net (unknown [89.194.99.220]) by mwinf3j02.me.freeserve.com (SMTP Server) with SMTP id 34E26300008B; Tue, 26 Oct 2010 10:30:33 +0200 (CEST) X-ME-UUID: 20101026083034216.34E26300008B@mwinf3j02.me.freeserve.com Received: (nullmailer pid 5519 invoked by uid 1000); Tue, 26 Oct 2010 08:30:53 -0000 Date: Tue, 26 Oct 2010 09:30:53 +0100 (BST) To: Maksim Yevmenkin In-Reply-To: References: <1287509041.022618.4884.nullmailer@galant.ukfsn.org> <1287561876.893861.6837.nullmailer@galant.ukfsn.org> <1287732977.227959.8695.nullmailer@galant.ukfsn.org> <1287738768.915002.8520.nullmailer@galant.ukfsn.org> <1287857292.298365.1038.nullmailer@galant.ukfsn.org> <1287874077.365931.1417.nullmailer@galant.ukfsn.org> <1287909035.704733.393.nullmailer@galant.ukfsn.org> <1288042690.562160.2361.nullmailer@galant.ukfsn.org> User-Agent: Alpine 2.00 (NEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Message-Id: <1288081853.739346.21413.nullmailer@galant.ukfsn.org> From: Iain Hibbert Cc: freebsd-bluetooth@freebsd.org Subject: Re: obexapp get failure X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Oct 2010 08:30:37 -0000 On Mon, 25 Oct 2010, Maksim Yevmenkin wrote: > i'm pretty sure that is what it is. can you please try the patch > below. this is completely untested :) no idea what it will do. > > beetle% cvs diff -u > cvs diff: Diffing . > Index: stream.c > =================================================================== > RCS file: /usr/local/cvs/ports/obexapp/stream.c,v > retrieving revision 1.10 > diff -u -r1.10 stream.c > --- stream.c 22 Oct 2010 17:04:11 -0000 1.10 > +++ stream.c 25 Oct 2010 23:36:11 -0000 > @@ -230,6 +230,12 @@ > > context->stotal += length; > log_debug("%s(): Wrote %d bytes of stream data", __func__, length); > + > + if (context->connection_id != OBEXAPP_INVALID_CONNECTION_ID) { > + hv.bq4 = context->connection_id; > + OBEX_ObjectAddHeader(handle, object, > + OBEX_HDR_CONNECTION, hv, sizeof(hv.bq4), 0); > + } > } /* obexapp_stream_read */ > > void that patch does indeed make it work! fetching an 8k file with 4k MTU: < ACL data: handle 13 flags 0x02 dlen 40 L2CAP(d): cid 0x00c0 len 36 [psm 3] RFCOMM(d): UIH: cr 1 dlci 8 pf 1 ilen 31 fcs 0x46 credits 1 OBEX: Get cmd(f): len 31 Connection ID (0xcb) = 52 Name (0x01) = Unicode length 20 0000: 00 74 00 65 00 73 00 74 00 2e 00 38 00 31 00 39 .t.e.s.t...8.1.9 0010: 00 34 00 00 .4.. > ACL data: handle 13 flags 0x02 dlen 40 L2CAP(d): cid 0x0044 len 36 [psm 3] RFCOMM(d): UIH: cr 0 dlci 8 pf 0 ilen 32 fcs 0x80 OBEX: Get rsp(f): status 100 len 4096 Status 100 = Continue Body (0x48) = Sequence length 4090 0000: 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 XXXXXXXXXXXXXXXX [...] 0ff0: 58 58 58 58 58 58 58 58 58 58 XXXXXXXXXX < ACL data: handle 13 flags 0x02 dlen 17 L2CAP(d): cid 0x00c0 len 13 [psm 3] RFCOMM(d): UIH: cr 1 dlci 8 pf 1 ilen 8 fcs 0x46 credits 5 OBEX: Get cmd(f): len 8 (continue) Connection ID (0xcb) = 52 > ACL data: handle 13 flags 0x02 dlen 40 L2CAP(d): cid 0x0044 len 36 [psm 3] RFCOMM(d): UIH: cr 0 dlci 8 pf 0 ilen 32 fcs 0x80 OBEX: Get rsp(f): status 100 len 4096 Status 100 = Continue Body (0x48) = Sequence length 4090 0000: 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 XXXXXXXXXXXXXXXX [...] 0ff0: 58 58 58 58 58 58 58 58 58 58 XXXXXXXXXX < ACL data: handle 13 flags 0x02 dlen 17 L2CAP(d): cid 0x00c0 len 13 [psm 3] RFCOMM(d): UIH: cr 1 dlci 8 pf 1 ilen 8 fcs 0x46 credits 5 OBEX: Get cmd(f): len 8 (continue) Connection ID (0xcb) = 52 > ACL data: handle 13 flags 0x02 dlen 28 L2CAP(d): cid 0x0044 len 24 [psm 3] RFCOMM(d): UIH: cr 0 dlci 8 pf 0 ilen 20 fcs 0x80 OBEX: Get rsp(f): status 200 len 20 Status 200 = Success End of Body (0x49) = Sequence length 14 0000: 58 58 58 58 58 58 58 58 58 58 58 58 58 0a XXXXXXXXXXXXX. (I have no time to think about possible misconsequences of this just now, perhaps I will subscribe to openobex-users mailing list and query them later) iain