* Re: obexd 0.14 "put" file corruption
@ 2010-02-24 22:23 Ed Tsang
2010-02-26 8:41 ` Luiz Augusto von Dentz
0 siblings, 1 reply; 10+ messages in thread
From: Ed Tsang @ 2010-02-24 22:23 UTC (permalink / raw)
To: Bluettooth Linux
>I am using obexd 0.14 to push files into phone. The image file received by some phone seem a bit strange and in some phone it could not be >display at all. So I tried a simple text file with line number as text. Then I saw the file received from the phone is corrupted. Looking into the >hcidump look like the second "Put cmd" and forward, the first "0xc8" bytes was not copied (stay the same as the firs put cmd).
> Anyone know if this is a known problem in 0.14 or fixed in the latest (obexd 0.20).
Installed the obexd o.20. Same problem???
-------------------------- first put
RFCOMM(d): UIH: cr 1 dlci 12 pf 0 ilen 303 fcs 0x4f
OBEX: Put cmd(c): len 3922
Name (0x01) = Unicode length 12
0000: 00 74 00 2e 00 74 00 78 00 74 00 00 .t...t.x.t..
Length (0xc3) = 8208
Body (0x48) = Sequence length 3896
0000: 30 30 20 66 69 72 73 74 20 6c 69 6e 65 20 20 0a 00 first line .
0010: 31 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0a 1 .
...................... second put (after 0xc8 is fine)
RFCOMM(d): UIH: cr 1 dlci 12 pf 0 ilen 283 fcs 0x4f
OBEX: Put cmd(c): len 3902 (continue)
Body (0x48) = Sequence length 3896
0000: 30 30 20 66 69 72 73 74 20 6c 69 6e 65 20 20 0a 00 first line .
0010: 31 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0a 1 .
0020: 32 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0a 2 .
0030: 33 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0a 3 .
0040: 34 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0a 4 .
0050: 35 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0a 5 .
0060: 36 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0a 6 .
0070: 37 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0a 7 .
0080: 38 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0a 8 .
0090: 39 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0a 9 .
00a0: 41 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0a A .
00b0: 42 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0a B .
00c0: 43 20 20 20 20 20 20 20 31 30 30 20 73 65 63 6f C 100 seco
00d0: 6e 64 20 70 61 67 65 0a 31 20 20 20 20 20 20 20 nd page.1
00e0: 20 20 20 20 20 20 32 0a 32 20 20 20 20 20 20 20 2.2
Anyone bump into this?? look like the start of copying problem...
Ed
__________________________________________________________________
Make your browsing faster, safer, and easier with the new Internet Explorer® 8. Optimized for Yahoo! Get it Now for Free! at http://downloads.yahoo.com/ca/internetexplorer/
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: obexd 0.14 "put" file corruption 2010-02-24 22:23 obexd 0.14 "put" file corruption Ed Tsang @ 2010-02-26 8:41 ` Luiz Augusto von Dentz 2010-03-05 16:31 ` Bastien Nocera 0 siblings, 1 reply; 10+ messages in thread From: Luiz Augusto von Dentz @ 2010-02-26 8:41 UTC (permalink / raw) To: Ed Tsang; +Cc: Bluettooth Linux Hi, On Thu, Feb 25, 2010 at 12:23 AM, Ed Tsang <netdesign_98@yahoo.com> wrote: > > >>I am using obexd 0.14 to push files into phone. The image file received by some phone seem a bit strange and in some phone it could not be >display at all. So I tried a simple text file with line number as text. Then I saw the file received from the phone is corrupted. Looking into the >hcidump look like the second "Put cmd" and forward, the first "0xc8" bytes was not copied (stay the same as the firs put cmd). >> Anyone know if this is a known problem in 0.14 or fixed in the latest (obexd 0.20). > Installed the obexd o.20. Same problem??? > -------------------------- first put > RFCOMM(d): UIH: cr 1 dlci 12 pf 0 ilen 303 fcs 0x4f > OBEX: Put cmd(c): len 3922 > Name (0x01) = Unicode length 12 > 0000: 00 74 00 2e 00 74 00 78 00 74 00 00 .t...t.x.t.. > Length (0xc3) = 8208 > Body (0x48) = Sequence length 3896 > 0000: 30 30 20 66 69 72 73 74 20 6c 69 6e 65 20 20 0a 00 first line . > 0010: 31 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0a 1 . > > ...................... second put (after 0xc8 is fine) > RFCOMM(d): UIH: cr 1 dlci 12 pf 0 ilen 283 fcs 0x4f > OBEX: Put cmd(c): len 3902 (continue) > Body (0x48) = Sequence length 3896 > 0000: 30 30 20 66 69 72 73 74 20 6c 69 6e 65 20 20 0a 00 first line . > 0010: 31 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0a 1 . > 0020: 32 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0a 2 . > 0030: 33 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0a 3 . > 0040: 34 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0a 4 . > 0050: 35 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0a 5 . > 0060: 36 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0a 6 . > 0070: 37 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0a 7 . > 0080: 38 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0a 8 . > 0090: 39 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0a 9 . > 00a0: 41 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0a A . > 00b0: 42 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0a B . > 00c0: 43 20 20 20 20 20 20 20 31 30 30 20 73 65 63 6f C 100 seco > 00d0: 6e 64 20 70 61 67 65 0a 31 20 20 20 20 20 20 20 nd page.1 > 00e0: 20 20 20 20 20 20 32 0a 32 20 20 20 20 20 20 20 2.2 > > Anyone bump into this?? look like the start of copying problem... Weird, are you sure the client is sending this properly? Anyway we do store the data in a buffer even if was sent together with put cmd, Im very suspicious that this is not the problem since we would have notice this before. Btw obexd does not push/send files obex-client does, are you talking about obex-client? -- Luiz Augusto von Dentz Computer Engineer ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: obexd 0.14 "put" file corruption 2010-02-26 8:41 ` Luiz Augusto von Dentz @ 2010-03-05 16:31 ` Bastien Nocera 2010-03-05 18:07 ` Ed Tsang 0 siblings, 1 reply; 10+ messages in thread From: Bastien Nocera @ 2010-03-05 16:31 UTC (permalink / raw) To: Luiz Augusto von Dentz; +Cc: Ed Tsang, Bluettooth Linux On Fri, 2010-02-26 at 10:41 +0200, Luiz Augusto von Dentz wrote: > Hi, > > On Thu, Feb 25, 2010 at 12:23 AM, Ed Tsang <netdesign_98@yahoo.com> wrote: > > > > > >>I am using obexd 0.14 to push files into phone. The image file received by some phone seem a bit strange and in some phone it could not be >display at all. So I tried a simple text file with line number as text. Then I saw the file received from the phone is corrupted. Looking into the >hcidump look like the second "Put cmd" and forward, the first "0xc8" bytes was not copied (stay the same as the firs put cmd). > >> Anyone know if this is a known problem in 0.14 or fixed in the latest (obexd 0.20). > > Installed the obexd o.20. Same problem??? > > -------------------------- first put > > RFCOMM(d): UIH: cr 1 dlci 12 pf 0 ilen 303 fcs 0x4f > > OBEX: Put cmd(c): len 3922 > > Name (0x01) = Unicode length 12 > > 0000: 00 74 00 2e 00 74 00 78 00 74 00 00 .t...t.x.t.. > > Length (0xc3) = 8208 > > Body (0x48) = Sequence length 3896 > > 0000: 30 30 20 66 69 72 73 74 20 6c 69 6e 65 20 20 0a 00 first line . > > 0010: 31 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0a 1 . > > > > ...................... second put (after 0xc8 is fine) > > RFCOMM(d): UIH: cr 1 dlci 12 pf 0 ilen 283 fcs 0x4f > > OBEX: Put cmd(c): len 3902 (continue) > > Body (0x48) = Sequence length 3896 > > 0000: 30 30 20 66 69 72 73 74 20 6c 69 6e 65 20 20 0a 00 first line . > > 0010: 31 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0a 1 . > > 0020: 32 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0a 2 . > > 0030: 33 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0a 3 . > > 0040: 34 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0a 4 . > > 0050: 35 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0a 5 . > > 0060: 36 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0a 6 . > > 0070: 37 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0a 7 . > > 0080: 38 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0a 8 . > > 0090: 39 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0a 9 . > > 00a0: 41 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0a A . > > 00b0: 42 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0a B . > > 00c0: 43 20 20 20 20 20 20 20 31 30 30 20 73 65 63 6f C 100 seco > > 00d0: 6e 64 20 70 61 67 65 0a 31 20 20 20 20 20 20 20 nd page.1 > > 00e0: 20 20 20 20 20 20 32 0a 32 20 20 20 20 20 20 20 2.2 > > > > Anyone bump into this?? look like the start of copying problem... > > Weird, are you sure the client is sending this properly? Anyway we do > store the data in a buffer even if was sent together with put cmd, Im > very suspicious that this is not the problem since we would have > notice this before. Btw obexd does not push/send files obex-client > does, are you talking about obex-client? This has been reported to me as well, with obexd 0.19: https://bugzilla.redhat.com/show_bug.cgi?id=550538 Ideas on how to debug this? Cheers ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: obexd 0.14 "put" file corruption 2010-03-05 16:31 ` Bastien Nocera @ 2010-03-05 18:07 ` Ed Tsang 2010-03-05 19:35 ` Vinicius Gomes 0 siblings, 1 reply; 10+ messages in thread From: Ed Tsang @ 2010-03-05 18:07 UTC (permalink / raw) To: Bastien Nocera, Luiz Augusto von Dentz; +Cc: Bluettooth Linux I think I found the problem. It is when the MTU is 4096, the send size is set to 3896 (200 for the overhead). So the last 200 did not get send and it remember as "pre-fill" for the next transfer. The code did try to move the data but incorrectly. clinet/session.c put_xfer_progress() ----- origional memmove(session->buffer + written, session->buffer, session->filled); /* try to move from the remaining from the bottom of the buffer to the beginning of buffer but memove is (*dest, * src, len) not as normally most people, including me, will guess (*src, *dest, len) -------- should be memmove(session->buffer, session->buffer + written, session->filled); with the change, it seem working now? Ed ----- Original Message ---- From: Bastien Nocera <hadess@hadess.net> To: Luiz Augusto von Dentz <luiz.dentz@gmail.com> Cc: Ed Tsang <netdesign_98@yahoo.com>; Bluettooth Linux <linux-bluetooth@vger.kernel.org> Sent: Fri, March 5, 2010 11:31:14 AM Subject: Re: obexd 0.14 "put" file corruption On Fri, 2010-02-26 at 10:41 +0200, Luiz Augusto von Dentz wrote: > Hi, > > On Thu, Feb 25, 2010 at 12:23 AM, Ed Tsang <netdesign_98@yahoo.com> wrote: > > > > > >>I am using obexd 0.14 to push files into phone. The image file received by some phone seem a bit strange and in some phone it could not be >display at all. So I tried a simple text file with line number as text. Then I saw the file received from the phone is corrupted. Looking into the >hcidump look like the second "Put cmd" and forward, the first "0xc8" bytes was not copied (stay the same as the firs put cmd). > >> Anyone know if this is a known problem in 0.14 or fixed in the latest (obexd 0.20). > > Installed the obexd o.20. Same problem??? > > -------------------------- first put > > RFCOMM(d): UIH: cr 1 dlci 12 pf 0 ilen 303 fcs 0x4f > > OBEX: Put cmd(c): len 3922 > > Name (0x01) = Unicode length 12 > > 0000: 00 74 00 2e 00 74 00 78 00 74 00 00 .t...t.x.t.. > > Length (0xc3) = 8208 > > Body (0x48) = Sequence length 3896 > > 0000: 30 30 20 66 69 72 73 74 20 6c 69 6e 65 20 20 0a 00 first line . > > 0010: 31 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0a 1 . > > > > ...................... second put (after 0xc8 is fine) > > RFCOMM(d): UIH: cr 1 dlci 12 pf 0 ilen 283 fcs 0x4f > > OBEX: Put cmd(c): len 3902 (continue) > > Body (0x48) = Sequence length 3896 > > 0000: 30 30 20 66 69 72 73 74 20 6c 69 6e 65 20 20 0a 00 first line . > > 0010: 31 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0a 1 . > > 0020: 32 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0a 2 . > > 0030: 33 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0a 3 . > > 0040: 34 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0a 4 . > > 0050: 35 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0a 5 . > > 0060: 36 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0a 6 . > > 0070: 37 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0a 7 . > > 0080: 38 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0a 8 . > > 0090: 39 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0a 9 . > > 00a0: 41 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0a A . > > 00b0: 42 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0a B . > > 00c0: 43 20 20 20 20 20 20 20 31 30 30 20 73 65 63 6f C 100 seco > > 00d0: 6e 64 20 70 61 67 65 0a 31 20 20 20 20 20 20 20 nd page.1 > > 00e0: 20 20 20 20 20 20 32 0a 32 20 20 20 20 20 20 20 2.2 > > > > Anyone bump into this?? look like the start of copying problem... > > Weird, are you sure the client is sending this properly? Anyway we do > store the data in a buffer even if was sent together with put cmd, Im > very suspicious that this is not the problem since we would have > notice this before. Btw obexd does not push/send files obex-client > does, are you talking about obex-client? This has been reported to me as well, with obexd 0.19: https://bugzilla.redhat.com/show_bug.cgi?id=550538 Ideas on how to debug this? Cheers __________________________________________________________________ The new Internet Explorer® 8 - Faster, safer, easier. Optimized for Yahoo! Get it Now for Free! at http://downloads.yahoo.com/ca/internetexplorer/ ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: obexd 0.14 "put" file corruption 2010-03-05 18:07 ` Ed Tsang @ 2010-03-05 19:35 ` Vinicius Gomes 2010-03-05 19:51 ` Ed Tsang 0 siblings, 1 reply; 10+ messages in thread From: Vinicius Gomes @ 2010-03-05 19:35 UTC (permalink / raw) To: Ed Tsang; +Cc: Bluettooth Linux Hi Ed, On Fri, Mar 5, 2010 at 3:07 PM, Ed Tsang <netdesign_98@yahoo.com> wrote: > I think I found the problem. It is when the MTU is 4096, the send size is set to > 3896 (200 for the overhead). So the last 200 did not get send > and it remember as "pre-fill" for the next transfer. The code did try to move the data but incorrectly. > > clinet/session.c put_xfer_progress() > ----- origional > memmove(session->buffer + written, session->buffer, session->filled); > /* try to move from the remaining from the bottom of the buffer to the beginning of buffer > but memove is (*dest, * src, len) not as normally most people, including me, will guess (*src, *dest, len) > -------- should be > memmove(session->buffer, session->buffer + written, session->filled); > > Yeah, I can reproduce it changing DEFAULT_BUFFER_SIZE to something bigger, 32767 for example. Care to send a patch against the current git? Thanks for the report. > with the change, it seem working now? > > > Ed > Cheers, -- Vinicius Gomes INdT - Instituto Nokia de Tecnologia ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: obexd 0.14 "put" file corruption 2010-03-05 19:35 ` Vinicius Gomes @ 2010-03-05 19:51 ` Ed Tsang 2010-03-05 20:38 ` Vinicius Gomes 0 siblings, 1 reply; 10+ messages in thread From: Ed Tsang @ 2010-03-05 19:51 UTC (permalink / raw) To: Vinicius Gomes; +Cc: Bluettooth Linux Vinicius, > Care to send a patch against the current git? I love to, but I don't know how to generate the patch and setup git?. The delta is on client/session.c put_xfer_progerss(..) - memmove(session->buffer + written, session->buffer, session->filled); + memmove(session->buffer, session->buffer + written, session->filled); Could you help me put it into the source. If you are kind enough to point me a link to setup the git and generate a patch, I could be ready next time. Ed __________________________________________________________________ Make your browsing faster, safer, and easier with the new Internet Explorer® 8. Optimized for Yahoo! Get it Now for Free! at http://downloads.yahoo.com/ca/internetexplorer/ ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: obexd 0.14 "put" file corruption 2010-03-05 19:51 ` Ed Tsang @ 2010-03-05 20:38 ` Vinicius Gomes 2010-03-08 14:31 ` Bastien Nocera 0 siblings, 1 reply; 10+ messages in thread From: Vinicius Gomes @ 2010-03-05 20:38 UTC (permalink / raw) To: Ed Tsang; +Cc: Bluettooth Linux Hi Ed, On Fri, Mar 5, 2010 at 4:51 PM, Ed Tsang <netdesign_98@yahoo.com> wrote: > Vinicius, >> Care to send a patch against the current git? > > I love to, but I don't know how to generate the patch and setup git?. > > The delta is on client/session.c put_xfer_progerss(..) > - memmove(session->buffer + written, session->buffer, session->filled); > + memmove(session->buffer, session->buffer + written, session->filled); > > Could you help me put it into the source. > If you are kind enough to point me a link to setup the git and generate a patch, I could be ready next time. > Sure, just asked for this patch to be included. Here[1][2][3] are some references to get you started. > > Ed > Cheers, -- Vinicius Gomes INdT - Instituto Nokia de Tecnologia [1] http://www.kernel.org/pub/software/scm/git/docs/ [2] http://git.wiki.kernel.org/index.php/GitDocumentation [3] http://book.git-scm.com/ ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: obexd 0.14 "put" file corruption 2010-03-05 20:38 ` Vinicius Gomes @ 2010-03-08 14:31 ` Bastien Nocera 2010-03-08 16:53 ` Ed Tsang 0 siblings, 1 reply; 10+ messages in thread From: Bastien Nocera @ 2010-03-08 14:31 UTC (permalink / raw) To: Vinicius Gomes; +Cc: Ed Tsang, Bluettooth Linux On Fri, 2010-03-05 at 17:38 -0300, Vinicius Gomes wrote: > Hi Ed, > > On Fri, Mar 5, 2010 at 4:51 PM, Ed Tsang <netdesign_98@yahoo.com> wrote: > > Vinicius, > >> Care to send a patch against the current git? > > > > I love to, but I don't know how to generate the patch and setup git?. > > > > The delta is on client/session.c put_xfer_progerss(..) > > - memmove(session->buffer + written, session->buffer, session->filled); > > + memmove(session->buffer, session->buffer + written, session->filled); > > > > Could you help me put it into the source. > > If you are kind enough to point me a link to setup the git and generate a patch, I could be ready next time. > > > > Sure, just asked for this patch to be included. You could at least have mentioned Ed's name in the commit log, or attributed the patch to him... > Here[1][2][3] are some references to get you started. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: obexd 0.14 "put" file corruption 2010-03-08 14:31 ` Bastien Nocera @ 2010-03-08 16:53 ` Ed Tsang 0 siblings, 0 replies; 10+ messages in thread From: Ed Tsang @ 2010-03-08 16:53 UTC (permalink / raw) To: Bastien Nocera, Vinicius Gomes; +Cc: Bluettooth Linux >You could at least have mentioned Ed's name in the commit log, or >attributed the patch to him... That is unnecessarily. Ed __________________________________________________________________ Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your favourite sites. Download it now http://ca.toolbar.yahoo.com. ^ permalink raw reply [flat|nested] 10+ messages in thread
* obexd 0.14 "put" file corruption
@ 2010-02-24 21:50 Ed Tsang
0 siblings, 0 replies; 10+ messages in thread
From: Ed Tsang @ 2010-02-24 21:50 UTC (permalink / raw)
To: Bluettooth Linux
Hi,
I am using obexd 0.14 to push files into phone. The image file received by some phone seem a bit strange and in some phone it could not be display at all. So I tried a simple text file with line number as text. Then I saw the file received from the phone is corrupted. Looking into the hcidump look like the second "Put cmd" and forward, the first "0xc8" bytes was not copied (stay the same as the firs put cmd).
Anyone know if this is a known problem in 0.14 or fixed in the latest (obexd 0.20).
Thanks,
Ed
__________________________________________________________________
Get the name you've always wanted @ymail.com or @rocketmail.com! Go to http://ca.promos.yahoo.com/jacko/
^ permalink raw reply [flat|nested] 10+ messages in threadend of thread, other threads:[~2010-03-08 16:53 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-02-24 22:23 obexd 0.14 "put" file corruption Ed Tsang 2010-02-26 8:41 ` Luiz Augusto von Dentz 2010-03-05 16:31 ` Bastien Nocera 2010-03-05 18:07 ` Ed Tsang 2010-03-05 19:35 ` Vinicius Gomes 2010-03-05 19:51 ` Ed Tsang 2010-03-05 20:38 ` Vinicius Gomes 2010-03-08 14:31 ` Bastien Nocera 2010-03-08 16:53 ` Ed Tsang -- strict thread matches above, loose matches on Subject: below -- 2010-02-24 21:50 Ed Tsang
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox