View Single Post
Old 01-24-2007, 11:42 PM   #116
Xenophon
curmudgeon
Xenophon ought to be getting tired of karma fortunes by now.Xenophon ought to be getting tired of karma fortunes by now.Xenophon ought to be getting tired of karma fortunes by now.Xenophon ought to be getting tired of karma fortunes by now.Xenophon ought to be getting tired of karma fortunes by now.Xenophon ought to be getting tired of karma fortunes by now.Xenophon ought to be getting tired of karma fortunes by now.Xenophon ought to be getting tired of karma fortunes by now.Xenophon ought to be getting tired of karma fortunes by now.Xenophon ought to be getting tired of karma fortunes by now.Xenophon ought to be getting tired of karma fortunes by now.
 
Xenophon's Avatar
 
Posts: 1,487
Karma: 5748190
Join Date: Jun 2006
Location: Redwood City, CA USA
Device: Kobo Aura HD, (ex)nook, (ex)PRS-700, (ex)PRS-500
Quote:
Originally Posted by kovidgoyal
I wish I had access to a machine running OSX. Does the following python script cause an error? Also I added some extra error reporting to the gui. So update and try again.

Code:
from libprs500.communicate import PRS500Device

dev = PRS500Device()
print dev.get_device_information(end_session=False)
print dev.free_space(end_session=False)
The test script works fine for me too. Running the GUI gets me the following (with packet logging on):
Code:
1 Command Type: GetUSBProtocolVersion
00000000: 0000 0000 0100 0000 0000 0000 0400 0000    ................
00000010: 0000 0000                                  ....
--
2 Response Type: Response
00000000: 0010 0000 0100 0000 0000 0000 0c00 0000    ................
00000010: 0000 0000 0000 0000 0000 0000 0000 0000    ................
--
3 Answer d->h Type: USBProtocolVersion
00000000: 0500 0100 0000 0000 0000 0000 0800 0000    ................
00000010: 3031 3030 3030 3030                        01000000
--
4 Command Type: AcknowledgeBulkRead
00000000: 0010 0000 0000 0000 0000 0000 1000 0000    ................
00000010: 0500 0100 0000 0000 0000 0000 0000 0000    ................
--
5 Response Type: Response
00000000: 0010 0000 0000 0000 0000 0000 0c00 0000    ................
00000010: 0000 0000 0000 0000 0000 0000 0000 0000    ................
--
6 Command Type: SetBulkSize
00000000: 0701 0000 0100 0000 0000 0000 0400 0000    ................
00000010: 0080 0200                                  ....
--
7 Response Type: Response
00000000: 0010 0000 0100 0000 0000 0000 0c00 0000    ................
00000010: 0701 0000 0000 0000 0000 0000 0000 0000    ................
--
8 Command Type: UnlockDevice
00000000: 0601 0000 0100 0000 0000 0000 0400 0000    ................
00000010: 2d31 0000                                  -1..
--
9 Response Type: Response
00000000: 0010 0000 0100 0000 0000 0000 0c00 0000    ................
00000010: 0601 0000 0000 0000 0000 0000 0000 0000    ................
--
10 Command Type: SetTime
00000000: 0401 0000 0100 0000 0000 0000 1c00 0000    ................
00000010: d4fe ffff d707 0000 0100 0000 1900 0000    ................
00000020: 0400 0000 2000 0000 2500 0000              .... ...%...
--
11 Response Type: Response
00000000: 0010 0000 0100 0000 0000 0000 0c00 0000    ................
00000010: 0401 0000 0000 0000 0000 0000 0000 0000    ................
--
12 Command Type: DeviceInfoQuery
00000000: 0101 0000 0100 0000 0000 0000 0000 0000    ................
--
13 Response Type: Response
00000000: 0010 0000 0100 0000 0000 0000 1000 0000    ................
00000010: 0101 0000 0000 0000 0400 0000 5801 0000    ............X...
--
14 Answer d->h Type: DeviceInfo
00000000: 0000 1000 0000 0000 0000 0000 5801 0000    ............X...
00000010: 536f 6e79 2052 6561 6465 7200 0000 0000    Sony Reader.....
00000020: 0000 0000 0000 0000 0000 0000 0000 0000    ................
00000030: 5052 532d 3530 302f 5500 0000 0000 0000    PRS-500/U.......
00000040: 0000 0000 0000 0000 0000 0000 0000 0000    ................
00000050: 312e 302e 3030 2e32 3130 3831 0000 0000    1.0.00.21081....
00000060: 0000 0000 0100 0000 6170 706c 6963 6174    ........applicat
00000070: 696f 6e2f 782d 6262 6562 2d62 6f6f 6b00    ion/x-bbeb-book.
00000080: 0000 0000 0000 0000 0000 0000 0000 0000    ................
00000090: 0000 0000 0000 0000 0000 0000 0000 0000    ................
000000a0: 0000 0000 0000 0000 0000 0000 0000 0000    ................
000000b0: 0000 0000 0000 0000 0000 0000 0000 0000    ................
000000c0: 0000 0000 0000 0000 0000 0000 0000 0000    ................
000000d0: 0000 0000 0000 0000 0000 0000 0000 0000    ................
000000e0: 0000 0000 0000 0000 0000 0000 0000 0000    ................
000000f0: 0000 0000 0000 0000 0000 0000 0000 0000    ................
00000100: 0000 0000 0000 0000 0000 0000 0000 0000    ................
00000110: 0000 0000 0000 0000 0000 0000 0000 0000    ................
00000120: 0000 0000 0000 0000 0000 0000 0000 0000    ................
00000130: 0000 0000 0000 0000 0000 0000 0000 0000    ................
00000140: 0000 0000 0000 0000 0000 0000 0000 0000    ................
00000150: 0000 0000 0000 0000 0000 0000 0000 0000    ................
00000160: 0000 0000 0000 0000                        ........
--
15 Command Type: AcknowledgeBulkRead
00000000: 0010 0000 0000 0000 0000 0000 1000 0000    ................
00000010: 0000 1000 0000 0000 0000 0000 0000 0000    ................
--
16 Response Type: Response
00000000: 0010 0000 0000 0000 0000 0000 1000 0000    ................
00000010: 0101 0000 0000 0000 0400 0000 5801 0000    ............X...
--
17 Command Type: FreeSpaceQuery
00000000: 0301 0000 0100 0000 0000 0000 0400 0000    ................
00000010: 0000 0000                                  ....
--
18 Response Type: Response
00000000: 0010 0000 0100 0000 0000 0000 0c00 0000    ................
00000010: 0301 0000 0000 0000 0000 0000 0000 0000    ................
--
release_interface() takes exactly 2 arguments (1 given)
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-pac
kages/libprs500-0.3.5-py2.5.egg/libprs500/gui/main.py", line 538, in establish_c
onnection
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-pac
kages/libprs500-0.3.5-py2.5.egg/libprs500/gui/main.py", line 552, in update_avai
labe_space
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-pac
kages/libprs500-0.3.5-py2.5.egg/libprs500/communicate.py", line 168, in run_sess
ion
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-pac
kages/libprs500-0.3.5-py2.5.egg/libprs500/communicate.py", line 575, in free_spa
ce
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-pac
kages/libprs500-0.3.5-py2.5.egg/libprs500/communicate.py", line 373, in _bulk_re
ad
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-pac
kages/libprs500-0.3.5-py2.5.egg/libprs500/communicate.py", line 363, in bulk_rea
d_packet
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-pac
kages/libprs500-0.3.5-py2.5.egg/libprs500/libusb.py", line 257, in bulk_read
libprs500.libusb.Error: Could not read 24 bytes on the bulk bus. Read: 0 bytes.
Seems like it's close to being there. I look forward to having things up and running!

Xenophon
Xenophon is offline   Reply With Quote