You are not logged in.

#1 2007-12-27 01:07:31

mcmillan
Member
Registered: 2006-04-06
Posts: 737

Getting Creative Zen player to connect through amarok [SOLVED]

Edited 12-27 to include new info

I'm trying to get myCreative Zen player to connect through amarok but am having some problems. After some looking around I figured out the libmtp in the extra repository doesn't support this player, but the newest versions do. I made a new package for libmtp-0.2.4 and installed it since there's been some tweaks that affect this player since 0.2.2 which is in testing. I also had to recompile amarok since one of libs changed a name with the new libmtp. The instructions from libmtp mentioned udev rules needed to be defined, which was done by copying a file from the source code into /etc/udev/rules.d. That file (minus the parts relating to other players, which is pretty much the same as here):

# UDEV-style hotplug map for libmtp
# Put this file in /etc/udev/rules.d

ACTION!="add", GOTO="libmtp_rules_end"
ATTR{dev}!="?*", GOTO="libmtp_rules_end"
SUBSYSTEM=="usb", GOTO="libmtp_usb_rules"
# The following thing will be deprecated when older kernels are phased out.
SUBSYSTEM=="usb_device", GOTO="libmtp_usb_device_rules"
GOTO="libmtp_rules_end"

LABEL="libmtp_usb_rules"

# Creative ZEN 8GB
ATTR{idVendor}=="041e", ATTR{idProduct}=="4157", SYMLINK+="libmtp-%k", MODE="666"
GOTO="libmtp_rules_end"

LABEL="libmtp_usb_device_rules"
# Creative ZEN 8GB
ATTRS{idVendor}=="041e", ATTRS{idProduct}=="4157", SYMLINK+="libmtp-%k", MODE="666"
GOTO="libmtp_rules_end"

LABEL="libmtp_rules_end"

When I plug the player to my usb port dmesg gives

usb 5-1: new high speed USB device using ehci_hcd and address 8
usb 5-1: configuration #1 chosen from 1 choice

As my normal user amarok doesn't seem to recognize anything, and mtp-detect gives:

libmtp version: 0.2.4

Attempting to connect device(s)
usb_claim_interface(): Operation not permitted
LIBMTP PANIC: Unable to initialize device 1
LIBMTP PANIC: configure_usb_devices() error code: 7 on line 1561
Detect: There has been an error connecting. Exiting

As root mtp-detect gives me a bunch of output that seems like it's doing what it should, also while it's spitting this out the screen on the player changes to say it's docked, which wasn't happening as the normal user. This makes me think it's some permissions issue. I did find things from google telling me that sometimes the user needs to be added to a certain group to use libmtp, though it seemed somewhat distro dependent. My main user is in the following groups: dbus hal network audio optical storage scanner camera users thinkpad

However I don't think my problems are solely permission related, since even as root amarok won't recognize the player. I can use gnomad2 as root, which mostly works, though it crashes when I try and close gnomad after adding music and the player thinks it's still docked even after unplugging it. I had to use a pin to reset it just to turn it off. When I ran it from a console I got the following output at the end after the crash

PTP: Closing session
ERROR: Could not close session!
inep: usb_get_endpoint_status(): Protocol error
outep: usb_get_endpoint_status(): No such device
usb_clear_halt() on IN endpoint: No such device
usb_clear_halt() on OUT endpoint: No such device
usb_clear_halt() on INTERRUPT endpoint: No such device
The application 'gnomad2' lost its connection to the display :0.0;
most likely the X server was shut down or you killed/destroyed
the application.

Any suggestions for where to go from here?

Last edited by mcmillan (2008-01-11 05:38:14)

Offline

#2 2008-01-06 10:36:34

waters
Member
Registered: 2007-04-16
Posts: 8

Re: Getting Creative Zen player to connect through amarok [SOLVED]

I also got a new Creative Zen like u, But i can't install libmtp0.2.4 from source.gz. Can u share your new package for libmtp-0.2.4? Thanks.

Offline

#3 2008-01-07 06:07:36

mcmillan
Member
Registered: 2006-04-06
Posts: 737

Re: Getting Creative Zen player to connect through amarok [SOLVED]

I tried uploading onto my school website, but it doesn't seem accessable from there. However I just modified the version number from the regular Pkgbuild file from abs. What I have is:

# $Id: PKGBUILD,v 1.8 2007/05/20 19:11:05 travis Exp $
# Maintainer: damir <damir@archlinux.org>
#Contributor: Kevin Edmonds <edmondskevin@hotmail.com>

pkgname=libmtp
pkgver=0.2.4
pkgrel=1
pkgdesc="library implementation of the Media Transfer Protocol"
arch=("i686" "x86_64")
url="http://libmtp.sourceforge.net"
license=("LGPL")
depends=("libusb")
source=(http://easynews.dl.sourceforge.net/sourceforge/libmtp/$pkgname-$pkgver.tar.gz)
options=('!libtool')
#md5sums=('597b62d994d9491531b9e67190f6cfe7')

build() {
  cd $startdir/src/$pkgname-$pkgver
  ./configure --prefix=/usr
  make || return 1
  make DESTDIR=$startdir/pkg install
}

If you still have trouble building it let me know some other way than that I can send you the package.

I've been meaning to post an update about my issues. I've figured out that when I connect the player it creates device nodes with the root group.  Some have permissions set to 666, which seems to fit with the udev rules I posted. But some of them are only rw for owner and group, others only have read permissions. As a test I tried changing the permissions by hand to 666, and I can use gnomad as my regular user, though it's buggy and seems to crash randomly (not just when I transfer files like I originally thought). I haven't been able to test what amarok does, since for some reason it stopped working this weekend and I haven't had a chance to figure out what happened. It seems there some problem with the udev rules, but I don't know much about how that works to figure out what's going wrong.

Offline

#4 2008-01-10 11:13:37

waters
Member
Registered: 2007-04-16
Posts: 8

Re: Getting Creative Zen player to connect through amarok [SOLVED]

Thanks for your pkgbuild. After successful installation of libmtp, I reconfigured amarok and reinstalled it. It works. But I don't know why amarok cannot transfer some mp3 files, not to mention video files. However, it seems gnomad2 can do this job, although I didn't try to transfer video files yet.

Offline

#5 2008-01-10 16:59:10

sfabius
Member
Registered: 2007-07-07
Posts: 153

Re: Getting Creative Zen player to connect through amarok [SOLVED]

I have a Creative Zen Vision M and it works fine. I had to put in the udev rules, too. Try to see if you can transfer if you run Amarok as root. If so, then you just need to put your user in the correct group. I can't remember which is the correct one, and I haven't done on the machine I'm writing from; some googling or searching forums should give you the answer. Or, you could just put it in everything obvious (audio, usb, etc.).

Amarok does not deal with video files. Gnomad2 does fine with this -- you need to transfer as 'data' though (select the 'data tab in gnomad).

Offline

#6 2008-01-11 05:37:41

mcmillan
Member
Registered: 2006-04-06
Posts: 737

Re: Getting Creative Zen player to connect through amarok [SOLVED]

I can connect using root but not as my regular user or using sudo, my user is in these groups: dbus hal network audio optical storage scanner camera users thinkpad

The files in /dev that show up when I plug in my zen are:

crw-rw-rw- 1 root root    189, 513 2008-01-10 20:50 5-5
lrwxrwxrwx 1 root root           3 2008-01-10 20:50 libmtp-5-5 -> 5-5
lrwxrwxrwx 1 root root          15 2008-01-10 20:50 libmtp-usbdev5.2 -> bus/usb/005/002
crw-rw---- 1 root root    254,  10 2008-01-10 20:50 usbdev5.2_ep00
crw-rw---- 1 root root    254,  11 2008-01-10 20:50 usbdev5.2_ep02
crw-rw---- 1 root root    254,  12 2008-01-10 20:50 usbdev5.2_ep82
crw-rw---- 1 root root    254,  13 2008-01-10 20:50 usbdev5.2_ep83

which is why I thought maybe something screwy was going on with my udev rules, since the only changes seem to be in the root group, I had to add GROUP="audio" to the end of the line, and it worked fine for me. It's weird, before I searched and all I found was references saying to add the user to groups that didn't exist on Arch. When I looked just now to give an example I must have used different search terms, since one of the first hits was telling me how to edit the rules, what I suspected I needed to do all along.

Out of curiousity

Offline

Board footer

Powered by FluxBB