[Solved] How do I enable sync mode for an e-reader?

You have a problem with Salix? Post here and we'll do what we can to help.
Post Reply
User avatar
f.bluedevil
Posts: 91
Joined: 9. Jan 2011, 23:06

[Solved] How do I enable sync mode for an e-reader?

Post by f.bluedevil »

I have been running into problems when downloading books to a Kobo Touch ereader while using calibre. I posted on a calibre forum and was advised that I needed to make sure my device was in sync mode when mounted.

When I enter the mount command I get the following output:
/dev/sdb on /media/KOBOeReader type vfat (rw,nosuid,nodev,uhelper=hal,uid=1000,shortname=winnt
Which I believe would indicate the device is not in synch mode. Is anybody aware of how to enable sync mode?

Thanks in advance.

Code: Select all

[[code]
[/code]
Last edited by f.bluedevil on 19. Jul 2011, 11:20, edited 1 time in total.
User avatar
gapan
Salix Wizard
Posts: 6368
Joined: 6. Jun 2009, 17:40

Re: How do I enable sync mode for an e-reader?

Post by gapan »

If you want a permanent solution you could create a udev rule to add the sync option. Or else, just mount/remount from a terminal using that option.
Image
Image
User avatar
f.bluedevil
Posts: 91
Joined: 9. Jan 2011, 23:06

Re: How do I enable sync mode for an e-reader?

Post by f.bluedevil »

If you want a permanent solution you could create a udev rule to add the sync option
A permanent solution sounds like what I need and while I'm not sure how to create a udev rule, I'm sure I will be able to figure it out. As always, I appreciate your help!
User avatar
gapan
Salix Wizard
Posts: 6368
Joined: 6. Jun 2009, 17:40

Re: [Solved] How do I enable sync mode for an e-reader?

Post by gapan »

You could create a custom udev rule like this (I did it with one of my usb sticks):

Code: Select all

KERNEL=="sd[a-z]1", SUBSYSTEM=="block", ATTRS{model}=="Drive SM_USB20", ACTION=="add", 
RUN+="/bin/su george -c '/usr/bin/pmount --sync %N /media/MYDRIVE'"
made an /etc/udev/rules.d/10-mydrive.rules file with those contents. You will need to change some of the fields in there. You can find the relevant information if you run:

Code: Select all

udevadm info -a -p `udevadm info -q path -n /dev/sdb1`
assuming /dev/sdb1 is your e-reader. KERNEL should probably remain the same, unless your e-reader has more partitions. Find the SUBSYSTEM entry that corresponds to sdb1 and change it. Same for ATTRS{model} (you can go down the list if there is none specified for sdb1). You can add more entries to make sure the device is identified properly, just pick from the list.

Of course you will need to change the username in the RUN command to your own and MYDRIVE to whatever you want. You'll also need to install pmount. One downside is that this will work for one user only, the one you specify. Another one is that you can only unmount using pumount. But you can put that in a panel button or something I guess.

Now that I think about it, if you want to make it work for multiple users, you could instead just create a dev symlink for it with something like:

Code: Select all

KERNEL=="sd[a-z]1", SUBSYSTEM=="block", ATTRS{model}=="Drive SM_USB20", ACTION=="add", 
SYMLINK+="MYDRIVE"
so that your device is always available under /dev/MYDRIVE no matter what other devices you have plugged in. Now any user could just mount with pmount --sync /dev/MYDRIVE and unmount with pumount /dev/MYDRIVE. Or even mount using gnome-mount, with gnome-mount -o sync -d /dev/MYDRIVE. In that case you will be able to unmount it normally like any other device.
Image
Image
User avatar
JRD
Salix Warrior
Posts: 950
Joined: 7. Jun 2009, 22:52
Location: Lyon, France

Re: [Solved] How do I enable sync mode for an e-reader?

Post by JRD »

I don't have the same problem...but I learned a lot by reading this post about udev rules !!
And so, with your solution, I can then be sure to have a special USB key have a special device, so I can reference it in VirtualBox for raw access.
Thanks gapan.
Image
Post Reply