Registered Member
|
I have an MTP device which is failing when trying to transfer the file from my collections to the device. The different software versions are: libmtp-0.1.3 and amarok-1.4-SVN
Here are some details about what is happening. I have connected the device using 'MTP Media Device' option and the mediadevice browser shows the playlists from the device. After that I selected a file from my collections and told it to 'Transfer to Media Device' at which point it queues it up in media devices Transfer Queue . Next when I try to 'Start Transfer' it gives an error message saying 'Failed to copy track ...' Here is the debugging ouput: amarok: BEGIN: virtual bool MtpMediaDevice::openDevice(bool) PTP: Opening session amarok: [MtpMediaDevice] setting default parent : 0 amarok: END__: virtual bool MtpMediaDevice::openDevice(bool) - Took 3s amarok: [MtpMediaDevice] Parent folder could not be found. Going to use top level. amarok: BEGIN: virtual MediaItem* MtpMediaDevice::copyTrackToDevice(const MetaBundle&) amarok: [MtpMediaDevice] filetype : 1 amarok: [MtpMediaDevice] Parent folder could not be found. Going to use top level. amarok: [MtpMediaDevice] Creating new folder 'S. D. Burman - Guide' as a child of 0 amarok: [MtpMediaDevice] New folder ID: 7682168 amarok: [MtpMediaDevice] Folder path : S. D. Burman - Guide/ amarok: [MtpMediaDevice] Parent id : 7682168 amarok: [MtpMediaDevice] Sending track... /media/music/mp3/Hindi/Guide/Aaj Phir Jeene Ki.mp3 PTP: Invalid Object Handle LIBMTP_Send_Track_From_File_Descriptor: Could not send object info. Return code: 0x2009 (look this up in ptp.h for an explanation). --------> #define PTP_RC_InvalidObjectHandle 0x2009 amarok: [MtpMediaDevice] Could not write file -1 amarok: END__: virtual MediaItem* MtpMediaDevice::copyTrackToDevice(const MetaBundle&) - Took 0.68s amarok: BEGIN: void MtpMediaDevice::updateAlbumArt(QPtrList amarok: END__: void MtpMediaDevice::updateAlbumArt(QPtrList <...> amarok: BEGIN: bool MediaDevice::disconnectDevice(bool) amarok: [MediaBrowser] disconnecting: hook=true amarok: [MediaBrowser] disconnecting: ok amarok: BEGIN: virtual bool MtpMediaDevice::closeDevice() amarok: [MtpMediaDevice] Folders destroyed PTP: Closing session amarok: [MtpMediaDevice] Device released and the capabilities of the device are: Supported operations: 1001: get device info 1002: Open session 1003: Close session 1004: Get storage IDs 1005: Get storage info 1006: Get number of objects 1007: Get object handles 1008: Get object info 1009: Get object 100b: Delete object 100c: Send object info --------------------> it is failing in doing this 100d: Send object 1010: Reset device 1014: Get device property description 1015: Get device property value 1016: Set device property value 9801: Get object properties supported 9802: Get object property description 9803: Get object property value 9804: Set object property value 9810: Get object references 9811: Set object references 9201: Report Added/Deleted Items 9202: Report Acquired Items 9203: Get type of playlists that are allowed to be transfered 9101: Get secure time challenge 9102: Get secure time response 9103: Set license response 9104: Get sync list 9105: Send meter challenge query 9106: Get meter challenge 9107: Get meter response 9108: Clean data store 9109: Get license state 910a: Send WMDRM-PD Command 910b: Send WMDRM-PD Request Playable File (Object) Types and Object Properties Supported: 3009: MP3 dc01: StorageID dc02: ObjectFormat dc03: ProtectionStatus dc04: ObjectSize dc07: ObjectFileName dc4e: DateAdded dc08: DateCreated dc09: DateModified dc0b: ParentObject dc41: PersistantUniqueObjectIdentifier dc44: Name dc4f: NonConsumable dc46: Artist dc89: Duration dc8b: Track dc8c: Genre dc96: Composer dc99: OriginalReleaseDate dc9a: AlbumName dc9d: DRMStatus dc48: Description de9a: AudioBitRate de93: SampleRate de94: NumberOfChannels de99: AudioWAVECodec Any hints in how to tackle the problem ? I went as deep as looking up ptp_sendobjectinfo and ptp_transaction but don't see any problem with the code in the library. So does it mean the hardware is broken ? The device works fine in MS environment. |
Registered Member
|
OK, did some more digging. Looks like there is some authorization related issue. Here is some info from mtp-detect:
Special directories: Default music folder: 0x00000000 Default playlist folder: 0x00000000 Default picture folder: 0x00000000 Default video folder: 0x00000000 Default organizer folder: 0x00000000 Default zencast folder: 0x00000000 Default album folder: 0x00000000 Default text folder: 0x00000000 libmtp supported (playable) filetypes: ISO MPEG-1 Audio Layer 3 Microsoft Windows Media Audio Microsoft Advanced Systems Format RIFF WAVE file When using mtpfs from http://www.adebenham.com/mtpfs/ , I can mount and do any activity only as root. The device permissions are fine: crw-rw-rw- 1 root root 189, 9 2007-01-26 04:00 /dev/bus/usb/001/010 <===========> /dev/libmtp-usbdev1.10 -> bus/usb/001/010 -cyrus |
Registered Member
|
Hm... Do you have the libmtp.rules-file in /etc/udev/rules.d/?
I don't know if this file is needed in recent libmtp-versions, but for version 0.0.20 it was, so it is available on my System since then and maybe libmtp 0.1.3 needs it too? It has to have the following content:
Mybe this solves your problem...
MacBook, 2GHz C2D, 3GB RAMM, 120GB HDD.
Amarok 2.0 Beta from KDE-on-Mac. |
Registered Member
|
I had the same problem trying to send tracks to a Clix using libmtp from CVS just after the 0.1.2 release. What works for me is changing the following in the libmtp cvs source: libmtp/src/ptp.h //#define PTP_USB_BULK_HS_MAX_PACKET_LEN 512 #define PTP_USB_BULK_HS_MAX_PACKET_LEN 4096 As you are using amarok-1.4-SVN and it is building mtpmediadevice w/o problem I guess MtpMediaDevice::getCapacity & MtpMediaDevice::customClicked() have been fixed. |
Registered Member
|
deloco, I didn't go into the details that I do have the udev rules file and /dev/libmtp... device links are being created with 666 permission and I can see the playlist in Amarok and I can delete files from my MTP device etc.
lrpstrcr, I tried your patch to increase packet length to 4096 but it still did not work (nor reducing it to 64), same error 'Failed to copy...'. I did try $mtp-sendfile Here is my mtp-detect output Found non-autodetected device "Nokia XXX" on USB bus... Connected to MTP device. USB low-level info: Using kernel interface "usbfs" bcdUSB: 512 bDeviceClass: 255 bDeviceSubClass: 0 bDeviceProtocol: 0 idVendor: 0421 idProduct: 04e1 IN endpoint maxpacket: 64 bytes OUT endpoint maxpacket: 64 bytes Device flags: 0x00000000 Device info: Manufacturer: Nokia Model: Nokia XXX Device version: v. 1.00 Serial number: 004400981702333 Vendor extension ID: 0x00000006 Vendor extension description: microsoft.com:1.0;microsoft.com/WMPPD: 11.0;microsoft.com/WMDRMPD: 10.1 Supported operations: 1001: get device info 1002: Open session 1003: Close session 1004: Get storage IDs 1005: Get storage info 1004: Get storage IDs 1005: Get storage info 1006: Get number of objects 1007: Get object handles 1008: Get object info 1009: Get object 100b: Delete object 100c: Send object info 100d: Send object 1010: Reset device 1014: Get device property description 1015: Get device property value 1016: Set device property value 9801: Get object properties supported 9802: Get object property description 9803: Get object property value 9804: Set object property value 9810: Get object references 9811: Set object references 9201: Report Added/Deleted Items 9202: Report Acquired Items 9203: Get type of playlists that are allowed to be transfered 9101: Get secure time challenge 9102: Get secure time response 9103: Set license response 9104: Get sync list 9105: Send meter challenge query 9106: Get meter challenge 9107: Get meter response 9108: Clean data store 9109: Get license state 910a: Send WMDRM-PD Command 910b: Send WMDRM-PD Request Events supported: 0x400a 0x4004 0x4005 Device Properties Supported: 0xd401: Synchronization Partner 0xd402: Device Friendly Name 0xd404: Unknown property 0xd102: Device Certificate 0xd101: Secure Time Playable File (Object) Types and Object Properties Supported: <...> |
Registered Member
|
A major problem I am facing is when I click on a track on my MTP device, it does not play the track and gives the following error message. Does this happen with other MTP devices such as Clix or Zune ?
amarok: BEGIN: virtual void UrlLoader::completeJob() amarok: [PlaylistLoader] The following urls were not suitable for the playlist: amarok: [PlaylistLoader] file://Chiquita.mp3 amarok: END__: virtual void UrlLoader::completeJob() - Took 0.0017s The problem is obviously putting url=file://Chiquita.mp3 where it should be something like url=mtp://Chiquita.mp3 because the file is still in the device and not mapped to any local folder. I wanted to know if this happen with other MTP devices as I don't have access to any other ? |
Registered Member
|
Playing a file direct from an MTP device is not supported. You need to copy it to your collection first. |
Registered Member
|
Finally got Amarok to play directly from MTP device. The code can be downloaded from here - http://amarok4kde.blogspot.com/2007/02/ ... ce_27.html Right now it only supports doubleclick and maybe returnkey. It uses on-demand caching and providing a proxyUrl to the cached file. |
Registered users: Bing [Bot], Google [Bot], lockheed, Sogou [Bot]