View Single Post
Old 10-31-2006, 11:07 AM   #1
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
reverse engineering the Reader USB protocol

Hi all,

I've reverse engineered the Sony Reader USB protocol, so that I can use my Reader in Linux. I've attached a Python program that implements
the ls, cp, rm, mkdir, touch and df commands. These present a sufficient interface to use the Reader in Linux for non Connect store ebooks.

Requirements:
1) Python >= 2.5
2) libusb >= 0.1.12
2) PyUSB >= 0.3.5

To enable access for non-root users, add the following to /etc/udev/rules.d/90-prs500.rules

Code:
BUS=="usb", SYSFS{idProduct}=="029b", SYSFS{idVendor}=="054c", MODE="660", GROUP="plugdev"
and run
Code:
udevstart
or
Code:
/etc/init.d/udev restart
or whatever technique your distro uses to restart udev. If you dont know, just reboot. OSX users dont need to do this.

You may have to adjust the GROUP and the location of the rules file to suit your distribution.

Installation:
Untar, then as root run
Code:
python2.5 setup.py install
Usage:
The script
Code:
prs500.py
presents a command-line interface to the reader. Run it for usage instructions. Be careful while copying files to the reader or deleting files from the Reader, you could damage it.

If you're interested in the reader USB protocol it is documented via the api docs in the docs directory. Also giving the --log-packets option to prs500.py will produce a trace of all packets from/to the reader.

Enjoy :-),

Kovid.

EDIT: Edited from the original to give up-to-date information
Attached Files
File Type: tar libprs500-0.2.1.tar (3.58 MB, 1248 views)

Last edited by kovidgoyal; 11-14-2006 at 06:15 PM. Reason: Clarifying some instructions
kovidgoyal is offline   Reply With Quote