View Single Post
Old 08-28-2017, 03:50 PM   #18
selenetic
Junior Member
selenetic began at the beginning.
 
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)
The function assumes that devnodes will be at most 3 entries long, but the sony reader has four devices associated with it. The READER drive, the main memory, is being cut off by devnodes[:3].

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])
selenetic is offline   Reply With Quote