Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Sony Reader > Sony Reader Dev Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 01-17-2007, 02:41 PM   #91
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,866
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
@chrissam: Hmm, I must confess I am at a loss, and since I dont have OSX, it is difficult for me to debug. But if you're willing, I have a few ideas. Checkout the svn version and in the file libprs500/gui/main.py line 523 change end_session=False to end_session=True

Instructions on checking out the svn version are at
https://libprs500.kovidgoyal.net/wiki/Development
kovidgoyal is offline   Reply With Quote
Old 01-18-2007, 09:29 AM   #92
chrissam42
Member
chrissam42 began at the beginning.
 
chrissam42's Avatar
 
Posts: 11
Karma: 10
Join Date: Jan 2007
Location: Japan
Device: Sony Reader PRS-500, Sharp/Vodafone/Softbank 904SH
Quote:
Originally Posted by kovidgoyal
libprs500/gui/main.py line 523 change end_session=False to end_session=True
Sadly, no change. The more detailed development error messages listed line 538 (instead of 523). I tried changing that line too to no effect.

Code:
  MacBook:~/dev/libprs500/trunk clewis$ prs500-gui
  release_interface() takes exactly 2 arguments (1 given)
  Traceback (most recent call last):
    File "/Users/clewis/dev/libprs500/trunk/src/libprs500/gui/main.py", line 538, in establish_connection
  	self.update_availabe_space(end_session=True)
    File "/Users/clewis/dev/libprs500/trunk/src/libprs500/gui/main.py", line 552, in update_availabe_space
  	space = self.dev.free_space(end_session=end_session)  
    File "/Users/clewis/dev/libprs500/trunk/src/libprs500/communicate.py", line 168, in run_session
  	res = func(*args, **kwargs)
    File "/Users/clewis/dev/libprs500/trunk/src/libprs500/communicate.py", line 575, in free_space
  	command_number=FreeSpaceQuery.NUMBER)[0]
    File "/Users/clewis/dev/libprs500/trunk/src/libprs500/communicate.py", line 373, in _bulk_read
  	packet = bulk_read_packet(data_type=data_type, size=packet_size)
    File "/Users/clewis/dev/libprs500/trunk/src/libprs500/communicate.py", line 363, in bulk_read_packet
  	data = data_type(self.handle.bulk_read(self.BULK_IN_EP, size))
    File "/Users/clewis/dev/libprs500/trunk/src/libprs500/libusb.py", line 255, in bulk_read
  	'bulk bus. Read: ' + str(rsize) + ' bytes.')
  libprs500.libusb.Error: Could not read 24 bytes on the bulk bus. Read: 0 bytes.
chrissam42 is offline   Reply With Quote
Advert
Old 01-18-2007, 01:11 PM   #93
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,866
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
OK next try: Change line 363 in communicate.py to
Code:
data = data_type(self.handle.bulk_read(self.BULK_IN_EP, size, timeout=10000))
kovidgoyal is offline   Reply With Quote
Old 01-18-2007, 02:05 PM   #94
scotty1024
Banned
scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.
 
Posts: 1,300
Karma: 1479
Join Date: Jul 2006
Location: Peoples Republic of Washington
Device: Reader / iPhone / Librie / Kindle
ibprs500 0.3.5 is working for me on Mac OS X 10.4.8 on a Macbook Pro Core 2 Duo 15".

Code:
Macbook-Pro:~/Sources/sony/libprs500/trunk scotty$ prs500 infoDevice name:      Sony Reader
Device version:   PRS-500/U
Software version: 1.0.00.21081
Mime type:        application/x-bbeb-book
Macbook-Pro:~/Sources/sony/libprs500/trunk scotty$ prs500 ls /
Data  etc   mnt   opt1  sbin  var 
bin   home  opt   proc  tmp  
dev   lib   opt0  root  usr
scotty1024 is offline   Reply With Quote
Old 01-18-2007, 04:22 PM   #95
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,866
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
@scotty1024: That's good to hear. Does the GUI also work?
kovidgoyal is offline   Reply With Quote
Advert
Old 01-18-2007, 10:10 PM   #96
scotty1024
Banned
scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.
 
Posts: 1,300
Karma: 1479
Join Date: Jul 2006
Location: Peoples Republic of Washington
Device: Reader / iPhone / Librie / Kindle
Quote:
Originally Posted by kovidgoyal
@scotty1024: That's good to hear. Does the GUI also work?
GUI? You know I'm a command line guy!

I'll let you know.
scotty1024 is offline   Reply With Quote
Old 01-19-2007, 12:58 AM   #97
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,866
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I sympathize...but there are a few, a very few tasks that the GUI is suited for...picking items from lists is one of them.
kovidgoyal is offline   Reply With Quote
Old 01-19-2007, 05:31 AM   #98
Alexander Turcic
Fully Converged
Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.
 
Alexander Turcic's Avatar
 
Posts: 18,163
Karma: 14021202
Join Date: Oct 2002
Location: Switzerland
Device: Too many to count here.
On Ubuntu edgy (with both Python 2.4 and 2.5 installed), I cannot get it to work because of dependency problems.

Code:
root@ubuntu:/disk2/sonyreader/libprs500/trunk # python2.5 setup.py develop 
running develop
running egg_info
writing src/libprs500.egg-info/PKG-INFO
writing top-level names to src/libprs500.egg-info/top_level.txt
writing dependency_links to src/libprs500.egg-info/dependency_links.txt
writing entry points to src/libprs500.egg-info/entry_points.txt
writing manifest file 'src/libprs500.egg-info/SOURCES.txt'
running build_ext
Creating /usr/lib/python2.5/site-packages/libprs500.egg-link (link to src)
libprs500 0.3.5 is already the active version in easy-install.pth
Installing makelrf script to /usr/bin
Installing lrf-meta script to /usr/bin
Installing prs500 script to /usr/bin
Installing prs500-gui script to /usr/bin

Installed /mnt/hdb1/sonyreader/libprs500/trunk/src
Processing dependencies for libprs500==0.3.5
You do not have PyQt4 installed. The GUI will not work. You can obtain PyQt4 from http://www.riverbankcomputing.co.uk/pyqt/download.php
I have PyQT4 installed, but only the package that is provided by Ubuntu (python2.4-qt4). There is no python2.5-qt4, and if I was going to install PyQt4 for Python 2.5 through sources, I'd most certainly break a couple of dependency issues.

Any hints?
Alexander Turcic is offline   Reply With Quote
Old 01-19-2007, 05:43 AM   #99
Alexander Turcic
Fully Converged
Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.
 
Alexander Turcic's Avatar
 
Posts: 18,163
Karma: 14021202
Join Date: Oct 2002
Location: Switzerland
Device: Too many to count here.
Quote:
Originally Posted by Xenophon
I installed starting from the front of your list of basic requirements. Python 2.5 (no problem). Libusb from the Mac installer, no problem. easy_install, no problem.

Now, when I get to PyUSB, I get

Code:
sudo easy_install -U -f http://easynews.dl.sourceforge.net/sourceforge/pyusb/pyusb-0.3.5.tar.gz pyusb
Searching for pyusb
Reading http://cheeseshop.python.org/pypi/pyusb/
Couldn't retrieve index page for 'pyusb'
Scanning index of all packages (this may take a while)
Reading http://cheeseshop.python.org/pypi/
Best match: pyusb 0.3.5
Downloading http://easynews.dl.sourceforge.net/sourceforge/pyusb/pyusb-0.3.5.tar.gz
Processing pyusb-0.3.5.tar.gz
Running pyusb-0.3.5/setup.py -q bdist_egg --dist-dir /tmp/easy_install-Tksg4F/pyusb-0.3.5/egg-dist-tmp-XQoN2_
In file included from pyusb.c:16:
pyusb.h:6:17: error: usb.h: No such file or directory
In file included from pyusb.c:16:
pyusb.h:120: error: parse error before 'usb_dev_handle'
pyusb.h:120: warning: no semicolon at end of struct or union
pyusb.h:122: error: parse error before '}' token
pyusb.h:122: warning: data definition has no type or storage class
pyusb.h:131: warning: 'struct usb_endpoint_descriptor' declared inside parameter list
pyusb.h:131: warning: its scope is only this definition or declaration, which is probably not what you want
pyusb.h:135: warning: 'struct usb_endpoint_descriptor' declared inside parameter list
pyusb.h:140: warning: 'struct usb_interface_descriptor' declared inside parameter list
and lots more errors after that.

Now what?
I have the same problem when trying to install PyUSB from source (python setup.py install) on Ubuntu edge. Xenophon, you said you edited the setup script to make it work?
Alexander Turcic is offline   Reply With Quote
Old 01-19-2007, 09:56 AM   #100
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,481
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 Alexander Turcic
I have the same problem when trying to install PyUSB from source (python setup.py install) on Ubuntu edge. Xenophon, you said you edited the setup script to make it work?
Yes, but my fix may not be relevant to you. The error happens because usb.h is not being found on your include path (or perhaps it is, but not the right usb.h. On Mac OS X you might have installed libusb in either of two ways; setup.py as written supported only one of them.

More specifically... The easy way to install libusb is via the 'fink' utility (an opensource package manager for OS X). fink installs all its packages in the /sw/... tree, and that's where the current setup.py expects to find usb.h. Sadly, the version of libusb that is needed for prs500 has not yet been ported to OS X by the fink folks. So I fell back to the slightly more complicated installation method, to wit: download and install libusb from the original developers web site (out on SourceForge). That installation drops the package into the /usr/local/... tree. The only change I made to setup.py was to add /usr/local/include and /usr/local/lib in the obvious places (alongside the pre-existing /sw/include and /sw/lib that were already there).

My fix is potentially relevant to other OS X users. I will matter for you (on Ubuntu) only if you have an existing libusb install that is both (a) the version needed for prs500 and (b) installed somewhere other than the place that setup.py expects.

Xenophon
Xenophon is offline   Reply With Quote
Old 01-19-2007, 10:50 AM   #101
Alexander Turcic
Fully Converged
Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.
 
Alexander Turcic's Avatar
 
Posts: 18,163
Karma: 14021202
Join Date: Oct 2002
Location: Switzerland
Device: Too many to count here.
My fault, I had to install libusb-dev before running the pyusb setup!

Code:
root@ubuntu:/disk2/sonyreader/libprs500/trunk # prs500 info
Device name:      Sony Reader
Device version:   PRS-500/U
Software version: 1.0.00.21081
Mime type:        application/x-bbeb-book
I am still not able to compile the GUI, but this is already very cool
Alexander Turcic is offline   Reply With Quote
Old 01-19-2007, 11:22 AM   #102
scotty1024
Banned
scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.
 
Posts: 1,300
Karma: 1479
Join Date: Jul 2006
Location: Peoples Republic of Washington
Device: Reader / iPhone / Librie / Kindle
Quote:
Originally Posted by Xenophon
Sadly, the version of libusb that is needed for prs500 has not yet been ported to OS X by the fink folks. So I fell back to the slightly more complicated installation method, to wit: download and install libusb from the original developers web site (out on SourceForge). That installation drops the package into the /usr/local/... tree. The only change I made to setup.py was to add /usr/local/include and /usr/local/lib in the obvious places (alongside the pre-existing /sw/include and /sw/lib that were already there).
Personally I just installed libusb from the libusb macosx link on the libprs500 wiki and it worked with no changes to setup.py.

Anyway, this is all about to become much easier very soon...
scotty1024 is offline   Reply With Quote
Old 01-19-2007, 11:56 AM   #103
NatCh
Gizmologist
NatCh ought to be getting tired of karma fortunes by now.NatCh ought to be getting tired of karma fortunes by now.NatCh ought to be getting tired of karma fortunes by now.NatCh ought to be getting tired of karma fortunes by now.NatCh ought to be getting tired of karma fortunes by now.NatCh ought to be getting tired of karma fortunes by now.NatCh ought to be getting tired of karma fortunes by now.NatCh ought to be getting tired of karma fortunes by now.NatCh ought to be getting tired of karma fortunes by now.NatCh ought to be getting tired of karma fortunes by now.NatCh ought to be getting tired of karma fortunes by now.
 
NatCh's Avatar
 
Posts: 11,615
Karma: 929550
Join Date: Jan 2006
Location: Republic of Texas Embassy at Jackson, TN
Device: Pocketbook Touch HD3
Quote:
Originally Posted by scotty1024
Anyway, this is all about to become much easier very soon...
Is that a hint, scotty1024? I'd really like for that to be a hint.
NatCh is offline   Reply With Quote
Old 01-19-2007, 12:38 PM   #104
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,866
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
@alexander turcic: I installed PyQt4 from sources for python2.5. Didn't break any dependencies for me. Since python2.5 and python 2.4 have separate site-packages directories, I don't see why it would break any dependencies, but maybe I'm missing something.

EDIT: Also you no longer need pyusb as I re-implemented it in pure python as a part of libprs500
kovidgoyal is offline   Reply With Quote
Old 01-19-2007, 12:59 PM   #105
Alexander Turcic
Fully Converged
Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.
 
Alexander Turcic's Avatar
 
Posts: 18,163
Karma: 14021202
Join Date: Oct 2002
Location: Switzerland
Device: Too many to count here.
@kovidgoyal: unfortunately Ubuntu edge misses a lot of packages for Python 2.5... for instance, when I tried to compile PyQt4 from source, as you suggested, it would complain about "ImportError: No module named sipconfig". Alas, there is also no precompiled package available for python-sip4 for Python 2.5 - only for 2.4.

Of course I could also compile this from source, but then, who knows, what other Python 2.5 modules might be missing. I'll try it this weekend. Or I will upgrade my Ubuntu machine to feisty which has all necessary Python 2.5 packages.
Alexander Turcic is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
KDK Reverse Engineering - For Those who Cannot wait... DairyKnight Kindle Developer's Corner 0 05-14-2010 12:29 AM
Reverse-engineering the .IMP format nrapallo IMP 23 02-12-2009 01:44 PM
Reverse engineering the Cybook hard-/software srml Gen3 Developer's Corner 8 07-07-2008 04:27 PM
PC sync protocol dumky Which one should I buy? 2 01-04-2008 01:33 PM
Introduction to Reverse Engineering Software Colin Dunstan Deals and Resources (No Self-Promotion or Affiliate Links) 0 05-25-2004 11:31 AM


All times are GMT -4. The time now is 12:55 PM.


MobileRead.com is a privately owned, operated and funded community.