twilly/odvr

Broken on VN-120PC

Closed this issue · 31 comments

All the usb commands seem to timeout apart from the first.

Details attached.

Tested on Linux mercury 2.6.18-5-686 #1 SMP Wed Oct 3 00:12:50 UTC 2007
i686 GNU/Linux

gcc -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu
--enable-libstdcxx-debug --enable-mpfr --with-tune=i686
--enable-checking=release i486-linux-gnu
Thread model: posix
gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)

Original issue reported on code.google.com by pinus.a...@gmail.com on 6 Dec 2007 at 4:44

Attachments:

Can you attach the original usb snoop save file? It'll be easier for me to work 
with.
The good news is that the VN-120PC does look very similar to the VN-960PC, 
protocol wise.

Original comment by tristan....@gmail.com on 10 Dec 2007 at 6:15

  • Changed state: Accepted
  • Added labels: Priority-High
  • Removed labels: Priority-Medium
Original snoop file attached.

Original comment by pinus.a...@gmail.com on 10 Dec 2007 at 12:37

Attachments:

I tweaked the code a bit, and it may work now. It should, at the very least, 
get the
model name correctly and repeatedly. Compile it and run without any arguments a 
few
times. If there are any errors, try "odvr -r" and then run without the -r a few 
times.

If you can get the model name, then try a file listing. It'll likely not work, 
and if
it doesn't that OK. In fact, if it does get a correct file listing, I'll be very
confused :).

Original comment by tristan....@gmail.com on 11 Dec 2007 at 12:13

Attachments:

I'm afraid the changes didn't make any difference.  I attach the slightly 
modified
code with a run output file (out.txt).

Original comment by pinus.a...@gmail.com on 11 Dec 2007 at 7:28

Attachments:

Uncommenting usb_set_altinterface() shouldn't have helped, and it still didn't 
fix
the problem (the device continues to get out of sync). Here's a slightly updated
tarball with a call to explicitly set the only configuration (USB layer is 
Device ->
Configuration -> Interface -> Alt-Interface). Perhaps it'll help.

Original comment by tristan....@gmail.com on 11 Dec 2007 at 9:27

Attachments:

Unfortunately the call to usb_set_configuration makes no difference to the 
result.

Original comment by pinus.a...@gmail.com on 11 Dec 2007 at 9:42

Can you supply a usbmon log of odvr running (try both r412 and your modified 
copy)? I
think there may be something happening on your machine that isn't happening on 
mine.

Here's a quick overview on how to get a usb dump in linux:

$ BUSNUMBER=`lsusb -d 07b4:020d | perl -ne 'print $1 if /^Bus\s+0*(\d+)/'`
$ mount -t debugfs none_debugs /sys/kernel/debug
$ modprobe usbmon
$ tee usbmon.log < /sys/kernel/debug/usbmon/${BUSNUMBER}u

Original comment by tristan....@gmail.com on 12 Dec 2007 at 9:57

My /sys/kernel/debug/usbmon directory contained files ending in s or t (not u).

I attach the usbmon.log for 1t corresponding to the following input:

mercury:/home/john/Desktop/src/r412# cd ../r411
mercury:/home/john/Desktop/src/r411# ./odvr -r
Resetting...
OM1
OM2
OM3
OM4
OM7
OM9
CC1
CC2
CC2
CC2
CC4
status code=0
OM10
Model: VN-120PC
mercury:/home/john/Desktop/src/r411# ./odvr -l
OM1
OM2
Couldn't query model name: timed out writing to EP2 (device out of sync?)
Model: (null)
Couldn't get file count on Folder A: timed out writing to EP2 (device out of 
sync?)
Couldn't get file count on Folder B: timed out writing to EP2 (device out of 
sync?)
Couldn't get file count on Folder C: timed out writing to EP2 (device out of 
sync?)
mercury:/home/john/Desktop/src/r411# cd ../r412
mercury:/home/john/Desktop/src/r412# ./odvr -r
Resetting...
Couldn't query model name: timed out writing to EP2 (device out of sync?)
mercury:/home/john/Desktop/src/r412# ./odvr -l
Couldn't query model name: timed out writing to EP2 (device out of sync?)
mercury:/home/john/Desktop/src/r412#

Original comment by pinus.a...@gmail.com on 12 Dec 2007 at 10:16

Attachments:

I took a look at the packet dump and haven't found anything obvious yet. I'll 
keep
this issue updated as I try to think through what could go wrong.

Original comment by tristan....@gmail.com on 14 Dec 2007 at 5:52

I missed some (obvious) stuff in your USB logs. Try this version out when you 
get the
time. MD5:

683d2443ec517f65ab78f71ba02b90ae  odvr-r432.tar.gz

Original comment by tristan....@gmail.com on 7 Jan 2008 at 10:20

Attachments:

No change with r432 I'm afraid.  Will look at it a little bit more later on.

Original comment by pinus.a...@gmail.com on 7 Jan 2008 at 11:27

Did it print a message saying this to the console:

QUIRK: VN-120PC detected. Set FALSE_LEADING_PACKET.

?

Original comment by tristan....@gmail.com on 7 Jan 2008 at 11:49

Afraid not, that message did not appear (with the proviso that I was in a bit 
of a
rush as I had to rebuild the development environment having got a new machine).

Original comment by pinus.a...@gmail.com on 8 Jan 2008 at 9:27

That would explain why my changes didn't help. I'll look a bit closer to see 
why it
didn't enable the quirk, but until then here's a version where the quirk is 
forced.

39aa988cfeee0e89acf03535d474b633  odvr-r432-force-quirk.tar.gz

Original comment by tristan....@gmail.com on 8 Jan 2008 at 9:58

Attachments:

Not sure if this helps but here is the output:

john@mercury:~/odvr/odvr-r432-force-quirk$ ./odvr
QUIRK: VN-120PC detected. Set FALSE_LEADING_PACKET.
Couldn't query model name: timed out writing to EP2 (device out of sync?)

john@mercury:~/odvr/odvr-r432-force-quirk$ ./odvr -l
QUIRK: VN-120PC detected. Set FALSE_LEADING_PACKET.
Couldn't query model name: timed out writing to EP2 (device out of sync?)

john@mercury:~/odvr/odvr-r432-force-quirk$ ./odvr -e
QUIRK: VN-120PC detected. Set FALSE_LEADING_PACKET.
Couldn't query model name: timed out writing to EP2 (device out of sync?)

john@mercury:~/odvr/odvr-r432-force-quirk$ ./odvr -r
QUIRK: VN-120PC detected. Set FALSE_LEADING_PACKET.
Resetting...
QUIRK: VN-120PC detected. Set FALSE_LEADING_PACKET.
Couldn't query model name: timed out writing to EP2 (device out of sync?)

Original comment by pinus.a...@gmail.com on 8 Jan 2008 at 11:24

Oh yeah, that's right. For some reason your device doesn't like the
usb_set_altinterface call. Try commenting that out, and if you need to, comment 
out
the usb_set_configuration call as well (lines 176 and 172 in olympusdvr.c).

Original comment by tristan....@gmail.com on 9 Jan 2008 at 12:27

No real change.  Runs with both variants of r432

####################### without altinterface

john@mercury:~/odvr/odvr-r432-force-quirk$ ./odvr
QUIRK: VN-120PC detected. Set FALSE_LEADING_PACKET.
Couldn't query model name: timed out writing to EP2 (device out of sync?)

john@mercury:~/odvr/odvr-r432-force-quirk$ ./odvr -r
QUIRK: VN-120PC detected. Set FALSE_LEADING_PACKET.
Resetting...
QUIRK: VN-120PC detected. Set FALSE_LEADING_PACKET.
Couldn't query model name: timed out writing to EP2 (device out of sync?)

john@mercury:~/odvr/odvr-r432-force-quirk$ ./odvr -l
QUIRK: VN-120PC detected. Set FALSE_LEADING_PACKET.
Couldn't query model name: timed out writing to EP2 (device out of sync?)

john@mercury:~/odvr/odvr-r432-force-quirk$ ./odvr -e
QUIRK: VN-120PC detected. Set FALSE_LEADING_PACKET.
Couldn't query model name: timed out writing to EP2 (device out of sync?)

####################### without altinterface and set_config

john@mercury:~/odvr/odvr-r432-force-quirk$ ./odvr
QUIRK: VN-120PC detected. Set FALSE_LEADING_PACKET.
Couldn't query model name: timed out writing to EP2 (device out of sync?)

john@mercury:~/odvr/odvr-r432-force-quirk$ ./odvr -r
QUIRK: VN-120PC detected. Set FALSE_LEADING_PACKET.
Resetting...
QUIRK: VN-120PC detected. Set FALSE_LEADING_PACKET.
Model: VN-120PC

john@mercury:~/odvr/odvr-r432-force-quirk$ ./odvr -e
QUIRK: VN-120PC detected. Set FALSE_LEADING_PACKET.
Couldn't query model name: timed out writing to EP2 (device out of sync?)

john@mercury:~/odvr/odvr-r432-force-quirk$ ./odvr -l
QUIRK: VN-120PC detected. Set FALSE_LEADING_PACKET.
Couldn't query model name: timed out writing to EP2 (device out of sync?)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

####################### without altinterface

john@mercury:~/odvr/odvr-r432$ ./odvr
Couldn't query model name: timed out writing to EP2 (device out of sync?)

john@mercury:~/odvr/odvr-r432$ ./odvr -r
Resetting...
Couldn't query model name: timed out writing to EP2 (device out of sync?)

john@mercury:~/odvr/odvr-r432$ ./odvr -l
Couldn't query model name: timed out writing to EP2 (device out of sync?)

john@mercury:~/odvr/odvr-r432$ ./odvr -e
Couldn't query model name: timed out writing to EP2 (device out of sync?)

####################### without altinterface and set_config

john@mercury:~/odvr/odvr-r432$ ./odvr
Couldn't query model name: timed out writing to EP2 (device out of sync?)

john@mercury:~/odvr/odvr-r432$ ./odvr -r
Resetting...
QUIRK: VN-120PC detected. Set FALSE_LEADING_PACKET.
Model: VN-120PC

john@mercury:~/odvr/odvr-r432$ ./odvr -l
Couldn't query model name: timed out writing to EP2 (device out of sync?)

john@mercury:~/odvr/odvr-r432$ ./odvr -e
Couldn't query model name: timed out writing to EP2 (device out of sync?)

Original comment by pinus.a...@gmail.com on 9 Jan 2008 at 9:17

It seems that since setting the config and altinterface is causing more 
problems than
solving, I've removed them from my tree. However, it seems that libusb or the 
Linux
kernel sneaks in a SET INTERFACE request (USB wire version of 
usb_set_altinterface)
when odvr exits. When testing this, please use "odvr -rl" as well as two 
separate
"odvr -r" and "odvr -l" calls.

0bedc50a6f9c442067f61f6414d6d13a  odvr-r436.tar.gz

Original comment by tristan....@gmail.com on 10 Jan 2008 at 1:21

Attachments:

#just plugged in
john@mercury:~/odvr/odvr-r436$ ./odvr
Model: VN-120PC

john@mercury:~/odvr/odvr-r436$ ./odvr
Couldn't query model name: timed out writing to EP2 (device out of sync?)

john@mercury:~/odvr/odvr-r436$ ./odvr -r
Resetting...
Model: VN-120PC

john@mercury:~/odvr/odvr-r436$ ./odvr -l
Couldn't query model name: timed out writing to EP2 (device out of sync?)

john@mercury:~/odvr/odvr-r436$ ./odvr -rl
Resetting...
Model: VN-120PC
Couldn't get file count on Folder A: timed out reading from EP1 (device out of 
s ync?)
Couldn't get file count on Folder B: timed out reading from EP1 (device out of 
s ync?)
Couldn't get file count on Folder C: timed out reading from EP1 (device out of 
s ync?)

Original comment by pinus.a...@gmail.com on 10 Jan 2008 at 9:49

That's interesting that it didn't print the quirk detection. Try this version, 
which
has tracing on. Run it as "odvr -rlD" (the -D option is the new tracing flag).

7036fc9d885b2ea32076470ee20a4443  odvr-r438.tar.gz

Original comment by tristan....@gmail.com on 10 Jan 2008 at 9:30

Attachments:

Hope you can make sense of this!

john@mercury:~/odvr/odvr-r438$ ./odvr -rlD
Trace: Bulk Write (64 bytes):
F000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
Trace: Bulk Write (64 bytes):
B200 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
Resetting...
Trace: Bulk Write (64 bytes):
F000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
Trace: Bulk Write (64 bytes):
B200 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
Trace: Bulk Read (64 bytes):
564E 2D31 3230 5043 B200 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
Trace: Interrupt Read (8 bytes):
0600 0000 0000 0000
Trace: Interrupt Read (8 bytes):
0600 0000 0000 0000
Trace: Interrupt Read (8 bytes):
0000 0000 0000 0000
Model: VN-120PC
Trace: Bulk Write (64 bytes):
F000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
Trace: Bulk Write (64 bytes):
4701 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
Trace: Bulk Read (64 bytes):
0100 0000 0000 0000 4701 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
Couldn't get file count on Folder A: timed out reading from EP1 (device out of 
sync?)
Trace: Bulk Write (64 bytes):
F000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
Trace: Bulk Write (64 bytes):
4702 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
Trace: Bulk Read (64 bytes):
0100 0000 0000 0000 4702 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
Couldn't get file count on Folder B: timed out reading from EP1 (device out of 
sync?)
Trace: Bulk Write (64 bytes):
F000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
Trace: Bulk Write (64 bytes):
4703 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
Trace: Bulk Read (64 bytes):
0100 0000 0000 0000 4703 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
Couldn't get file count on Folder C: timed out reading from EP1 (device out of 
sync?)
john@mercury:~/odvr/odvr-r438$

Original comment by pinus.a...@gmail.com on 10 Jan 2008 at 10:40

I must have miss-interpreted the USB logs you sent earlier. Here's a version 
with the
quirk temporarily removed.

1d5b90595cd5ac6f813bb3ac75d8352b  odvr-r440.tar.gz

Original comment by tristan....@gmail.com on 10 Jan 2008 at 10:56

Attachments:

I hope I haven't mislead you.

#just inserted
john@mercury:~/odvr/odvr-r440$ ./odvr
Model: VN-120PC

john@mercury:~/odvr/odvr-r440$ ./odvr
Couldn't query model name: timed out writing to EP2 (device out of sync?)

john@mercury:~/odvr/odvr-r440$ ./odvr -rlD
Trace: Bulk Write (64 bytes):
F000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
Trace: Bulk Write (64 bytes):
B200 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
Resetting...
Trace: Bulk Write (64 bytes):
F000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
Trace: Bulk Write (64 bytes):
B200 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
Trace: Bulk Read (64 bytes):
564E 2D31 3230 5043 B200 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
Trace: Interrupt Read (8 bytes):
0600 0000 0000 0000
Trace: Interrupt Read (8 bytes):
0600 0000 0000 0000
Trace: Interrupt Read (8 bytes):
0000 0000 0000 0000
Model: VN-120PC
Trace: Bulk Write (64 bytes):
F000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
Trace: Bulk Write (64 bytes):
4701 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
Trace: Bulk Read (64 bytes):
0100 0000 0000 0000 4701 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
Trace: Interrupt Read (8 bytes):
0600 0000 0000 0000
Trace: Interrupt Read (8 bytes):
0600 0000 0000 0000
Trace: Interrupt Read (8 bytes):
0000 0000 0000 0000
Couldn't get file count on Folder A: unknown DVR status code
Trace: Bulk Write (64 bytes):
F000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
Trace: Bulk Write (64 bytes):
4702 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
Trace: Bulk Read (64 bytes):
0100 0000 0000 0000 4702 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
Trace: Interrupt Read (8 bytes):
0600 0000 0000 0000
Trace: Interrupt Read (8 bytes):
0600 0000 0000 0000
Trace: Interrupt Read (8 bytes):
0000 0000 0000 0000
Couldn't get file count on Folder B: unknown DVR status code
Trace: Bulk Write (64 bytes):
F000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
Trace: Bulk Write (64 bytes):
4703 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
Trace: Bulk Read (64 bytes):
0100 0000 0000 0000 4703 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
Trace: Interrupt Read (8 bytes):
0600 0000 0000 0000
Trace: Interrupt Read (8 bytes):
0600 0000 0000 0000
Trace: Interrupt Read (8 bytes):
0000 0000 0000 0000
Couldn't get file count on Folder C: unknown DVR status code

Original comment by pinus.a...@gmail.com on 11 Jan 2008 at 9:08

Here's the latest snapshot which recognizes a new status code. Hopefully we're 
not
that far away from getting a file listing and audio!

1a26ce848118ed3f33e64e2c3b528815  odvr-r441.tar.gz

Original comment by tristan....@gmail.com on 11 Jan 2008 at 8:42

Attachments:

Looping.

john@mercury:~/odvr/odvr-r441$ ./odvr -rD
Trace: Bulk Write (64 bytes):
F000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
Trace: Bulk Write (64 bytes):
B200 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
Resetting...
Trace: Bulk Write (64 bytes):
F000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
Trace: Bulk Write (64 bytes):
B200 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
Trace: Bulk Read (64 bytes):
564E 2D31 3230 5043 B200 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
Trace: Interrupt Read (8 bytes):
0600 0000 0000 0000
Trace: Interrupt Read (8 bytes):
0600 0000 0000 0000
Trace: Interrupt Read (8 bytes):
0000 0000 0000 0000
...
last 2 lines repeated ad infinitum

Original comment by pinus.a...@gmail.com on 11 Jan 2008 at 9:00

Ok. I guess that code means the DVR is waiting for input. Here's new code that 
should
stop the infinite loop.

b26366aa3458ab7bff2b7be643b4f812  odvr-r442.tar.gz

Original comment by tristan....@gmail.com on 11 Jan 2008 at 9:19

Attachments:

Significant progress!  Well done.

I attach r442.txt run with odvr -rlD.

Also:

john@mercury:~/odvr/odvr-r442$ ./odvr -e
Couldn't query model name: timed out writing to EP2 (device out of sync?)

john@mercury:~/odvr/odvr-r442$ ./odvr -re
Resetting...
Model: VN-120PC
Downloading "DA_0046.wav"...
Downloading "DB_0044.wav"...
Downloading "DC_0045.wav"...

john@mercury:~/odvr/odvr-r442$ ls -l *wav
-rw-r--r-- 1 john john   151132 2008-01-11 21:52 DA_0046.wav
-rw-r--r-- 1 john john 25312680 2008-01-11 21:54 DB_0044.wav
-rw-r--r-- 1 john john   148434 2008-01-11 21:54 DC_0045.wav

john@mercury:~/odvr/odvr-r442$ ls ../../*.wav -l
-rwx------ 1 john john 8989312 2007-12-25 11:48 ../../DW_B0044.wav

The WAV files play properly.  DB_0044.wav should be the same as previously
transferred with Windows as DW_B0044.wav.  Windows version is about a third of 
the size.

Original comment by pinus.a...@gmail.com on 11 Jan 2008 at 10:07

Attachments:

That's good news! I'll try to track down why a reset is needed on every run. 
Until
then, always include "-r" with other odvr options.

Also, the Windows WAV files should be smaller. The official software takes the 
DVR
format, converts and resamples to PCM, then converts to ADPCM. This is silly, 
so I
convert only once to 16 bit PCM. It's up to you to compress odvr's PCM WAV 
files to
something smaller, like Ogg Vorbis.

Original comment by tristan....@gmail.com on 11 Jan 2008 at 10:23

It looks like the Linux kernel is sending a SET_INTERFACE packet without 
libusb's
influence. I've developed a work-around where your model is reset when odvr 
exists.
Give this version a good workout, and it should work without the "-r" option. 
It will
require a few seconds of sleep time between runs since the VN-120PC will be
reconnecting. If everything looks alright, I'll make a new front-page release.

db95aa60638c3292ff40837d20e322b9  odvr-r445.tar.gz

Original comment by tristan....@gmail.com on 11 Jan 2008 at 11:50

Attachments:

Thanks for the information about the sound file sizes.

I have exercised version 445 and it appears to be working correctly.

If you issue a command very shortly after another has completed you may get a 
"Failed
to open Olympus device: couldn't locate device (unknown product ID?)" error.  
This
only happened once when I wasn't trying to induce the error.

The -d <a|b|c> and -e commands work properly with/without empty folders and
with/without the file already downloaded.

The -l command works with/without empty folders.

The -v command reports odvr version 0.1.1

I had no need to use the -r command (but it does work properly).

Excellent work!  Ready for release I reckon.

Original comment by pinus.a...@gmail.com on 12 Jan 2008 at 12:43

Original comment by tristan....@gmail.com on 14 Jan 2008 at 2:01

  • Changed state: Fixed