|
From: Linus W. <lin...@gm...> - 2008-02-29 22:00:49
|
2008/2/29, Ciarán Coffey <ci...@cc...>: > Sorry for the delay in getting back. Here's the output of mtp-detect. > http://www.ecornflake.com/files/zen32_mtp_detect.tar.bz2 > It locks up during this operation and requires a reset. OK the operations basically succeed with some glitches, here is what actually goes wrong. Device claims to support this: USB OUT==> 0000: 2000 0000 0100 0598 1600 0000 ffff ffff ............... 0010: 0000 0000 ffff ffff 0000 0000 0000 0000 ................ We request all object handles and props, command 9805 for object 0xffffffff and props 0xffffffff. Reading in 0x0200 bytes Result of read: 0x000c <==USB IN 0000: ffff ffff 0200 0598 1600 0000 ............ Urghl. This is the response, it shall come AFTER the data, not BEFORE it. Now libmtp thinks it shall retrieve 0xffffffff (unsigned -1) objects. Thats WAY too many, and it tries desperately to do so until it runs out of data and fails further down. It then tries a secondary method but by then the device is upset because we mistreated it and is already internally destabilized. Immediately after the premature response comes: Remaining size to read: 0x0200 bytes Reading in 0x0200 bytes Result of read: 0x0200 <==USB IN 0000: 7c78 0100 4300 0000 02dc 0400 0030 4300 |x..C........0C. 0010: 0000 04dc 0800 569d 0500 0000 0000 4300 ......V.......C. 0020: 0000 44dc ffff 0c44 0065 0076 0049 0063 ..D....D.e.v.I.c 0030: 006f 006e 002e 0066 0069 006c 0000 0043 .o.n...f.i.l...C 0040: 0000 000b dc06 0000 0000 0043 0000 0007 ...........C.... This is our real data. This means we have actually 0x0001787c objects which is more reasonable but still a lot, circa 100000 files or so. Do you really have so many files on it? Perhaps this device needs a disk cleanup to be returned to a proper state? That may be the reason why the firmware is misbehaving. If you want to trick it into working (which I still doubt will work) you could try caching that response (first 12 bytes) and feed them at the end tho I have no idea of how to hack that. Linus |