|
|
Thread Tools | Search this Thread |
08-25-2017, 02:20 PM | #16 | |
Junior Member
Posts: 2
Karma: 10
Join Date: Aug 2017
Device: Sony PRS-600
|
Sony PRS505 class driver has a bug
Quote:
When I am inserting a SD-Card, Calibre accepts it as "Main" memory and the device works fine. I would be happy to help debugging this, as I would love to run my Sony reader without SD-card. It looks as calibre skips my internel memory partition (/dev/sde) and only checks the read-only LAUNCH/SETTINGS (/dev/sdh) and SD-card (/dev/sdg) partitions. Somehow it looks as it only starts looking from /dev/sdf on (which is the reader's MemoryStick driver, which has no media in it on my device.) How can I help, what other information do you need? (I am on Linux Kernel 4.12 by the way) Here is a debug-log: Code:
calibre Debug log calibre 3.7 embedded-python: True is64bit: True Linux-4.12.8-2-MANJARO-x86_64-with-glibc2.2.5 Linux ('64bit', 'ELF') ('Linux', '4.12.8-2-MANJARO', '#1 SMP PREEMPT Sun Aug 20 08:24:42 UTC 2017') Python 2.7.12 Linux: ('', '', '') Interface language: None calibre 3.7 embedded-python: True is64bit: True Linux-4.12.8-2-MANJARO-x86_64-with-glibc2.2.5 Linux ('64bit', 'ELF') ('Linux', '4.12.8-2-MANJARO', '#1 SMP PREEMPT Sun Aug 20 08:24:42 UTC 2017') Python 2.7.12 Linux: ('', '', '') Interface language: None Turning on automatic hidpi scaling QGtkStyle could not resolve GTK. Make sure you have installed the proper libraries. devicePixelRatio: 1.0 logicalDpi: 95.8921348315 x 95.9352517986 physicalDpi: 90.0253164557 x 90.1013513514 Using calibre Qt style: True QGtkStyle could not resolve GTK. Make sure you have installed the proper libraries. Starting up... Failed to read metadata from font file: /usr/share/fonts/TTF/TSCu_Times.ttf tuple index out of range Failed to read metadata from font file: /usr/share/fonts/TTF/TSCu_Comic.ttf tuple index out of range Ignoring the node: sdf as could not read size from: /sys/devices/pci0000:00/0000:00:01.3/0000:03:00.0/usb1/1-9/1-9:1.0/host12/target12:0:0/12:0:0:1/block/sdf/size Found device nodes: /dev/sdg1 /dev/sdh None The mountpoint /run/media/user/LAUNCHER/ is readonly, ignoring it Job: 1 Get device information started DeviceJob: 1 Get device information done, calling callback DeviceJob: 1 Get device information callback returned Job: 2 Set library information started DeviceJob: 2 Set library information done, calling callback DeviceJob: 2 Set library information callback returned Job: 3 Get list of books on device started DEBUG: 0.0 PRS505: starting fetching books for card None DEBUG: 0.0 USBMS: Fetching list of books from device. Device= PRS505 oncard= None DEBUG: 0.0 USBMS: dirs are: /run/media/user/C5AC-1301/ database/media/books DEBUG: 0.0 USBMS: scan from root True /run/media/user/C5AC-1301/ DEBUG: 0.0 USBMS: count found in cache: 11, count of files in metadata: 11, need_sync: False DEBUG: 0.0 USBMS: Finished fetching list of books from device. oncard= None DEBUG: 0.0 Building XMLCache... {0: '/run/media/user/C5AC-1301/database/cache/media.xml'} DEBUG: 0.0 Done building XMLCache... DEBUG: 0.0 Updating JSON cache: 0 DEBUG: 0.0 Start build_id_playlist_map DEBUG: 0.0 after cleaning playlists DEBUG: 0.0 Finish build_id_playlist_map. Found 9 DEBUG: 0.0 Finished updating JSON cache: 0 DEBUG: 0.0 PRS505: finished fetching books for card None DEBUG: 0.0 PRS505: starting fetching books for card carda DEBUG: 0.0 USBMS: Fetching list of books from device. Device= PRS505 oncard= carda DEBUG: 0.0 Building XMLCache... {0: '/run/media/user/C5AC-1301/database/cache/media.xml'} DEBUG: 0.0 Done building XMLCache... DEBUG: 0.0 PRS505: finished fetching books for card carda DEBUG: 0.0 PRS505: starting fetching books for card cardb DEBUG: 0.0 USBMS: Fetching list of books from device. Device= PRS505 oncard= cardb DEBUG: 0.0 Building XMLCache... {0: '/run/media/user/C5AC-1301/database/cache/media.xml'} DEBUG: 0.0 Done building XMLCache... DEBUG: 0.0 PRS505: finished fetching books for card cardb DeviceJob: 3 Get list of books on device done, calling callback DeviceJob: metadata_downloaded: Starting set_books_in_library DeviceJob: set_books_in_library: books to process= 11 DeviceJob: set_books_in_library finished: time= 0.00396800041199 DeviceJob: metadata_downloaded: updating views DeviceJob: metadata_downloaded: syncing DeviceJob: metadata_downloaded: refreshing ondevice DeviceJob: metadata_downloaded: sending metadata_available signal DeviceJob: 3 Get list of books on device callback returned Job: 1 Get device information finished No details available. Job: 2 Set library information finished No details available. Job: 3 Get list of books on device finished No details available. Started up in 10.20 seconds with 292 books "Sony PRS-600" for my /dev/sde, which is the Main memory "Sony PRS-600 SD" for my /dev/sdg, which is the SD card. "Sony PRS-600 Launcher" for my /dev/sdh, which is the system partition (LAUNCHER/SETTINGS) =============================== There might also be a typo in the driver, but I am not sure: The device driver.py for the PRS505 class might have an error in line 39: Current line: Code:
WINDOWS_MAIN_MEM = re.compile( r'(PRS-(505|500|300))|' r'(PRS-((700[#/])|((6|9|3)(0|5)0&)))' ) Code:
WINDOWS_MAIN_MEM = re.compile( r'(PRS-(505|500|300))|' r'(PRS-((700[#/])|((6|9|3)(0|5)0)))' ) Anyway, I think calibre is not checking all devices. Maybe because there is a gap in my device list? (/dev/sdf is not being assigned!) As I said, I can deliver you all information you need, just let me know. One last thing: When I use "connect to folder" and point to my device's internal/Main memory, that also works without a hitch since it is in no way mounted as read-only. Last edited by phees; 08-25-2017 at 04:46 PM. Reason: More Information and corrections |
|
08-25-2017, 10:25 PM | #17 |
creator of calibre
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Given that this device line is discontinued, I'm not particualrly interested in spending time on it myself. But I'm happy to provide guidance on how to fix it yourself. The problem is likely the read-only launcher partition being detected as the main memory. On windows this is filtered by windows_filter_pnp_id
Linux has no equivalent mechanism, that I am aware of, anyway. The relevant function you will need to play with is find_device_nodes() in usbms/device.py WINDOWS_MAIN_MEM is a red herring, it is not used for anything in modern calibre. |
Advert | |
|
08-28-2017, 03:50 PM | #18 |
Junior Member
Posts: 1
Karma: 10
Join Date: Aug 2017
Device: prs-650
|
Hello, I have the same issue with my Sony PRS-650. I took a look at the function suggested find_device_nodes() in usbms/device.py. I'm pretty much a novice at any of this sort of thing, and relatively unfamiliar with python (but familiar enough with code to work my way through it).
But it seems the problems is in that function there's the block starting on 511 Code:
devnodes += list(repeat(None, 3)) ans = ['/dev/'+x if ok.get(x, False) else None for x in devnodes[:3]] ans.sort(key=lambda x: x[5:] if x else 'zzzzz') return self.linux_swap_drives(ans) So what i did for the moment is edit usbms/device.py to this effect. Seems to be working. Don't know if its optimal or not, but it works for sony reader. Code:
devnodes += list(repeat(None, 3)) ans = ['/dev/'+x if ok.get(x, False) else None for x in devnodes] ans.sort(key=lambda x: x[5:] if x else 'zzzzz') return self.linux_swap_drives(ans[:3]) |
08-28-2017, 10:45 PM | #19 |
creator of calibre
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
That seems correct: https://github.com/kovidgoyal/calibr...824773605f8559
|
08-29-2017, 01:56 AM | #20 |
Junior Member
Posts: 2
Karma: 10
Join Date: Aug 2017
Device: Sony PRS-600
|
Confirmed on two machines, fix works!
Thanks @selenetic for the quick work! Last edited by phees; 08-29-2017 at 11:06 AM. |
Advert | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calibre will not recognise (Sony PRS 650) | styxywyx | Devices | 39 | 08-03-2012 04:17 AM |
A few questions about using Calibre with a Sony PRS-650 | brophs | Calibre | 2 | 07-31-2011 10:05 AM |
Calibre Filenames and Sony PRS-650 | Uluhara | Devices | 8 | 05-29-2011 01:34 AM |
disconnecting Sony PRS-650 from Calibre | Arroll | Calibre | 8 | 01-18-2011 02:40 AM |
Calibre and Sony PRS 650 eBook reader | robertpolson | Calibre | 1 | 09-21-2010 01:44 PM |