I bought one of these rather neat gadgets for my mum as she is a big reader of the classics.
I soon got tired of booting into Windows to copy books to it, so I decided to see if I could get it to work with FreeBSD. I download books from Feedbooks, Project Gutenberg and Mobileread.
These are the instructions for using it under FreeBSD.
First, turn on the Reader & plugin the Reader to your FreeBSD machine via the USB cable.
No sign of life from the reader? i.e: nothing in /var/log/messages although the red light by the power switch of the Reader is on?
Don't panic. This is normal if your Reader's battery is on the flat side.
After about half an hour after plugging in, (give or take: dependent on how flat your battery is) the machine will spring to life and you will see something similar to this in /var/log/messages:
As you can see, there are 3 devices listed: da0 is the internal memory of the reader, da1 is the Sony memory card (if you've got one) and da2 is the SD memory card (if you've got one).
I will show you how to access the internal memory of the reader but the same procedure should apply to the memory cards also.
First, you need to use camcontrol(8):
# camcontrol load 0:0:0If you turned on the Reader after plugging in, then this might not work and you have to revert to this procedure:
# camcontrol stop 0:0:0
# camcontrol rescan 0:0:0
# camcontrol load 0:0:0If that goes well, then you just mount the device:
# mount -t msdosfs /dev/da0 /mnt/dosYou should then be able to copy files to it 'til your hearts content.
To unplug the Reader, you first have to go through the reverse procedure:
# umount /mnt/dos
# camcontrol eject 0:0:0Then you can unplug it.
I've written a script to simplify the process:
#!/bin/sh
#
# mount/umount Sony Reader's internal memory
if [ -c /dev/da0 ] && [ "$1" = "-m" ];then
camcontrol stop 0:0:0
camcontrol rescan 0:0:0
camcontrol load 0:0:0
sleep 1
if [ -d /mnt/dos ];then
mount -t msdosfs /dev/da0 /mnt/dos
echo "Mounted Reader on /mnt/dos"
echo "Books can be found under:"
echo "/mnt/dos/database/media/books/"
else
echo "Can't mount device. /mnt/dos does not exist!"
fi
elif [ -c /dev/da0 ] && [ "$1" = "-u" ];then
umount /mnt/dos
camcontrol eject 0:0:0
echo "Reader can now be unplugged."
elif [ -c /dev/da0 ] && [ "$1" = "-e" ];then # Just charging
camcontrol eject 0:0:0
echo "Reader can now be unplugged."
elif [ "$1" = "" ] || [ "$1" = "-h" ];then
echo "Usage:"
echo " -m : mount Reader"
echo " -u : umount Reader"
echo " -e : eject Reader"
echo " -h : this help"
else
echo "Reader not plugged in?"
fi
Only tested on FreeBSD 7.1-PRERELEASE. Script could do with some improvement.
|
Last updated:
|
|
|