View Single Post
Old 08-24-2025, 02:54 PM   #1
dnastase
Addict
dnastase has a complete set of Star Wars action figures.dnastase has a complete set of Star Wars action figures.dnastase has a complete set of Star Wars action figures.dnastase has a complete set of Star Wars action figures.dnastase has a complete set of Star Wars action figures.
 
Posts: 257
Karma: 432
Join Date: May 2014
Location: New York, NY
Device: NG,NSTG,NST,AuraHD,OnyxT68,Lynx, BoyueT62,NGP,Aura1,Oasis,Mars
Question [Solved] Psion 5 device as "Connect to folder"

[SOLVED]

I am using a Psion 5mx as my reading device, and I usually just copy PDB files by hand but I had decided to make it nicer and I'm trying to set it up such I can see it directly from Calibre.

Let me explain the whole setup:
- I have the Psion connecting to my Linux via ppd
- I am running an ftp server on the Psion
- I am mounting the ftp server to my Linux via curlftpfs
- thus I have a directory in my home where I see the books folder from the Psion

Now in terminal I can in that directory anything that I would do in any other regular directory: ls, read, write, etc.

However when I try to use the "Connect as folder" from Calibre it throws some exceptions. Some I had figured out (things like fsync, os.utime hack don't work I guess bc indeed some things are not supported either by the Psion FTP server and/or curlftpfs).
However I got to a point where:

```
Traceback (most recent call last):
File "/media/dan/linux2Tb/Downloads/calibre-8.7/calibre-8.7.0/src/calibre/devices/usbms/driver.py", line 153, in get_device_information
self.driveinfo['main'] = self._update_driveinfo_file(self._main_prefix, 'main')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^
File "/media/dan/linux2Tb/Downloads/calibre-8.7/calibre-8.7.0/src/calibre/devices/usbms/driver.py", line 115, in _update_driveinfo_file
with open(os.path.join(prefix, self.DRIVEINFO), 'rb') as f:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: '/home/dan/p5/.driveinfo.calibre'
```

and I'm stumped bc I can read/write that directory both from terminal and from a interactive python exactly like the above.

Does anybody have any ideas what might be going on ?

Thank you

UPDATE:

Actually everything works perfectly on Calibre's side.
What I have done is use this curlftpfs fork that has some fixes: https://github.com/JackSlateur/curlftpfs

That fixed everything.
Now Calibre sees and uses my Psion's mounted directory properly.

Kovid, thank you for this awesome app !

Last edited by dnastase; 08-24-2025 at 05:26 PM.
dnastase is offline   Reply With Quote