From owner-freebsd-bluetooth@FreeBSD.ORG Fri Oct 22 17:01:54 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 498AA106567A for ; Fri, 22 Oct 2010 17:01:54 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id 01D638FC1D for ; Fri, 22 Oct 2010 17:01:53 +0000 (UTC) Received: by gxk2 with SMTP id 2so826844gxk.13 for ; Fri, 22 Oct 2010 10:01:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=q3HYy8FJhsq+mjZe9uA2sr9AwbdYgvjlQp8Wn3741bU=; b=A1Tc/SHeNK1jU0tN/HfxNJ15I3HOW6r4D/EVgZSBR4nJOENexPrFu3mngiGdy47Ovi rKrI2z7B1zTjr9ifoHL56FkQc2JHtHbyAu1DusUCGOS7VI5+AtReuZo17vvYOC57XmWB EueFDdRXqlJXUdZjkLxBTB6KnaWLcjbIzo3i4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=XSOva/di2wDrlYzNmFYR4d0b72rxCWTGKEpOp/IC3O+xPPNdZDZnwXKjRLfv1imOUy 5xgvn6a4AfRf+90qFSwKFnyJFenwKwFwbakYsu9mThclEJsSDR9S6dDIDuwMoUjb8Ul0 7raEYhAXZCd5NtqVMYkfuNfxlwIg5YFjJ7WFg= MIME-Version: 1.0 Received: by 10.42.214.146 with SMTP id ha18mr2095448icb.503.1287766911932; Fri, 22 Oct 2010 10:01:51 -0700 (PDT) Received: by 10.231.215.169 with HTTP; Fri, 22 Oct 2010 10:01:51 -0700 (PDT) In-Reply-To: <1287738768.915002.8520.nullmailer@galant.ukfsn.org> 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> Date: Fri, 22 Oct 2010 10:01:51 -0700 Message-ID: From: Maksim Yevmenkin To: Iain Hibbert Content-Type: text/plain; charset=ISO-8859-1 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: Fri, 22 Oct 2010 17:01:54 -0000 On Fri, Oct 22, 2010 at 2:12 AM, Iain Hibbert wrote: > On Fri, 22 Oct 2010, Iain Hibbert wrote: > >> I have one bug-report that I haven't looked into properly, not sure if its >> obexapp or my phone (windows mobile 6) that is the problem.. if I connect >> to FTRN on phone, using folder browsing service and try GET on a larger >> file it fails and loses sync. I've done some tests and the largest file I >> can GET is 65528 bytes (can send larger files from either side no problem) >> >> for example with two files (that are text files full of 'a') >> >> % obexapp -a touch -C ftrn -f >> obex> ls >> Access Owner Group Size Modified Name >> .. >> n/a n/a 65528 n/a test.small >> n/a n/a 65529 n/a test.large >> Success, response: OK, Success (0x20) >> obex> get test.small >> 65528 bytes streamed in 4 seconds (16382 bytes/sec) >> Success, response: OK, Success (0x20) >> obex> get test.large >> Failure, response: Unknown response (0x53) >> obex> ls >> Access Owner Group Size Modified Name >> Could not parse XML: (null) >> Success, response: OK, Success (0x20) >> obex> ls >> Access Owner Group Size Modified Name >> .. >> n/a n/a 65528 n/a test.small >> n/a n/a 65529 n/a test.large >> Success, response: OK, Success (0x20) >> obex> get test.small >> 65528 bytes streamed in 3 seconds (21842 bytes/sec) >> Success, response: OK, Success (0x20) >> obex> dis >> Success, response: OK, Success (0x20) >> >> I guess its something to do with a uint16_t and a small amount of header >> but I've no time to look at that until early next week.. > > looking at the hcidump output for the test.large transaction, > > < ACL data: handle 13 flags 0x02 dlen 42 > L2CAP(d): cid 0x0089 len 38 [psm 3] > RFCOMM(d): UIH: cr 1 dlci 8 pf 1 ilen 33 fcs 0x46 credits 6 > OBEX: Get cmd(f): len 33 > Connection ID (0xcb) = 27 > Name (0x01) = Unicode length 22 > 0000: 00 74 00 65 00 73 00 74 00 2e 00 6c 00 61 00 72 .t.e.s.t...l.a.r > 0010: 00 67 00 65 00 00 .g.e.. > >> 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 100 len 65535 > Status 100 = Continue > Body (0x48) = Sequence length 65529 > 0000: 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 aaaaaaaaaaaaaaaa > 0010: 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 aaaaaaaaaaaaaaaa > 0020: 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 aaaaaaaaaaaaaaaa > [...] > ffc0: 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 aaaaaaaaaaaaaaaa > ffd0: 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 aaaaaaaaaaaaaaaa > ffe0: 61 61 61 61 61 61 61 61 61 0a 61 61 61 61 61 61 aaaaaaaaa.aaaaaa > fff0: 61 61 61 61 61 61 61 61 0a aaaaaaaa. > > < ACL data: handle 13 flags 0x02 dlen 12 > L2CAP(d): cid 0x0089 len 8 [psm 3] > RFCOMM(d): UIH: cr 1 dlci 8 pf 1 ilen 3 fcs 0x46 credits 6 > 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 500 len 3 > > it seems that the wm6 phone tells us that more is to come, so we issue a > continuation get but the phone is only confused.. I don't know if this is > done correctly, or can be worked around? hmmm... interesting.... could you please try to lower obexapp mtu? i.e. use -m command line switch. try to set to something like 16k-32k and see if it makes any difference. there is an OBEXAPP_BUFFER_SIZE which is set to 65536 by default. but, i think, it might be wrong. it probably should be set to OBEX_MAXIMUM_MTU (which just happens to be set to 65535 in my version of openobex library). i did not make any changes in this area recently. i recall doing torture testing when i was transferring 4mb+ files between 2 unix machines and between unix and windows machine without any problems. thanks, max