FreeBSD: Calibre Patch for Sony Ebook Reader PRS-T3


Probably this patch works for others ebook readers, but only has been tested with Sony PRS-T3.

There is a thread about a hacking Calibre for a Kobo Aura HD in:

http://www.mobileread.com/forums/archive/index.php/t-244555.html

but this method didn’t work with my device.

My solution is to modify this file:

/usr/local/lib/calibre/calibre/devices/usbms/device.py

with the following patch:

http://pastebin.com/embed_iframe.php?i=uv2JNP1P

Unfortunately, Calibre in FreeBSD rarely is able to unmount the device (mine is mounted as /media/Calibre-READER). This produce a failure mounting the PRS-T3 next time it’s attached. My ugly solution is to add a rule to devd.conf to umount the device and delete the mount point directory in order to prepare a clean mounting next time the device is attached.

So, add the following rule to /etc/devd.conf:

notify 100 {
        match “system”          “USB”;
        match “subsystem”       “DEVICE”;
        match “type”            “DETACH”;
        match “vendor”          “0x054c”;
        match “product”         “0x05c2”;
        #match “release”         “0x0100”;
        action  “logger Unmount vendor:$vendor product:$product ; /sbin/umount -f /media/Calibre* ; rm -fR /media/Calibre*”;
};

Obviosly, replace vendor and product if needed.

Then restart devd and test it.

/etc/devd restart

If someone finds out a more elegant way to mount/umount a Sony PRS-T1/2/3 in Calibre, please, let me know.

About jjjesss

I'm a guy interested in technology, bsd fan and concerned about the world around.
This entry was posted in BSD, FreeBSD. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s