obexapp get failure
Iain Hibbert
plunky at rya-online.net
Tue Oct 26 08:30:37 UTC 2010
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
More information about the freebsd-bluetooth
mailing list