Originally Posted by avg_user
Can you tell me if it's possible - let's say that I got a mobile Internet on my Pocketbook 902, I could run a ssh server on it and I could write a script that could connect to this server every 5 minutes and make it run on my router with OpenWRT installed and copy all the notes I have made to the USB disk connected to the router? I'm still looking for a way to synchronize my notes on the fly, and the suggestion to try sshd comes from rkomar in this thread http://www.mobileread.com/forums/sho....php?p=2095215
I think this would be easy to do if OpenWRT has a cron daemon running on it (for scheduling the job every five minutes), and a smarter ftp program like lftp
for mirroring directories. You could then write a shell script on the router to check to see if the USB disk is there, make sure the output directory exists, and then mirror the reader's notes to the output directory. Once you've run the script by hand and seen that it works, you could add it to the system's crontab file to run every five minutes between certain hours of the day.
could work in place of the more complicated lftp mirroring program, but I'm not sure if it wouldn't just quit with an error if it tried to copy over an existing file that it got previously.
The problem I see with this is that the reader must have WiFi on at all times while you want synchronization. This will be a serious drain on the battery. Ideally, having a program on the reader that detects when notes have been added or modified and pushes the changes through a brief WiFi session would be best. But it would be a lot more work to get such a system working (on both the reader and the mirroring machine).
Edit: I'm adding a simple script file for using lftp
to sync to a directory tree on the reader. You'd have to edit the values of the first four variables to point to the right places for you.
# Edit these to point to the right places.
CMDS="set net:max-retries 1; set net:timeout 3; open -u reader:$PASSWORD -p 1124 sftp://$READERIP; mirror $NOTESDIR $COPYDIR/"
if [ -d "$COPYDIR" ]; then
lftp -c "$CMDS"
echo "$COPYDIR does not exist"