| Home | Forums | Register | FAQ | Search | Today's Posts | Mark Forums Read |
|
Welcome to the misticriver forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Quote:
Quote:
Quote:
http://sourceforge.net/mailarchive/f...forum_id=32960 Think I'll keep an eye on the response. BTW, for those not aware, if running KDE then you can use Konqueror file manager to drag files from your T device as long as it's auto detected ok. Just stick 'camera:/' into the location box to get going. Can't upload though as it's geared towards cameras. |
|
|||
|
Quote:
Actually the legalize seems pretty light. The front page caveats basically say that this is a draft - so don't assume it's correct and bank your company on it (MS reserves the right to laugh at you). The only other legal statement seems to be the footer on every page: For Review and Discussion Only Draft Document Subject to Revision or Rejection Not For Publication or General Distribution The last line seems debatable, since MS is publishing it on a fully open webpage (seems like general distribution to me). Despite the cautions in Introduction to MTP: Media Transfer Protocol (http://www.analogzone.com/iot_0328.pdf) about this spec (or a similar one?), this version of the doc seems pretty clean. No EULA-like front matter that identifies this as MS intellectual property; There's just a distribution restriction in the footer. The Intro paper pdf was created Mar'2005, while this version of the MS doc postdates it (Aug'2005) - looks like MS lightened up on the legalease. In fact, all the verbage in the document seems consistent with this being an open document. Especially section 1.2 (quoted for purpose of discussion): The "agnostic to ... OS" seems like a real nice statement for Linux developers. Especially from MS. Anyone find any specific nastiness in the doc? So far, it looks like folks can download it from the site and discuss it openly. |
|
|||
|
This is what you get when you run the .exe:
Quote:
|
|
|||
|
Quote:
Quote:
Quote:
Last edited by SonuvBob : January 11th, 2006 at 10:02 PM. Reason: Update |
|
|||
|
multiple -u filename
I did try both using just folders to upload as well as filenames. Neither seemed to work...
Then again, I did try with the py script but not straight with the command line. The command line itself might work I guess. Didn't think about it. I know that the script doens't handle any wildcards (which is obvious if you've looked at it as to why it doesn't.. it wasn't made to!) Anyhow, i'll try that maybe tonight or tomorrow. I'm hoping to actually get to dig into gphoto2 code tonight. I got to play around a little yesterday and was looking at the functions for get_all_files and it appears to be a pretty simple fix. I need to dust off my C a bit though. Maybe be able to get that perl written too. :S too much to do and too little time. |
|
|||
|
I've written a shell script to upload an entire directory tree (using multiple "-u" and "-m" flags on the command line). Since it looks like you can only have one active "-f" parameter, it must run gphoto2 from each directory with files to upload. It seems to handle file names with spaces reasonably well.
upload_tree.sh Suppose in the current directory, you've got a directory called "mydir". Just run "upload.sh mydir" to upload the whole thing. It will be rooted at /store_00010001/ by default, but with an optional second parameter, you can specify a different root. Incidentally, I suspect that multi-file upload may be a little harder to implement in gphoto2 itself than multi-file download. In particular, libgphoto2 looks to me like its got more directory-browsing functions at the camera end than it does the local filesystem end. I dug around for a while last night, and ended up giving up without writing anything. I hope others have better luck. |
|
|||
|
Quote:
|
|
|||
|
Yech! Really evil
Thanks for the post - saved me from possibly doing something stupid with possibly painfull consequences. Shucks, time to burn the bits |
|
|||
|
Quote:
Again, it looks like it's a lot easier to download with gphoto than it is to upload. Of course, I'm not absolutely positive about any of this. It may be a lot easier than I'm making it out to be. |
|
|||
|
Quote:
I also think it'd be pretty cool to make a Python wrapper for libgphoto2. Probably a lot of work involved, but I imagine a lot of people would find it useful. Quote:
I don't speak Legalese too well: does the EULA prevent an LGPL'd open source implementation of the MTP protocol (or at least using their .doc to do it)? I'm not sure what the “Enhanced Initiator” features are- is this just the MTP extensions to PTP, or certain ones in particular? Also looks like there's another EULA you have to agree to if you want to distribute your implementation. Fun fun fun. |
|
|||
|
Quote:
Well you dug in deeper than I did. that could get scary. edit: I'm going to quit promising that I'm gonna look at it until I actually do. |
|
|||
|
Anyone else got any updates on anything they are writing?
Time for an update from me. I've updated my sync script now and it can be found at: http://www.nibbler.dsl.pipex.com/tsync Yup, it's a frightening script, but it works for me! It now supports uploading whole folders and individual files. It will delete whole folders and individual files. Basically, it will sync whatever is in the assigned sync directory on your hdd. Also, it will download contents of VOICE and RECORD folders and delete their contents. It will ask first for confirmation though. I'm going to have a go at incorporating playlists now. Let me know how it works out - comments welcome. In the meantime, enjoy. |
|
|||
|
I've Just purchased a T10 iGB iRiver. And after following all the instructions on this thread and on the gphoto2 FAQ I've got everything almost working.
The problem I'm running into I've yet to find anything on. Essentially whenever I try to transfer more than 512M to the T10 it stops responding. *** Error *** PTP Protocol error, response expected *** Error *** PTP Protocol error, data expected *** Error (-1: 'Unspecified error') *** from then on I cannot upload anymore using gphoto2. Trying "ghpoto2 -l" yeilds: *** Error *** PTP Protocol error, response expected There is one folder in folder '/': - store_00010001 There are no folders in folder '/store_00010001'. Even though the iRiver browser clearly shows everything I've uploaded until then. Reconnecting the T10 does nothing, the only way to get it to communicate with gphoto2 again is to delete files. At this point I might as well have bought a 512MB player. I'm running Fedora Core 4 with kernel 2.6.14-1.1637_FC4smp I've installed gphoto2-2.1.99-3. FWIW: Running detail debug on a sucessful transfer, and the same transfer when it fails only reveals the following difference: 0.142108 ptp(2): PTP: Opening session 0.142143 gphoto2-port(2): Writing 16=0x10 byte(s) to port... 0.142169 gphoto2-port(3): Hexdump of 16 = 0x10 bytes follows: 0000 10 00 00 00 01 00 02 10-00 00 00 00 01 00 00 00 ................ 0.142279 gphoto2-port(2): Reading 512=0x200 bytes from port... 0.142385 gphoto2-port(2): Could only read 12 out of 512 byte(s) 0.142434 gphoto2-port(3): Hexdump of 12 = 0xc bytes follows: 0000 0c 00 00 00 03 00 01 20-04 00 00 00 ....... .... 0.142482 gphoto2-port(2): Writing 12=0xc byte(s) to port... 0.142525 gphoto2-port(3): Hexdump of 12 = 0xc bytes follows: 0000 0c 00 00 00 01 00 01 10-01 00 00 00 ............ 0.142633 gphoto2-port(2): Reading 512=0x200 bytes from port... 0.144133 gphoto2-port(2): Could only read 12 out of 512 byte(s) 0.144156 gphoto2-port(3): Hexdump of 12 = 0xc bytes follows: 0000 0c 00 00 00 03 00 04 20-01 00 00 00 ....... .... 0.144198 context(0): PTP Protocol error, data expected *** Error *** PTP Protocol error, data expected 0.144252 gphoto2-port(2): Closing port... 0.146687 context(0): An error occurred in the io-library ('Unspecified error'): Could not query kernel driver of device. *** Error *** An error occurred in the io-library ('Unspecified error'): Could not query kernel driver of device. *** Error (-1: 'Unspecified error') *** 0.147489 gp-camera(2): Freeing camera... 0.147513 gphoto2-port(2): Freeing port... 0.147533 gphoto2-port(2): Closing port... 0.147604 libgphoto2/gphoto2-filesys.c(2): Clearing fscache LRU list... 0.147624 libgphoto2/gphoto2-filesys.c(2): fscache LRU list already empty 0.147644 gphoto2-filesystem(2): Internally deleting all folders from '/'... |
|
|||
|
Quote:
Quote:
|
|
|||
|
Quote:
Quote:
I guess there's nothing to it but to sit down and read up on anything I can, in what free time I've had for it of late. In addition to hoping someone else comes up with a patch or work-around. Until it can be resolved, live with only 10 CDs worth of music on my portable. Okay that's not so bad, but it's a matter of getting my money's worth. |
|
|||
|
If you're looking for a quick workaround, edit camlibs/ptp2/ptp.h in the libgphoto2 source and change PTP_USB_BULK_HS_MAX_ PACKET_LEN from 512 to 4096 (or higher if you expect to have >1000 files). Big thanks to OrthoB for figuring that out.
I finally got around to doing that, and it works great. Oddly enough it still gets that extra byte when there's exactly 124 object handles (resulting in a 513 byte packet instead of 512), though it doesn't seem to cause problems. I wonder if this happens every time the object handle list packet size is a multiple of 256 bytes (it happened for OrthoB at 768 bytes). |
|
|||
|
Quote:
I still get PTP errors with files of certain length being transferred though. However, the file seems intact on the device and all plays well. |