10-26-2007, 03:30 AM | #31 |
creator of calibre
Posts: 44,565
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Jesus! I don't want to write a OS notify solution, because that would mean making my app depend on an different event loop in each OS. That is going to cause far more problems than it solves. Indeed, I dont want to have to depend on an event loop at all for the command line interface and writing separate code for each interface for 3 different platforms is just not acceptable. I already have a perfectly good polling based solution (using libusb, which I've ported to OS X) that takes very little system resource, just run libprs500 and see and that works perfectly well on 3 different platforms.
All I need now is a simple way to map usb product ids to mount points that does not depend on having a particular file system. I'm hoping ioreg does that. It doesn't matter if ioreg is resource heavy since this call is made only on initial device detection. |
10-26-2007, 04:34 PM | #32 | |
Bit Wrangler
Posts: 181
Karma: 415
Join Date: Oct 2007
Device: Sony PRS-505
|
I think you are trying to solve the wrong(ish) problem here...
Quote:
Since with the 505 there is no need for direct manipulation of the data via a protocol (thank you Sony for Mass Storage support!) it would be a far better *user experience* to not constantly scan for what you are looking for and let the os tell you its a good time to work. While this might not be the more...geeky "MIT" way of solving the "is the the Reader's mass storage volume?" it is most definitely a better experience for the *user* on OS X in that "Bell Labs" sort of way To put it another way: OS X is a *nix...python is a scripting language. You *could* say, use iokit and some code like this...figure out how to wrap it, etc... or, simply do this when the system tells you its got a new removable mounted: Code:
mount|grep `ioreg -n "Sony PRS-505/UC Media" |grep "BSD Name"|cut -d'"' -f4`|cut -d' ' -f3 Or not Its your software |
|
Advert | |
|
10-28-2007, 12:09 AM | #33 |
Junior Member
Posts: 1
Karma: 10
Join Date: Oct 2007
Device: Sony PRS 505
|
love to help once you get to Mac OS.
|
10-28-2007, 12:16 AM | #34 |
creator of calibre
Posts: 44,565
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
next on my todo list ;-)
|
11-01-2007, 04:52 PM | #35 |
creator of calibre
Posts: 44,565
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
version 0.4.17 has initial support for OS X in both GUI and commandline.
|
Advert | |
|
11-08-2007, 01:10 AM | #36 |
Member
Posts: 10
Karma: 10
Join Date: Nov 2007
Device: Kindle 3 Wifi
|
Ive been trying to run libprs500 on vista 32 for my prs-505 and its not working. I followed the directions (uninstall drivers etc) and libprs installs fine. When I run it with my reader connected via usb, the program freezes up and my mouse cursor goes crazy.
|
11-08-2007, 04:10 AM | #37 |
creator of calibre
Posts: 44,565
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Hmm what happens if you try the following command in a terminal, with your reader connected?
Code:
prs500 df |
11-08-2007, 04:33 PM | #38 |
Member
Posts: 10
Karma: 10
Join Date: Nov 2007
Device: Kindle 3 Wifi
|
hmm terminal? do I need linux for that, I only have vista on this machine
|
11-08-2007, 04:39 PM | #39 |
creator of calibre
Posts: 44,565
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Windows key+R then type cmd.exe and press enter.
|
11-08-2007, 05:50 PM | #40 |
Member
Posts: 10
Karma: 10
Join Date: Nov 2007
Device: Kindle 3 Wifi
|
i tried that, i see the prs500.exe process running in task manager but nothing happens in the cmd prompt after i run it. I tried running libprs with that going, same problem.
|
11-08-2007, 05:52 PM | #41 |
creator of calibre
Posts: 44,565
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Hmm when you plug in the device it opens in windows explorer?
|
11-08-2007, 06:05 PM | #42 |
Member
Posts: 10
Karma: 10
Join Date: Nov 2007
Device: Kindle 3 Wifi
|
yeah i can access it through explorer and dragon drop my books.
|
11-08-2007, 06:09 PM | #43 |
creator of calibre
Posts: 44,565
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
This may be a vista specific problem. Do you have access to an XP machine where you can try it? IS there anyone else that has used libprs500 with a 505 on vista?
|
11-09-2007, 10:09 PM | #44 |
Member
Posts: 10
Karma: 10
Join Date: Nov 2007
Device: Kindle 3 Wifi
|
same problem in XP as well
|
11-09-2007, 10:34 PM | #45 |
creator of calibre
Posts: 44,565
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Hmm it works for me on XP with v0.4.18. Try running prs500 df and then wait 10secs and press Ctrl+C hopefully that will tell us where it's hanging.
|
Tags |
libprs500, prs-505 |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
libprs500 | tommy still | Calibre | 2 | 02-09-2008 11:55 AM |
Using libprs500 | jerryleejr | Calibre | 2 | 01-28-2008 01:29 AM |
Using Libprs500 for 505 | JeffASonyReader | Calibre | 17 | 01-21-2008 10:34 AM |
Help!!! libprs500 | MountainMan | Calibre | 11 | 11-14-2007 12:25 AM |
libprs500 and 505 | carchase | Sony Reader | 6 | 10-28-2007 04:06 PM |