Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Oct 2010 09:30:53 +0100 (BST)
From:      Iain Hibbert <plunky@rya-online.net>
To:        Maksim Yevmenkin <maksim.yevmenkin@gmail.com>
Cc:        freebsd-bluetooth@freebsd.org
Subject:   Re: obexapp get failure
Message-ID:  <1288081853.739346.21413.nullmailer@galant.ukfsn.org>
In-Reply-To: <AANLkTik%2BBvzyHp_u9iwdT8wG9AMG4eysnFoDvkY5amj4@mail.gmail.com>
References:  <1287509041.022618.4884.nullmailer@galant.ukfsn.org> <AANLkTimVZRNp8oh9%2BVQ6rPbXXFjdNqpgSQ2AqWjqATJY@mail.gmail.com> <1287561876.893861.6837.nullmailer@galant.ukfsn.org> <AANLkTi=V8pm51C4D58KRsiz0FfhOiU=NnUYGQJdeUwxA@mail.gmail.com> <1287732977.227959.8695.nullmailer@galant.ukfsn.org> <1287738768.915002.8520.nullmailer@galant.ukfsn.org> <AANLkTi=iHT9WOVuNq_VFfWo6R3J1ynkhGBV0s6VkS_Uw@mail.gmail.com> <1287857292.298365.1038.nullmailer@galant.ukfsn.org> <AANLkTinU1YpT=kVNHH28fkG2UuMdaRKNWzSmTa4Nq77K@mail.gmail.com> <1287874077.365931.1417.nullmailer@galant.ukfsn.org> <1287909035.704733.393.nullmailer@galant.ukfsn.org> <AANLkTimUBf8ALdpe2JHsS%2BQji-Pf_Ym1BuefCsOVLnHr@mail.gmail.com> <1288042690.562160.2361.nullmailer@galant.ukfsn.org> <AANLkTik%2BBvzyHp_u9iwdT8wG9AMG4eysnFoDvkY5amj4@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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





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