Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Oct 2010 09:30:35 +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:  <1287909035.704733.393.nullmailer@galant.ukfsn.org>
In-Reply-To: <1287874077.365931.1417.nullmailer@galant.ukfsn.org>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 23 Oct 2010, Iain Hibbert wrote:

> I don't know the OBEX protocol, to say which end is not working correctly?

Hmm, looking at OBEX13.pdf section "3.3.4 Get" I see

| A typical multi-step GET operation proceeds as follows: the client sends
| a GET request that may include a Name header; server responds with 0x90
| (Continue) and headers describing the name and size of the object to be
| returned. Seeing the Continue response code, the client sends another
| GET request (with final bit set and no new headers) asking for
| additional data, and the server responds with a response packet
| containing more headers (probably Body Headers) along with another
| Continue response code. As long as the response is Continue, The client
| continues to issue GET requests until the final body information (in an
| End-of-Body header) arrives, along with the response code 0xA0 Success.

and from the dump I attached last night

< ACL data: handle 13 flags 0x02 dlen 40
    L2CAP(d): cid 0x00ab len 36 [psm 3]
      RFCOMM(d): UIH: cr 1 dlci 8 pf 1 ilen 31 fcs 0x46 credits 3
        OBEX: Get cmd(f): len 31
        Connection ID (0xcb) = 43
        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
        0010: 58 58 58 58 58 58 58 58  58 58 58 58 58 58 58 58  XXXXXXXXXXXXXXXX
	[...]
        0fe0: 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 12
    L2CAP(d): cid 0x00ab len 8 [psm 3]
      RFCOMM(d): UIH: cr 1 dlci 8 pf 1 ilen 3 fcs 0x46 credits 5
        OBEX: Get cmd(f): len 3 (continue)

and even hcidump assumes that this Get is a continuation .. the only thing
I can think of is that this Get does not include the "Connection ID"
and/or the "Name" fields.. should it?  The above paragraph does not
explicitly state that the continuation Get request should be empty (though
example in section "7.2 Simple Get" does show empty Get) and when we later
send a Get with these fields, the phone ignores the contents and instead
persists sending the original file until it is complete..

< ACL data: handle 13 flags 0x02 dlen 47
    L2CAP(d): cid 0x00ab len 43 [psm 3]
      RFCOMM(d): UIH: cr 1 dlci 8 pf 1 ilen 38 fcs 0x46 credits 1
        OBEX: Get cmd(f): len 38
        Connection ID (0xcb) = 43
        Name (0x01) = Unicode length 2
        0000: 00 00                                             ..
        Type (0x42) = Sequence length 22
        0000: 78 2d 6f 62 65 78 2f 66  6f 6c 64 65 72 2d 6c 69  x-obex/folder-li
        0010: 73 74 69 6e 67 00                                 sting.

> 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
        0010: 58 58 58 58 58 58 58 58  58 58 58 58 58 58 58 58  XXXXXXXXXXXXXXXX
	[...]
        0fe0: 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 12
    L2CAP(d): cid 0x00ab len 8 [psm 3]
      RFCOMM(d): UIH: cr 1 dlci 8 pf 1 ilen 3 fcs 0x46 credits 5
        OBEX: Get cmd(f): len 3 (continue)

> ACL data: handle 13 flags 0x02 dlen 11
    L2CAP(d): cid 0x0044 len 7 [psm 3]
      RFCOMM(d): UIH: cr 0 dlci 8 pf 0 ilen 3 fcs 0x80
        OBEX: Get rsp(f): status 503 len 3

< ACL data: handle 13 flags 0x02 dlen 47
    L2CAP(d): cid 0x00ab len 43 [psm 3]
      RFCOMM(d): UIH: cr 1 dlci 8 pf 1 ilen 38 fcs 0x46 credits 1
        OBEX: Get cmd(f): len 38
        Connection ID (0xcb) = 43
        Name (0x01) = Unicode length 2
        0000: 00 00                                             ..
        Type (0x42) = Sequence length 22
        0000: 78 2d 6f 62 65 78 2f 66  6f 6c 64 65 72 2d 6c 69  x-obex/folder-li
        0010: 73 74 69 6e 67 00                                 sting.

> 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 don't see how to change that to add the connection id though, any ideas?

iain






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