This forum has been archived. All content is frozen. Please use KDE Discuss instead.

MTP problem

Tags: None
(comma "," separated)
technojunkie
Registered Member
Posts
12
Karma
0

MTP problem

Fri Aug 25, 2006 6:14 am
Hi all, thanks for working so hard on this great program. I am having a bit of trouble with my MTP mp3 player.

I am using libmtp-0.0.12 with amarok 1.4.2.

When I use the detect program included with libmtp it finds my player just fine.

When I try to detect the player in amaroK, I get an error stating that amaroK could not find the player.

I don't know what other info to include, but will post anything asked for.

**edit** here's the error, DBUS and HAL are running:
No new media devices were found. If you feel this is an error, ensure that the DBUS and HAL daemons are running and KDE was built with support for them. You can test this by running "dcop kded mediamanager fullList" in a Konsole window.

Last edited by technojunkie on Fri Aug 25, 2006 11:04 pm, edited 1 time in total.
mopoke
Registered Member
Posts
20
Karma
0

Re: MTP problem

Fri Aug 25, 2006 6:19 am
technojunkie wrote:Hi all, thanks for working so hard on this great program. I am having a bit of trouble with my MTP mp3 player.

I am using libmtp-0.0.12 with amarok 1.4.2.

When I use the detect program included with libmtp it finds my player just fine.

When I try to detect the player in amaroK, I get an error stating that amaroK could not find the player.


When you run amarok from a console, do you see any errors from PTP/MTP?
I'm assuming that when you ran mtp-detect, you did it as the same user that Amarok runs as?
technojunkie
Registered Member
Posts
12
Karma
0

Re: MTP problem

Fri Aug 25, 2006 12:59 pm
Here's what I get from command line:
Code: Select all
bjheu@bj-linux:~/Code/libmtp/libmtp-0.0.12/examples> amarok
Amarok: [Loader] Starting amarokapp..
Amarok: [Loader] Don't run gdb, valgrind, etc. against this binary! Use amarokapp.
QLayout "unnamed" added to QVBox "unnamed", which already has a layout
QLayout: Adding KToolBar/mainToolBar (child of QVBox/unnamed) to layout for PlaylistWindow/PlaylistWindow
TagLib: String::prepare() - Invalid UTF16 string.
usb_claim_interface(): Operation not permitted
bjheu@bj-linux:~/Code/libmtp/libmtp-0.0.12/examples>

and
Code: Select all
bjheu@bj-linux:~/Code/libmtp/libmtp-0.0.12/examples> amarokapp
QLayout "unnamed" added to QVBox "unnamed", which already has a layout
QLayout: Adding KToolBar/mainToolBar (child of QVBox/unnamed) to layout for PlaylistWindow/PlaylistWindow
TagLib: String::prepare() - Invalid UTF16 string.
Found non-autodetected device "Philipps HDD1630/17" on USB bus...
usb_claim_interface(): Operation not permitted
Connection error.
STARTUP


yes it's same user, as both detect, and amaroK

so I'm guessing I have an issue with access to usb, but I don't really have a good idea how to proceed.

Last edited by technojunkie on Fri Aug 25, 2006 1:05 pm, edited 1 time in total.
technojunkie
Registered Member
Posts
12
Karma
0

Re: MTP problem

Fri Aug 25, 2006 10:53 pm
If I eun as root:

Code: Select all
bjheu@bj-linux:~/Code/libmtp/libmtp-0.0.12/examples> sudo amarokapp
Password:
Error: "/var/tmp/kdecache-bjheu" is owned by uid 1000 instead of uid 0.
Link points to "/var/tmp/kdecache-root"
QLayout "unnamed" added to QVBox "unnamed", which already has a layout
QLayout: Adding KToolBar/mainToolBar (child of QVBox/unnamed) to layout for PlaylistWindow/PlaylistWindow
TagLib: String::prepare() - Invalid UTF16 string.
Autodetected device "Philipps HDD1630/17" (VID=0471,PID=014c) is known.
PTP: Opening session
Connected to MTP device.
Error: "/tmp/ksocket-bjheu" is owned by uid 1000 instead of uid 0.
Link points to "/tmp/ksocket-root"
Error: "/var/tmp/kdecache-bjheu" is owned by uid 1000 instead of uid 0.
Error: "/var/tmp/kdecache-bjheu" is owned by uid 1000 instead of uid 0.
Error: "/var/tmp/kdecache-bjheu" is owned by uid 1000 instead of uid 0.
Link points to "/var/tmp/kdecache-root"
Link points to "/var/tmp/kdecache-root"
Link points to "/var/tmp/kdecache-root"
STARTUP
kio (KIOConnection): ERROR: Header read failed, errno=104
kio (KIOConnection): ERROR: Header has invalid size (-1)
kio (KIOConnection): ERROR: Header read failed, errno=104
kio (KIOConnection): ERROR: Header has invalid size (-1)
kio (KIOConnection): ERROR: Header read failed, errno=104
kio (KIOConnection): ERROR: Header has invalid size (-1)
Error: "/var/tmp/kdecache-bjheu" is owned by uid 1000 instead of uid 0.
Link points to "/var/tmp/kdecache-root"
Error: "/var/tmp/kdecache-bjheu" is owned by uid 1000 instead of uid 0.
Link points to "/var/tmp/kdecache-root"
Error: "/var/tmp/kdecache-bjheu" is owned by uid 1000 instead of uid 0.
Link points to "/var/tmp/kdecache-root"
PTP: I/O error
LIBMTP_Create_Folder: Could not send object info
joeinnes
Registered Member
Posts
3
Karma
0

Re: MTP problem

Sat Aug 26, 2006 5:20 pm
Yeah, I'm having this same problem... dbus & hald are running, so I'm a bit stuck as to what to do... if this feature works, that'd be great...

If anyone's got any suggestions, or if technojunkie can tell me how he fixed the problem, I'd be very grateful...

Cheers,

Joe
User avatar
dangle_wtf
Moderator
Posts
1252
Karma
0

Re: MTP problem

Sat Aug 26, 2006 11:04 pm
I believe there's an issue with libmtp 0.0.12 that wasn't discovered until just after 1.4.2 was released... but I can't remember exactly - have you tried with libmtp 0.0.11? Or check with current amarok svn.


"There are two theories to arguing with women. Neither one works."
.
If men could get pregnant, we'd learn the true meaning of "screaming nancyboy wuss"
User avatar
markey
KDE Developer
Posts
2286
Karma
3
OS

Re: MTP problem

Sat Aug 26, 2006 11:07 pm
dangle_wtf wrote:I believe there's an issue with libmtp 0.0.12 that wasn't discovered until just after 1.4.2 was released... but I can't remember exactly - have you tried with libmtp 0.0.11? Or check with current amarok svn.


Correct, Amarok 1.4.2 is incompatible with libmtp 0.0.12. Either downgrade libmtp, or upgrade Amarok (using SVN).


--
Mark Kretschmann - Amarok Developer
technojunkie
Registered Member
Posts
12
Karma
0

Re: MTP problem

Sun Aug 27, 2006 6:36 am
I tried upgrading to 0.0.14, downgrading to 0.0.11, then 0.0.10 and no joy.

I have to figure out how to buld from svn, every time I check out, there doesn't seem to be any configure or make scripts.

When I check the output of "dcop kded mediamanager fullList" should I see an entry for the MTP player? Cuz I con't...
technojunkie
Registered Member
Posts
12
Karma
0

Re: MTP problem

Sun Aug 27, 2006 7:02 am
I think I have it figured out... (It helps to follow the install instructions) I never did the hotplug portion of the libMTP install. Now when I run as root, It will detect the player but crashes when I try to sync. If I run as normal it doesn't detect the player. If the player is plugged in when I start amaroK I get this:

Code: Select all
bjheu@bj-linux:~> amarokapp
QLayout "unnamed" added to QVBox "unnamed", which already has a layout
QLayout: Adding KToolBar/mainToolBar (child of QVBox/unnamed) to layout for PlaylistWindow/PlaylistWindow
Found non-autodetected device "Philipps HDD1630/17" on USB bus...
usb_claim_interface(): Operation not permitted
Connection error.
QColor::setRgb: RGB parameter(s) out of range
%%%%%% child initializes as player 0
%%%%%% child initializes as player 1
INIT
INIT


** edit **

According to the libMTP buglist, upgrading libUSB to 1.1.12, and recompiling libMTP against it should have resolve user permission problems, it didn't for me. (nevermind, the PC needed a full reboot for this one)

**edit**

Another odd thing... If I run any of the example scripts while amarok is running, it then will detect my player, but the track info for loaded files is blank, and if I try to send a file to the player amaroK crashes.

Last edited by technojunkie on Sun Aug 27, 2006 8:27 am, edited 1 time in total.
technojunkie
Registered Member
Posts
12
Karma
0

Re: MTP problem

Sun Aug 27, 2006 9:03 am
OK last post of the night I'll summarize where I am at:

AmaroK 1.4.2
libMTP 0.0.10(example scripts will detect, and read the contents of the player)
libUSB 0.1.12(Did resolve permission issues)


When I launch AmaroK, it will detect my player
With AmaroK running, it doesn't always connect to the player (I haven't tracked down what causes it to go either way)
AmaroK displays a bunch of blank entries for what's on the player
If I try to send a file, amaroK crashes.

It looks like the file transfer is a libMTP problem, if I use the sendtr program I get lots of errors.
joeinnes
Registered Member
Posts
3
Karma
0

Re: MTP problem

Sun Aug 27, 2006 1:29 pm
Ok, taking over from where you left off...

Instead of using the old libmtp, I'm using the CVS version. I've got the latest version of libusb I can get my hands on through my package manager, which appears to be 0.1.10, but I'm not 100% sure as this is a ubuntu specific package (2:0.1.10a-22ubuntu1). I've got amarok 1.4.2, and a Creative Nomad Zen Jukebox with the PlaysForSure (MTP) firmware. My output's a whole lot more verbose than yours technojunkie, but no mention of my MP3 player. So I tried:
cd ~/libmtp/examples
./detect

And got:
Autodetected device "Creative Zen Xtra (MTP mode)" (VID=014e,PID4128) is known.
PTP: Opening session
Connected to MTP device

Which is good news. So, I moved an MP3 into the examples folder (just to make life a little easier), and tried
./sendtr -q -c mp3 *.mp3

And got:
Sending track:
Codec:    mp3
Codec:    ISO MPEG Audio Layer 3
Autodetected device "Creative Zen Xtra (MTP Mode)" (VID=041e,PID=4128) is known.
PTP: Opening session
Connected to MTP device.
Sending track...
LIBMTP_Update_Track_Metadata(): could not set track artist name
LIBMTP_Send_Track_From_File_Descriptor: error setting metadata for new track

PTP: Closing session
ERROR: Could not close session!
New track ID: 3266121
OK.

The not closed session meant that my MP3 player had to do a full rescan of the library, which took a while... I don't know if there was a reason for that, or if it was purely coincidental.

However, on a previous attempt, the session closed fine. I had to do it a second time, because I couldn't remember if the file I'd sent was already on the MP3 or not (duh). I deleted the file, and then tried again (the output's above).

Initially, it seemed to be good news... it seemed to have sent the track over, no major drama, but the track wasn't on the MP3 player. So I tried sending it over with tag information. (ie: omitting the -q from the command, and then filling in the data interactively). It provided a summary of the track data, but the first time I did it, I left a few fields blank, and the track didn't transfer.

The second time, I filled in all the blanks with either the correct data, "Unknown" or another appropriate value. After "Sending track..." this time, I got
Progress: 2245021 of 2245009 (100%)
PTP: Closing session
New track ID: 3266677
OK.


And sure enough, the track had transferred. The length of the track was recorded in seconds, so my attempt to put "02:20" was truncated to "02", resulting in the MP3 player being uncertain of the length of the track, but the track was on there. Fast forwarding and rewinding was impossible due to this. I went back, set track length to 140 to try out my theory. I got a whole bunch of "LIBMTP panic: Found a bad handle, trying to ignore it."s, and again the second time I tried. I unplugged the MP3 player, and replugged it, and tried again. It happened again the third time I tried. I tried a few more times, and got nothing useful out of it. Even the original settings failed. I tried a few other scripts, but they kept chucking the same error at me.

So in short, for a short time, I had libmtp working. But then I broke it somehow. I never managed to get amaroK to see it.

Joe
technojunkie
Registered Member
Posts
12
Karma
0

Re: MTP problem

Mon Aug 28, 2006 9:47 am
I keep getting hung up at the release date, sendtr complains about an i/o error.

as for not being able to see the player after some playing around, run ./hotplug it worked for me. Oh and don't play around with the examples while amaroK is running, you get some really funky stuff...
p33kabo0
Registered Member
Posts
3
Karma
0

Re: MTP problem

Wed Aug 30, 2006 2:27 am
Hello,

I just want to say that I'm improving the same problem as technojunkie ...  I'm using a Creative Zen Touch 20GB

I'm using Amarok 1.4.2 with libmtp 0.0.16 (out on today August 16th), libusb 0.1.12-7 and SuSE 10.1 ...  the only way that I can connect to my device is when I launch amarok as root.  I'm beginner with Linux but I understood what they did as test before me.

After manually adding my device as a MTP Device, it synchronized with my librairy and took a long time ...but now I can see all my librairy into amarok!  So I guess the update to libmtp-0.0.16 makes it work :)
p33kabo0
Registered Member
Posts
3
Karma
0

Re: MTP problem

Wed Aug 30, 2006 2:38 am
OK,

Well, I just tried to play one song and I guess it's not ready yet for that :)  It just add the FIRST song that I have on my Zen Touch and on top of that, I can't even play it ...but that I don't care for now.

BUT I just tried transfering a song, and it worked :)  I tested and it played completly on my mp3 player!
mopoke
Registered Member
Posts
20
Karma
0

Re: MTP problem

Wed Aug 30, 2006 8:08 am
p33kabo0 wrote:Well, I just tried to play one song and I guess it's not ready yet for that :)  It just add the FIRST song that I have on my Zen Touch and on top of that, I can't even play it ...but that I don't care for now.


No, the plugin does not allow playing direct from the device. It may do in a future release. There's a list of things I want to get working still including copying from the device to Amarok, managing playlists, album art, etc.

As regards to the various problems mentioned in this thread, it seems that there are some issues which relate to the underlying libmtp library. I can try and help debug these but it's probably also worth discussing on the libmtp-discuss mailing list (if you've not already).


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], kde-naveen, Sogou [Bot], Yahoo [Bot]