Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 12-12-2006, 03:36 AM   #61
igorsk
Wizard
igorsk reads XML... blindfoldedigorsk reads XML... blindfoldedigorsk reads XML... blindfoldedigorsk reads XML... blindfoldedigorsk reads XML... blindfoldedigorsk reads XML... blindfoldedigorsk reads XML... blindfoldedigorsk reads XML... blindfoldedigorsk reads XML... blindfoldedigorsk reads XML... blindfoldedigorsk reads XML... blindfolded
 
Posts: 3,442
Karma: 52235
Join Date: Sep 2006
Location: Belgium
Device: PRS-500/505/700, Kindle, Cybook Gen3, Words Gear
How do you get those packets? I see no signs of the command 401 in the binaries...
igorsk is offline   Reply With Quote
Old 12-12-2006, 09:54 AM   #62
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: 33,405
Karma: 10205094
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
oh 401 = 0x104 when decoded. hex(struct.unpack("<I", "\x04\x01\x00\x00")[0])
kovidgoyal is online now   Reply With Quote
Advert
Old 12-12-2006, 10:40 AM   #63
igorsk
Wizard
igorsk reads XML... blindfoldedigorsk reads XML... blindfoldedigorsk reads XML... blindfoldedigorsk reads XML... blindfoldedigorsk reads XML... blindfoldedigorsk reads XML... blindfoldedigorsk reads XML... blindfoldedigorsk reads XML... blindfoldedigorsk reads XML... blindfoldedigorsk reads XML... blindfoldedigorsk reads XML... blindfolded
 
Posts: 3,442
Karma: 52235
Join Date: Sep 2006
Location: Belgium
Device: PRS-500/505/700, Kindle, Cybook Gen3, Words Gear
Ah, this makes sense then. Let me investigate a bit...
igorsk is offline   Reply With Quote
Old 12-12-2006, 11:15 AM   #64
igorsk
Wizard
igorsk reads XML... blindfoldedigorsk reads XML... blindfoldedigorsk reads XML... blindfoldedigorsk reads XML... blindfoldedigorsk reads XML... blindfoldedigorsk reads XML... blindfoldedigorsk reads XML... blindfoldedigorsk reads XML... blindfoldedigorsk reads XML... blindfoldedigorsk reads XML... blindfoldedigorsk reads XML... blindfolded
 
Posts: 3,442
Karma: 52235
Join Date: Sep 2006
Location: Belgium
Device: PRS-500/505/700, Kindle, Cybook Gen3, Words Gear
Apparently it's the timezone. 0xfffffe20 = -480, so GMT-8?
igorsk is offline   Reply With Quote
Old 12-12-2006, 12:58 PM   #65
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: 33,405
Karma: 10205094
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Hmm that may be right, the times themselves are reported in GMT. I've been testing the timeset operation by creating a new file and looking at its timestamp. The timezone doesn't affect that as file times are reported as epochs. Also the time entries in the media.xml file are in GMT. Can you think of some way I can test what timezone the reader is set to?
kovidgoyal is online now   Reply With Quote
Advert
Old 12-13-2006, 10:37 PM   #66
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: 33,405
Karma: 10205094
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I just uploaded 0.3.0a1 to PyPI. It implements the settime command so that if you only use your reader in linux, its internal clock wont drift. Also fixed free space reporting so that it reports the correct amount of free space in main memory.

There's also a reasonably functional GUI with Drag'nDrop. Its not bug tested so if you play with it you need to backup media.xml and cache.xml to ensure you don't loose bookmarks/history.
Code:
prs500 cp prs500:/Data/database/cache/media.xml .
prs500 cp 'prs500:b:/Sony Reader/database/cache.xml' .
Installation instructions are at http://libprs500.kovidgoyal.net

If you've been using SVN you should
Code:
python setup.py develop --uninstall
svn update
python setup.py develop
kovidgoyal is online now   Reply With Quote
Old 01-03-2007, 03:31 PM   #67
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: 33,405
Karma: 10205094
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
call for testers

After nearly two months of development, libprs500 is nearly ready to hit 0.3.0 with its shiny new GUI. All that remains is bug testing.

Screenshots, installation and usage instructions can be found at https://libprs500.kovidgoyal.net

If you succeed in installing and running libprs500 on platforms other than Linux, please let me know, preferably with installation instructions that I can add to the wiki. I have already had reports of it working on Intel based OSX and WinXP.

Please test it and if you find bugs open a ticket at
https://libprs500.kovidgoyal.net/newticket

For those of you who have installed a previous version of libprs500 and used the GUI, you will have to delete the file ~/library.db as the database format has changed. This will remove all books from the library, so if you need to preserve the database, let me know and I'll send you a script to do the trick. Hopefully, there wont be anymore database changes from now on.
kovidgoyal is online now   Reply With Quote
Old 01-08-2007, 01:45 AM   #68
hn_88
Connoisseur
hn_88 doesn't litterhn_88 doesn't litter
 
Posts: 51
Karma: 158
Join Date: Jan 2007
Device: Sony Reader PRS-500
Congrats to kovidgoyal on a very polished solution (judging by the screenshots). But I had some trouble installing it on WinXP. Details are given at
http://hnsws.blogspot.com/2007/01/us...-software.html
But in short, the problem seems to be that the setuptools doesn't seem to recognize that libusb is installed, in spite of having copied usb.pyd into the site-packages directory. Can you help me out? Error message:
running prs500 info gave

Traceback (most recent call last):
File "L:\Python25\Scripts\prs500-script.py", line 5, in
from pkg_resources import load_entry_point
File "l:\python25\lib\site-packages\setuptools-0.6c3-py2.5.egg\pkg_resources.py", line 2479, in
File "l:\python25\lib\site-packages\setuptools-0.6c3-py2.5.egg\pkg_resources.py", line 585, in require
File "l:\python25\lib\site-packages\setuptools-0.6c3-py2.5.egg\pkg_resources.py", line 483, in resolve
pkg_resources.DistributionNotFound: pyusb>=0.3.5
hn_88 is offline   Reply With Quote
Old 01-08-2007, 02:45 PM   #69
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: 33,405
Karma: 10205094
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Thanks.

Hmm I haven't tried it on windows yet. I'll do that and get back to you in the next couple of days.
kovidgoyal is online now   Reply With Quote
Old 01-08-2007, 10:28 PM   #70
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: 33,405
Karma: 10205094
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
OK various cleanups...it now runs for me in windows. I've updated the instructions in the wiki. PyXML is no longer needed and I've provided a windows installer for pyusb. Please test and let me know.
kovidgoyal is online now   Reply With Quote
Old 01-10-2007, 12:10 PM   #71
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,473
Karma: 5665922
Join Date: Jun 2006
Location: Redwood City, CA USA
Device: Kobo Aura HD, (ex)nook, (ex)PRS-700, (ex)PRS-500
I know that some of you OS X users out there have successfully installed libprs500. I got started, but have bogged down trying to get the required libraries installed and built. Would one of you be kind enough to write a HowTo document that includes things like: Which source of libraries to use (e.g. fink, d/l and build from sourceforge, whatever)? What additional configuration steps did you need to get it all working? Any other tips and tricks?

I'd like to get this thing working (preferably WITH GUI), but I'm currently stuck.

Xenophon
(Too much thesis to write, not enough time to hack...)
Xenophon is offline   Reply With Quote
Old 01-10-2007, 08:14 PM   #72
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: 33,405
Karma: 10205094
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Are there any libraries in particular that are giving you trouble?
kovidgoyal is online now   Reply With Quote
Old 01-11-2007, 01:23 PM   #73
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,473
Karma: 5665922
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
Are there any libraries in particular that are giving you trouble?
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?
Xenophon is offline   Reply With Quote
Old 01-11-2007, 02:07 PM   #74
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: 33,405
Karma: 10205094
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The automatic build wont work on OSX. Download the tarball
http://easynews.dl.sourceforge.net/s...b-0.3.5.tar.gz

Extract the files. In the pyusb directory run the commands
python2.5 setup.py build
sudo python2.5 setup.py install

If that works could you use http://cheeseshop.python.org/pypi/bdist_mpkg/
to create an mpkg that I can add to the wiki for other OSX users?
kovidgoyal is online now   Reply With Quote
Old 01-12-2007, 12:22 AM   #75
hn_88
Connoisseur
hn_88 doesn't litterhn_88 doesn't litter
 
Posts: 51
Karma: 158
Join Date: Jan 2007
Device: Sony Reader PRS-500
Quote:
Originally Posted by kovidgoyal
OK various cleanups...it now runs for me in windows. I've updated the instructions in the wiki. PyXML is no longer needed and I've provided a windows installer for pyusb. Please test and let me know.
Tried it. Installed pyusb with the installer, added the windows paths, restarted and again ran
easy_install prs500

This time the install did not give any errors, but said some of the scripts were already installed, and went through with the install.

Now running
prs500 info
gave a missing DLL error formsvcr80.dll
I downloaded it from http://www.dll-files.com/dllindex/dl....shtml?msvcr80
and put it in Windows\system32 directory, restarted, ran
prs500 info
again
Now the error message is a dialog box saying:
The procedure entry point _encoded_null could not be located in the dynamic link library msvcr80.dll
And error mesg in the cmd window:
C:\Documents and Settings\sgh>prs500 info
Traceback (most recent call last):
File "L:\Python25\scripts\prs500-script.py", line 8, in <module>
load_entry_point('libprs500==0.3.0b3', 'console_scripts', 'prs500')()
File "l:\python25\lib\site-packages\setuptools-0.6c3-py2.5.egg\pkg_resources.py", line 236, in

load_entry_point
File "l:\python25\lib\site-packages\setuptools-0.6c3-py2.5.egg\pkg_resources.py", line 2097, in

load_entry_point
File "l:\python25\lib\site-packages\setuptools-0.6c3-py2.5.egg\pkg_resources.py", line 1830, in load
File "l:\python25\lib\site-packages\libprs500-0.3.0b3-py2.5.egg\libprs500\cli\
main.py", line 25, in <module>
File "l:\python25\lib\site-packages\libprs500-0.3.0b3-py2.5.egg\libprs500\communicate.py", line 49, in

<module>
ImportError: DLL load failed: The specified procedure could not be found.
hn_88 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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:42 AM.


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