Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 10-26-2007, 03:30 AM   #31
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,566
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.
kovidgoyal is offline   Reply With Quote
Old 10-26-2007, 04:34 PM   #32
mrkai
Bit Wrangler
mrkai has a complete set of Star Wars action figures.mrkai has a complete set of Star Wars action figures.mrkai has a complete set of Star Wars action figures.mrkai has a complete set of Star Wars action figures.mrkai has a complete set of Star Wars action figures.
 
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:
Originally Posted by kovidgoyal View Post
...ioreg sounds like it might work, though having to run a commandline program just to find out what devices are attached to the system seems like a lot of unnecessary overhead. Maybe I'll just have to bite the bullet and look at IOKit.
...as the polling that you are doing is *horrible* on OS X. looking at drives only when the state changes is a *far* superior solution (on any os, really)..if if you are doing this via iokit or some other means to determine if the PRS 505 is connected.

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
If the 505 is one of those volumes, you'd have the path of the reader's internal store.

Or not Its your software
mrkai is offline   Reply With Quote
Advert
Old 10-28-2007, 12:09 AM   #33
lima tango
Junior Member
lima tango began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Oct 2007
Device: Sony PRS 505
love to help once you get to Mac OS.
lima tango is offline   Reply With Quote
Old 10-28-2007, 12:16 AM   #34
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,566
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
next on my todo list ;-)
kovidgoyal is offline   Reply With Quote
Old 11-01-2007, 04:52 PM   #35
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,566
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.
kovidgoyal is offline   Reply With Quote
Advert
Old 11-08-2007, 01:10 AM   #36
Konquest
Member
Konquest began at the beginning.
 
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.
Konquest is offline   Reply With Quote
Old 11-08-2007, 04:10 AM   #37
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,566
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
kovidgoyal is offline   Reply With Quote
Old 11-08-2007, 04:33 PM   #38
Konquest
Member
Konquest began at the beginning.
 
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
Konquest is offline   Reply With Quote
Old 11-08-2007, 04:39 PM   #39
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,566
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Windows key+R then type cmd.exe and press enter.
kovidgoyal is offline   Reply With Quote
Old 11-08-2007, 05:50 PM   #40
Konquest
Member
Konquest began at the beginning.
 
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.
Konquest is offline   Reply With Quote
Old 11-08-2007, 05:52 PM   #41
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,566
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Hmm when you plug in the device it opens in windows explorer?
kovidgoyal is offline   Reply With Quote
Old 11-08-2007, 06:05 PM   #42
Konquest
Member
Konquest began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Nov 2007
Device: Kindle 3 Wifi
yeah i can access it through explorer and dragon drop my books.
Konquest is offline   Reply With Quote
Old 11-08-2007, 06:09 PM   #43
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,566
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?
kovidgoyal is offline   Reply With Quote
Old 11-09-2007, 10:09 PM   #44
Konquest
Member
Konquest began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Nov 2007
Device: Kindle 3 Wifi
same problem in XP as well
Konquest is offline   Reply With Quote
Old 11-09-2007, 10:34 PM   #45
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,566
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.
kovidgoyal is offline   Reply With Quote
Reply

Tags
libprs500, prs-505


Forum Jump

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


All times are GMT -4. The time now is 01:10 AM.


MobileRead.com is a privately owned, operated and funded community.